I have a Web API project that has a dependency on System.Web.Http.WebHost
and in my project I have set Copy Local = True on that reference, and the version (in this case) is 5.2.3.0.
When I publish the project to the server via web deploy, an older version of this assembly is published (5.2.2.x). This seems to only affect certain people when they publish and not others.
We've run into the same issue with other assemblies in other projects, so this is meant as an example. I can add the affected assembly to the server's GAC or something so it doesn't die when published by a user so affected, but I'd like to know how this happens and how it might be avoided.
In my case, I found that the wrong version of Autofac was being deployed, even though the correct version was referenced and was placed into the bin folder while running locally. I re-installed the NuGet package and even that didn't work.
Ultimately, I found the obj\Release\Package\PackageTmp\bin
directory (within the project directory) contained the outdated version, and nothing I did would cause it to update. Simply deleting the directory and letting it regenerate solved the issue.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With