Jay
Jay

Reputation: 65

Can't edit .csproj file in visual studio 2017 solution explorer

Working on an ASP.NET MVC C# project in Visual Studio 2017. I cannot find .csproj file in my solution explorer.

Tried to right click the project name, and still cannot find "Edit .csproj" item as some posts suggested.

Please help!

Upvotes: 2

Views: 4547

Answers (2)

Martin Ullrich
Martin Ullrich

Reputation: 100751

The project file editing feature (without needing to unload the project) is part of the new CPS-based project system.

In VS 2017, there are two project systems that can be used for .NET Projects - the "legacy" project system and the new CPS-based project system. Which one is used is determined by a selection logic that looks at the project file (at the moment it looks if there is a TargetFramework property defined in the project file itself) or by using a special GUID inside the .sln file.

While it is possible to load classic .NET projects using the new project system, it lacks some capabilities that are available to .NET Framework projects in the legacy one. The most notable ones are designer support for WinForms, WPF and Entity Framework.

It is also not possibly to (productively) use classic ASP.NET projects on the new project system since it will lack all ASP.NET specific features.

So unless a new version of VS uses a new CPS-based project system for classic ASP.NET apps, you will have to unload your project file in order to edit it.

Upvotes: 3

baruchiro
baruchiro

Reputation: 5841

To edit your .csproj file, you must to convert it to the 2017 version.

Try to use this tool to auto convert.

Upvotes: -1

Related Questions