52

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?

1
  • 3
    There is no project.JSON anymore. But there should be a solution since you just created one Mar 14, 2017 at 7:07

2 Answers 2

82

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.

2
  • Oh ! I'll remember that ! and, plus in my solution, there is also no *.csproj file... I can't find... can you help me find it??
    – wallah
    Mar 14, 2017 at 7:31
  • 2
    @wallah look in the actual directory via windows explorer, not from within visual studio.
    – Sharky
    Mar 14, 2017 at 7:48
30

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.

4
  • Its a bad news :(
    – nim
    Dec 28, 2017 at 17:44
  • 5
    Correction: global.json is still in the stack, but neutered to only defining the SDK version.
    – Stajs
    Jan 10, 2018 at 1:26
  • @Stajs, After upgrading to v15.4.4 of CLI tools you can defined SDK version in a Project property group : <PropertyGroup> <TargetFramework>netcoreapp2.0</TargetFramework> <RuntimeFrameworkVersion>2.0.3</RuntimeFrameworkVersion> </PropertyGroup>
    – Soren
    Jan 17, 2018 at 13:55
  • 1
    @Soren, the way I read the docs, neither of those properties are the SDK version. I'm pretty sure everyone understands <TargetFramework> by now. <RuntimeFrameworkVersion> is the runtime and independent of SDK, e.g. SDK 2.1.3 includes runtime 2.0.4. Potentially helpful SO and GitHub discussions.
    – Stajs
    Jan 18, 2018 at 9:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.