System.Web.WebPages.Deployment Error
Hi,
I'm currently trying to deploy a build from a BitBucket -> AppVeyor (Web Deploy) -> Azure Website (Web Deploy) workstream, and I'm getting the following error on site once built and loaded:
Could not load file or assembly 'System.Web.WebPages.Deployment, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
From searching around the web, I get the feeling that the following in web.config may be the culprit, but I'm far from an MSBuild expert:
<dependentAssembly>
<assemblyIdentity name="System.Web.WebPages" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="1.0.0.0-2.0.0.0" newVersion="2.0.0.0" />
</dependentAssembly>
Has anyone seen this before and could provide some pointers to help me become unstuck?
Thanks,
Henry
Comments are currently closed for this discussion. You can start a new one.
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
Support Staff 1 Posted by Feodor Fitsner on 22 Jul, 2014 05:22 AM
Hi Henry,
Make sure you have
System.Web.WebPages.Deployment.dll
in bin folder of your app.2 Posted by info on 22 Jul, 2014 09:05 PM
Hi Feodor,
Thanks for your reply : you're suggestion fixed our issue. I just created a /Lib directory and put the missing DLLs in there and referenced those in the project, making sure to set Copy Local = True.
One question as a follow on to this:
Is there a recommended way to use some sort of test to detect errors such as missing assemblies etc that are only required at runtime?
In this case instance, would precompilation of the razor views have helped create a failing build, thus flagging the issue earlier?
Any resources/ideas you can point me to would be much appreciated.
Thanks,
Henry
Support Staff 3 Posted by Feodor Fitsner on 23 Jul, 2014 04:44 AM
Great, thanks for the update!
My advice would be using NuGet to manage project dependencies. This case it's easier to see what's required and you don't to keep assemblies in the repository.
4 Posted by info on 23 Jul, 2014 06:40 AM
Thanks Feodor :)
I use Nuget for all other dependencies, but hadn't considered using it for what I thought were mostly GAC dependencies these days available on most machines (MVC etc). I'll use Nuget in the future though to manage how the dependencies are added and restored for framework dependencies like MVC.
Please feel free to close out this ticket or mark as resolved.
Thanks,
H
info closed this discussion on 16 Jan, 2015 12:47 PM.