Reputation: 1363
I cannot install the NuGet package System.IdentityModel.Tokens.Jwt (.Net JWT Handler) into my project. If i try to install the package with NuGet, it will install into the root of the solution only (a .nuget folder is created in the root of the solution). I need to install the package in my project, not the solution.
Why would this happen? I tried passing in the project name to the Install-Package command in the Package Manager Console, and that looks like it installs correctly but no references are added to my project and the packages.config file is not updated.
My project is currently referencing .Net 4.5.1 and I have also tried with .Net 4.5.
The package I am trying to install is here:
System.IdentityModel.Tokens.Jwt
Upvotes: 0
Views: 4879
Reputation: 592
The package System.IdentityModel.Tokens.Jwt 3.0.1 has some problems: the file System.IdentityModel.Tokens.Jwt.dll
and System.IdentityModel.Tokens.Jwt.Xml
should be put in directory lib\net45
, but they are put in the root directory instead. This causes NuGet to think the package is a solution level package, and will not install the package into a project.
This problem was fixed in System.IdentityModel.Tokens.Jwt 3.0.2
Upvotes: 0
Reputation: 82
I'm having the same issue. I was trying to install the package as said in this article http://msdn.microsoft.com/en-us/library/dn205064(v=vs.110).aspx So, I look into the package history and finally I installed the previous package http://www.nuget.org/packages/System.IdentityModel.Tokens.Jwt/3.0.0
It works fine for me.
Upvotes: 3
Reputation: 2605
With NuGet, you can now specify the directory the packages are installed in.
http://docs.nuget.org/docs/release-notes/nuget-2.1
Specify ‘packages’ Folder Location
In the past, NuGet has managed a solution’s packages from a known ‘packages’ folder found beneath the solution root directory. For development teams that have many different solutions which have NuGet packages installed, this can result in the same package being installed in many different places on the file system. NuGet 2.1 provides more granular control over the location of the packages folder via the ‘repositoryPath’ element in the NuGet.config file. Building on the previous example of hierarchical nuget.config support, assume that we wish to have all projects under C:\myteam\ share the same packages folder. To accomplish this, simply add the following entry to C:\myteam\nuget.config.
Upvotes: 0