This project is read-only.

Deployment: Bin Deployment has GAC dependencies?

Apr 17, 2012 at 9:17 PM
Edited Apr 17, 2012 at 9:18 PM

So I pushed one of my applications to a new staging server at my ISP today to test deployment and running the application in a virgin environment. I have the application running locally using a recent MVC 4 build.

However upon deploying on the server and trying to run the app I get:

Could not load file or assembly 'System.Web.WebPages.Deployment, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.

This assembly isn't part of the project so it's not bin deployed, but it works on my local system, not on the remote which doesn't have an MVC 4 installation.

Should this assembly (and possibly others) be added to the default project template so that bin deployment works?

+++ Rick ---

Apr 17, 2012 at 9:55 PM

Ah, yes, that file has to be deployed. Seems like a bug. I'll take a look and file a bug as appropriate to get it fixed.

Apr 17, 2012 at 10:09 PM
Edited Apr 17, 2012 at 10:09 PM

Confirmed - I redeployed with the assembly added (and copied local) and app ran fine.

Question why is there a dependency on the Deployment assembly?

Apr 17, 2012 at 10:14 PM

Yup. Just checked using a new machine with Beta installed (and one with the next update to VS11 installed) and both had references to that file and deployed it just fine. Is it possible you have some weird combination of tooling that doesn't match the build of Web Pages you have installed to your machine (just spit-balling here) that would cause the NuGet install for the Web Pages package to fail and not add the reference? Need more repro steps. ;)

Apr 17, 2012 at 10:30 PM

I was only missing the Deployment assembly. everything else was there. This install is with the Beta code and was a brand new project created. Nothing else weird about it unless I somehow deleted it by accident.

I'll create a new project and double check.

Apr 17, 2012 at 11:22 PM

Ok so I double checked again after a new install and it does appear like the assembly shows up. So sounds like a false alarm. Still not sure how and when it got removed. I checked my project history and it looks like indeed it wasn't installed initially - first checkin doesn't have it. <shrug>

Anyway, nothing to see here, move along :-)

Thanks Erik,

+++ Rick ---

Apr 17, 2012 at 11:34 PM

Maybe some one-off NuGet failure when it initially setup the project and installed all the packages? Glad it's working for you now though. :) You're welcome.