I have uninstalled my localized(german) .net version to get english exception messages. Afterwards i've installed the latest .NET 4.6.2 framework on my windows 10 development pc. Then i've openend my solution which contains projects that target .NET Framework 4.5 and noticed that they couldn't be loaded anymore because this version is not installed. Then visual studio suggested to use a different version and change it later.
When i've done it i couldn't change to the desired framework version as you can see here:
I've tried to reinstall .NET 4.5 but it's not supported on windows 10 so the installation is cancelled(even repair option doesn't work). If i've understood it correctly newer versions of the .NET framework are in-place updates of lower versions, so they include them and i should be able to target them.
The Microsoft .NET Framework 4.6.2 is a highly compatible, in-place update to the Microsoft .NET Framework 4/4.5/4.5.1/4.5.2/4.6/4.6.1.
So why is it not possible and what else can i do to target .NET 4.5?
Targeting .Net Framework 4.5 is available in Visual Studio version 2012, 2013, 2015. If you can't see it, open desktop control panel
->program & features
find the entry Visual Studio 2015 with Updates
, select Modify/Repair
to repair the Visual Studio.
The issue can be fixed by installing the developer pack for .NET 4.5 Download Link
来源:https://stackoverflow.com/questions/42279515/cannot-select-target-framework-4-5-in-visual-studio-2015