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

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

How to install JSON.NET using NuGet?

You can do this a couple of ways. Via the “Solution Explorer” Simply right-click the “References” folder and select “Manage NuGet Packages…” Once that window comes up click on the option labeled “Online” in the left most part of the dialog. Then in the search bar in the upper right type “json.net” Click “Install” and … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)