So I have created a NuGet Server via an ASP.Net Web Application following this tutorial: http://nugetserver.net/ which is hosted in IIS. I have placed the files on my D: drive on my server along with my packages.
I get the following error when I navigate to the url:
In case the picture is not clear enough, please see below:
Could not load file or assembly 'NuGet.Server, Version=2.11.1.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
Here is my project's web.config file along with my publishing profile:
My target .NET Framework version is 4.6 but the packages themselves are those of an earlier version of .NET. Could this be the problem? I took the project folder and put it on my physical path on my local machine and it works just fine when I run the project in debug mode. Please see screenshot below:
NOTE: I have to hide the package names due to organizational confidentiality policies.
I am pointing to these package files:
D:\Backup\Dropbox\vox_server_01\nuget\Packages
The reason I am creating this NuGet server is because the existing one is buggy.
Could this be a permissions thing to the users group in IIS? This link Could not load file or assembly 'someProject' or one of its dependencies. Access is denied lead me to that question. Any suggestions on how I can get around this?
If in your Web.config you have a reference to this NuGet.Server package, delete it from the file and try running again. Fairly similar to a BadImageFormatException from a bad reference in the web.config
Came here because of the same problem. Funny enough, I had my solution named "Nuget.Server" as well. Changing my Assembly name (under project properties) fixed it. Renamed it to "NugetServer"
I could not replicate your error, but here are some notes how nuget server problems can be solved:
The packagesPath key in web.config can be left blank, as you are already using the default folder \Packages.
When deploying to the server, you might find an error in the line of
Access to the path server.cache.bin is denied
. Just create a blank file with that name on your server.