Package.json in ASP.NET Core 1.0

I just created a new ASP.NET Core 1.0 application targeting .NET Framework 4.6.1, and installed several packages NuGet, but I do not see the file package.json at the root of my project.

Is the new ASP.NET Core 1.0 project does not use package.json? If so, where we keep the information about the package?

+5
source share
1 answer

So, perhaps there is confusion between Nuget packages and npm? Nuget packages typically provide .net assemblies for use on a server, where either javascript client libraries (boot or otherwise) and / or node server functions (e.g. express) are provided as npm packages.

Typically, in a project with a point network kernel you do not use node server (you are using dot net one), so instead of using npm package management, which then returns both client and server-side JS-ins, instead of the default templates instead of Bower used only client modules.

Nuget Packages: In earlier versions of the details of the Nuget package for the network core were in the file project.json , but are now back in the file .csproj . If you look at the decision in the full version of Visual Studio, you will not see the file .csproj , because VS likes to control editing the project configuration, so in this case you would normally use the Package Manager Console (PMC) or in the menu "Management package set" to update information about what packages Nuget uses your project.

Bower client-side Javascript: If you look in the "Dependencies" in the browser in VS solutions, you will find a folder Bower. If you click on the right mouse button and select "Manage Packages Bower", you will see the Bower Package Manager (or you can just edit the file in the project folder Bower.json, although, again, you will not see this in the browser in VS-making) :

Bower Package Manager

NPM: If you want to use instead of npm /, just manually create a file package.json in the project, and then create a project, you will find a folder node_modules, added to your solution, and that there is now npm folder in the Solution Explorer under "Dependencies":

enter image description here

If you right-click on the icon npm folder will appear the option "Restore the packages", but in reality it does not work for me when I clicked on it, and if that happens, I'm not sure that it is automatically included in, or if require additional wiring.

If you need an example of project-core asp, using npm instead bower, you can try one of the excellent templates SPA, generated by Microsoft Tools JavaScriptServices .

+1
source

All Articles