none
Azure 1.3: System.Web.Mvc missing in approot\_WASR_\1

    Question

  • Azure SDK 1.3; one web role, two sites.  Using Visual Studio > right click on the cloud project > Publish > Create Service Package only, then deployed to cloud.
    First site works great, second site gets the error:

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

    Both sites (vs projects) have a reference to System.Web.Mvc and "copy local" set to "true".  Yet -

      In approot\_WASR_\0 I do see System.Web.Mvc.dll (first site)
      In approot\_WASR_\1 I do not see System.Web.Mvc.dll (second site)

    How can I make sure the files are properly copied to  approot\_WASR_\1?

    Tuesday, December 21, 2010 2:52 AM

Answers

  • I found the issue: the second site was not being properly compiled, so the dependent DLLs were never in its "bin" directory.  The problem is that I can only associate the web role with one site - so when I'm building the azure project, only one of the asp.net sites was built (the associated one).  For now I created a post-build event where I call msbuild directly on the second site.
    • Marked as answer by Emmanuel Huna Tuesday, December 21, 2010 7:42 PM
    Tuesday, December 21, 2010 7:42 PM