Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VS Info Message: "Package restore on project open is disabled. Change the npm package management settings in Project Properties ..."

VS 2019 throws this info message: "Package restore on project open is disabled. Change the npm package management settings in Project Properties to enable restore on project open."

enter image description here

But I can't find any specific checkbox or "npm properties tab" in project's properties for this. Could you give me some details on it?

like image 526
Roman Pokrovskij Avatar asked Jul 21 '20 12:07

Roman Pokrovskij


People also ask

Why am I getting a package restore error in Visual Studio?

This error indicates that package restore is disabled in your NuGet configuration. You can change the applicable settings in Visual Studio as described earlier under Quick solution for Visual Studio users.

How do I restore the packages in a project?

Use one of the following methods to restore the packages: If you've moved the project file, edit the file directly to update the package references. After a successful restore, the package should be present in the global-packages folder.

How to enable NuGet package restore in Visual Studio 2015?

You need to restart visual studio after doing step 5. Nuget won't recognize the changes until you do so. As already mentioned by Mike, there is no option 'Enable NuGet Package Restore' in VS2015. You'll have to invoke the restore process manually.

How do I manage npm packages using Visual Studio?

NPM expects the node_modules folder and package.json in the project root. If your app's folder structure is different, you should update your folder structure if you want to manage npm packages using Visual Studio. For existing NPM projects, use the From existing Node.js code solution template.


2 Answers

In Visual Studio 2019 (and 2022), you can find this global setting in:

Tools > Options > Projects and Solutions > Web Package Management > Package Restore

We have not yet found this setting in Project Properties.

like image 61
Kurtbaby Avatar answered Sep 20 '22 20:09

Kurtbaby


Just found it!!! If it helps anyone in the future

img

like image 36
Filipe Revez Avatar answered Sep 19 '22 20:09

Filipe Revez