1

Having worked with composer, npm and different others, developers don't upload dependencies nor binary files to source control. That being said, as my first time working with NuGet packages, I noticed they are being included by default (dlls and exes).

So either there is no command relative to npm install that will download every dependency listed on a file and I have to upload dlls and exe to source control, or this is done by default by visual studio as a mistake. Which one is it? If it does have a way to restore package, which one it is?

PS: I haven't made the first commit yet; waiting to exclude/untrack anything that doesn't need to be on source control

1 Answer 1

1

Generally you do not put NuGet packages in the source control. There is an option to allow NuGet to restore required packages as a part of the build process. Also you can restore those packages manually from the command line or from the UI, similar to npm.

Sign up to request clarification or add additional context in comments.

2 Comments

Thanks, this is the answer I needed. Can you show how set up VS to restore NuGet package on build?
in the solution explorer, right click on References, select Manage NuGet packages. Click on the Settings button bottom left. The from the General tab check Allow NuGet to restore packages...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.