How to find out which .NET framework nuget package targets?

Cannot comment on the previous answer, but the targetFramework attribute in packages.config is the .NET version of the project at the time that package was installed. For example, I have two projects that use Newtonsoft.Json 9.0.1, and these are the lines in their respective packages.config files: <package id=”Newtonsoft.Json” version=”9.0.1″ targetFramework=”net452″ /> and <package id=”Newtonsoft.Json” version=”9.0.1″ … 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

NuGet fails: “The underlying connection was closed: An unexpected error occurred on a send”

Try pasting the following into a .reg file and run it. Then try running your NuGet command (no reboot required). Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\v4.0.30319] “SchUseStrongCrypto”=dword:00000001 [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\.NETFramework\v4.0.30319] “SchUseStrongCrypto”=dword:00000001 Ran into this issue because TLS1.2 was not enabled (similar to Tony’s response). Using http does not fix the situation because NuGet redirects to https now … Read more

Create nuget package with multiple DLLs

You’ll run NuGet on a single project (or nuspec file), but it supports pointers to other projects via the file element. This element uses the names of your project’s References, so you avoid having to a) find the location of other project files, and b) copy files to a particular place as a post-build step. … 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

NuGet Assembly outside lib folder

I just ran into this problem. Nuget is expecting a structure that looks like: root – lib – net40 – File1.dll – File2.dll – File3.dll net40 or net20 or net45 as appropriate to your .net version. run nuget pack yourlibrary.nuspec to package it up. That will pack up the dir wholesale and put it in … Read more

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