Targeted .NET Framework version change

若如初见. 提交于 2019-12-13 19:06:38

问题


How do I go about changing the version for the targeted version of the .NET Framework from 4.5.1 to 4.5 in Visual Studio 2012?


回答1:


You can usually select your desired target framework within the application properties. Your setup may be slightly different, my Visual Studio installation is using the C# development settings by default, and the example image below is from a WPF project (on the off chance yours is different).

Either right-click on your project in the Solution Explorer and select Properties->Application, or select Properties from the main toolbar in Visual Studio, and select the Application tab. You should be able to select the target framework.

If you can't select the particular framework you're after, the issue may be slightly different.




回答2:


I fixed it! I right clicked on my project - select Edit Project File - Went and looked for the <TargetFrameworkVersion>v4.5</TargetFrameworkVersion> - then saved and reloaded the project.




回答3:


Check the target framework of the project you created. To fix your problem change it to .NET Framework version.

To do this right-click your project and select Properties. On the Compile tab, Click Advance Compile Options... and set the Target Framework dropdown to .NET Framework version.




回答4:


You need to install the Microsoft .NET Framework x.x.x Developer Pack then only it will be visible under the Target Framework dropdown



来源:https://stackoverflow.com/questions/22771598/targeted-net-framework-version-change

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!