Skip to main content


Showing posts from November, 2018

Get a new project build up quickly with NuGet Files

One of the things I hate the most is standing up a new project in Visual Studio and adding all the NuGet packages I need. Especially, when it comes to Unit Test projects or the like where I know I have a base set of NuGet files I will always need. Sadly you can't just update the packages.json file for the project and hit restore. There is, however, a way that is almost as straightforward.

Enter the "Update-Package -Reinstall" command. This command reinstalls all the packages in a solution, so, you probably don't want to use this as it will probably blow away some setup you want to keep. If all you want to do is have a project pull in all the NuGet assemblies you just added to a package.json in a project just do "Update-Package -Reinstall -ProjectName <project name>".

Now we are in busy. We can put all our standard NuGet assemblies in the package.json file run this command and our project now has all the base level assemblies we were after. That is a l…