3

Our solution has 12 projects and any time we get the latest version from TFS, the build breaks and finding the assemblies from nuget (keeping in mind the correct version that worked) uninstall/reinstall/install is very cumbersome.

I was wondering if there is a possibility to run batch file in package manager console.

following are the various commands I am thinking of using.

  1. Generally I clean up all the existing assemblies in the project, so I run the uninstall command for all various packages and for all projects. we have around 13-14 commands as below(i have only few for example) UnInstall-package Newtonsoft.Json; UnInstall-package Microsoft.AspNet.WebHost

  2. i run the individual projects' packages.config which has the assemblies I need with the correct version

for ex:

nuget install[projectpath]\packages.config

I have to run the above command for all the 12 projects.

Is there any way to combine both these operations in a batch file so I just run the batch file and all the clean up and installation are taken care ?

I am new to Package manager console so I am not sure if this is a possibility. I know these can be accomplished using package manager dialog but I am looking at solutions which can be run from the command line

Thanks a lot

0

Your Answer

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

Browse other questions tagged or ask your own question.