0

I have a Website project (not a Web application) on Visual Studio. I have added a couple of libraries thorugh NuGet, so in my bin folder I got the refresh files and NuGet created a packages folder where the actual dll files are stored.

In my dev environment I have no problems and everything works fine; but when I deploy to the production server I got the error message that the libraries could not be found.

So what I have been doing is removing the refresh files from the server and manually add the dll to the bin folder, but I mean then what is the point of having the refresh files? or does this works only when using a web application project?

roma8716
  • 161
  • 2
  • 3
  • 7
  • possible duplicate of [link](http://stackoverflow.com/questions/2947017/reference-dll-not-copying-to-bin-with-deployment-project-causing-error) – Seabizkit Oct 08 '15 at 18:11
  • That one is related to a web application project mine is about a web site project. – roma8716 Oct 21 '15 at 22:15
  • 1.VS version? 2. Framework (Web site project) version/release date. 3.Perhaps include screen shot of the deployment method. or the output windows when publishing. 4. include any post build events – Seabizkit Oct 22 '15 at 06:13
  • Also include your [project name].csproj file, try and remove the content which is just references to files. or just post the whole thing and I'll remove them with an edit. – Seabizkit Oct 22 '15 at 06:21

1 Answers1

0

The refress files, if you open them with a text editor, you see that they have inside a directory, on where they going to find the library and compare it with a new version.

So when you install on your computer a library, usually is use some common place that is installed, then on your projects they just reference to that library, and if you update it (on your computer) the dll on the bin directory is also updated.

This is not happens for the server, on the server you need to manual add the update dlls on your bin. And not happens because as you understand the refresh file is just look some directory on your local machine...

One example, on the bin you can find

HtmlAgilityPack.dll
HtmlAgilityPack.dll.refresh

and inside the HtmlAgilityPack.dll.refresh you read :

..\packages\HtmlAgilityPack.1.4.9\lib\Net45\HtmlAgilityPack.dll

and this is for the local machine reference, not for the server.

Aristos
  • 66,005
  • 16
  • 114
  • 150
  • Yes, I have also added the "packages" folder to the project on the server on the same relative Path. But unless I add the dll to the bin folder I got the error. – roma8716 Oct 08 '15 at 20:05