I am doing c# programming course (building ASP.NET Core application) right now that is almost 1year old. The guy created web API application and class libraries and in those projects there was project.JSON files. I know that instead of the project.json file there is a .csproj file now but when I create my own project in VS 2017 asp.net core there is no such a file like .csproj. I need to set dependencies but I don't know how without.csproj file. Where can I find this file?
Visual Studio doesn't display the file since the project itself is the csproj file.
You can right-click on it and select the Edit …
action to edit the csproj file. You can also use the NuGet package manager to edit dependencies.
Previously (VS 2015), the project that VS used was an .xproj
file and the project.json
was displayed because it was "part of" that project.
As @Martin said in his answer
Visual Studio doesn't display the file since the project itself is the csproj file.
In case the Edit
is not shown when you right-click on the project in the Solution explorer,you can:
Unload Project
Edit ProjectName.csproj
Reload Project
文件 > 添加 > 新项目(当您的解决方案 .sln 被选中时)
You can edit the .csproj
or .vbproj
file by the following ways:
Go to the project folder. Inside this folder, there is another folder which has the same name as the project. The .csproj
or .vbproj
file can be found inside this folder. For example: C:\\\\ConsoleApp1\\ConsoleApp1\\ConsoleApp1.csproj
Right click the project in Visual Studio Solution Explorer. You can see the option Edit project file
. Using this option will open the project file inside Visual Studio editor.
Right click the project in Visual Studio Solution Explorer. Select Unload Project
. Right click the project again in the Solution Explorer. You can see the Edit Project_Name.csproj file option. Using this option will open the project file inside Visual Studio editor. After editing reload the project in Solution Explorer.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.