2
votes

I have an application using the Azure 1.4 SDK (previously 1.3 with same problem). If I try and deploy the application as Full IIS I get the following error in Intellitrace logs.

System.TypeLoadException: Unable to load the role entry point due to the following exceptions: System.IO.FileLoadException: Could not load the file or assembly 'System.Web.Mvc, Version=2.0.0.0..blah..The located assemblies manifest does not match the assembly reference.

The web site is using ASP.NET MVC 3, not version 2. It seems the Full IIS is looking for the wrong versions of the dll's. I have set the MVC dll's in the project to Copy Local so they should be deployed in the bin directory.

If I deploy the site as a legacy hosted web core by commenting out the sections in the ServiceDefinition.csdef it all deploys and works fine.

1
Did you ever resolve this? I get the same problem when I start with a brand new MVC 3 (Jun2 2012 Azure tools installed) release. - Scott McKenzie

1 Answers

1
votes

This seems like it was an application that may have been created as an MVC2 application, and then later you migrated it to MVC3, correct? The reason it is failing is that you have both MVC2 and MVC3 installed on your machine, and when you're running it locally, your application is loading MVC2 out of the GAC. When you deploy it to Azure it can't find MVC 2, since MVC is not installed on the base Azure images that you get when you create a new Deployment.

I would check through my config files and look very closely for any references to MVC 2.0. Take a look at a reference like this and make sure you haven't overlooked any steps. You may have neglected to change the project type guid, or missed one of the config files.