I make a project by
File -> New -> Project -> Visual C# -> Web -> ASP.NET Core Web Application (.NET Core) -> Empty -> OK
But there is no solution and src directory and also no project.json and web.config etc.
I reference a book that uses Visual Studio 2015. The book’s example has all files and directories I told. But I don’t(I’m using VS 2017 since I can’t find .NET Core for VS 2015).
How can I make those files and directories ??
Do I make these by manually?
Answers:
Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.
Method 1
The .NET Core was changing its internals with a slightly fast pace (although it seems it has settled down now), thus making many of the tutorials out there obsolete. Since mid-2016, the project.json has been dumped in favor of “your-app-name”.csproj file.
If you are following a tutorial or a book, then for anything you are supposed to write in the project.json, you must now write it in the csproj file with a slightly different format.
If I have to mess with project.json when following tutorials, I use this official migration guide.
Method 2
The .NET Core (and other teams) have decided to drop project.json and go back to MSBuild and *.csproj.
So there is no project.json nor global.json in .net core stack any more.
The alternative for project.json is *.csproj and for global.json is *.sln.
Old csproj to new csproj: Visual Studio 2017 upgrade guide
for more info
Update: (based on Stajs comment)
global.json is still in the stack, but neutered to only defining the SDK version.
All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0