NuGet Package Restore Not Working

Note you can force package restore to execute by running the following commands in the nuget package manager console Update-Package -Reinstall Forces re-installation of everything in the solution. Update-Package -Reinstall -ProjectName myProj Forces re-installation of everything in the myProj project. Note: This is the nuclear option. When using this command you may not get the … Read more

nuget spec dependencies, get latest version?

As of Nuget 2.8 you can add the following attribute to your nuget.config <configuration> <config> <add key=”dependencyversion” value=”Highest” /> </config> </configuration> When resolving your packages, the latest version of that package will be resolved. Other attributes include HighestMinor, HighestPatch and lowest (based on semantic versioning) Source: http://docs.nuget.org/docs/release-notes/nuget-2.8

Visual Studio/C#: Nuget Unable to connect to remote server

Clearing HTTP_PROXY worked for me. Let me fix it myself Important: This section, method, or task contains steps that tell you how to modify the registry. However, serious problems might occur if you modify the registry incorrectly. Therefore, make sure that you follow these steps carefully. For added protection, back up the registry before you … Read more

Download old version of package with NuGet

Bring up the Package Manager Console in Visual Studio – it’s in Tools / NuGet Package Manager / Package Manager Console. Then run the Install-Package command: Install-Package Common.Logging -Version 1.2.0 See the command reference for details. Edit: In order to list versions of a package you can use the Get-Package command with the remote argument … Read more

Setting up a common nuget packages folder for all solutions when some projects are included in multiple solutions

I have a similar situation with external and internal package sources with projects referenced in more than one solution. I just got this working with one of our code bases today and it seems to be working with the developer workstations and our build server. The below process has this scenario in mind (although it … Read more

Add native files from NuGet package to project output directory

Using the Copy target in the targets file to copy required libraries won’t copy those files to other projects which reference the project, resulting in a DllNotFoundException. This can be done with a much simpler targets file though, using a None element, as MSBuild will copy all None files to referencing projects. <Project xmlns=”http://schemas.microsoft.com/developer/msbuild/2003″> <ItemGroup> … Read more