I tried to upload my web site to a server. It was working fine with my local host, so I uploaded everything in my localhost wwwroot
folder to the server and cha
I had a similar problem. NuGet showed the package successfully installed, but the reference was not added to my project.
Running <PM> Install-Package Microsoft.Web.InfraStructure
also didn't help as the package manager kept saying it's already installed
I finally added it manually by editing the csproj file and adding these lines:
<Reference Include="Microsoft.Web.Infrastructure">
<HintPath>..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll</HintPath>
<Private>True</Private>
</Reference>
That solved the problem.
I don't know what happened with my project but it referenced the wrong path to the DLL. Nuget installed it properly and it was indeed on my file system along with the other packages but just referenced incorrectly.
The packages
folder exists two directories up from my project and it was only going up one by starting the path with ..\packages\
. I changed the path to start with ..\..\packages\
and it fixed my problem.