Friday, December 18, 2015

Adding alternative NuGet package source in Visual Studio solution

While it's possible to add a new package source to Visual Studio this is not optimal if there are more than one developer or if a build server is used.

An alternative is to add a .nuget folder and within that folder add a NuGet.config file with the following content:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
   <packageSources>
      <add key="NuGet official package source" value="https://nuget.org/api/v2/" />
      <add key="Some other package source" value="some url to the other package source" />
   </packageSources>
   <disabledPackageSources />
   <activePackageSource>
      <!-- this tells that all of them are active -->
      <add key="All" value="(Aggregate source)" />
   </activePackageSource>
</configuration>


Source
https://docs.nuget.org/consume/nuget-config-file

1 comment:

Karen Shepherd said...

I can also add that if some dll file was lost, for some reason, you may upload it with https://fix4dll.com/vcruntime140_dll vcruntime140.dll download. This website can come up with all errors. Just because of that, it keeps a lot of useful dll files for PC. Please take this advice, if you suddenly will need a help.