Search code examples
visual-studioc++-cli

Visual Studio .Net Target Framework Version is grayed out


I am using Visual Studio 2015 to open a C++ CLI project and I want it to target .NET 4.5. My installed .NET version is 4.7. But I cannot edit the project's target framework because it is grayed out.

Grayed out target framework version

I have tried to directly edit the project's file in notepad but I couldn't find where the target framework is defined.

Below is part of the screenshot of the .vcxproj file

Project file xml screenshot


Solution

  • In Visual Studio, in Solution Explorer, select your project. On the menu bar, open the Project menu and choose Unload project. This unloads the project (.vcxproj) file for your project.