Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

there is no project.json, global.json ... etc on .NET Core Solution with Visual Studio 2017

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?

like image 278
wallah Avatar asked Mar 14 '17 06:03

wallah


People also ask

Where is global json located?

The . NET SDK looks for a global. json file in the current working directory (which isn't necessarily the same as the project directory) or one of its parent directories.

Can I use .NET Core in Visual Studio 2017?

Visual Studio 2017 Support for . Among the workloads and project types, you can find support for . NET Framework, . NET Core, Mono, and . NET Native for Universal Windows Platform (UWP).

Where is the project json file?

json file is normally located at the root directory of a Node. js project. The name field should explain itself: this is the name of your project. The version field is used by npm to make sure the right version of the package is being installed.

What is global json in .NET Core?

json. The global.json file sits out at the solution directory-level and literally has one of the simplest JSON schemas you will ever see. The default templates generate the following (for the full schema): { "projects": [ "src", "test" ], "sdk": { "version": "1.0.0-preview2-003121" } }

What is global JSON in Visual Studio?

The global.json file allows you to define which .NET SDK version is used when you run .NET CLI commands. Selecting the .NET SDK is independent from specifying the runtime your project targets. The .NET SDK version indicates which versions of the .NET CLI is used.

Is there a project JSON file for a tutorial?

There is no project.JSON anymore. But there should be a solution since you just created one 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.

Is there a global JSON file in the core stack?

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. global.json is still in the stack, but neutered to only defining the SDK version. thank you for reference pages !

What happened to project JSON in net core stack?

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. global.json is still in the stack, but neutered to only defining the SDK version.


2 Answers

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.

like image 58
Sharky Avatar answered Oct 22 '22 08:10

Sharky


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.

like image 23
Soren Avatar answered Oct 22 '22 06:10

Soren