问题
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