I keep running into problems creating a Windows Azure Cloud Service and trying to add an MVC 2 (which ends up being an MVC 3) Web Role. Initially it says MVC 2 but I was really hoping to get an MVC 3 app. Then it says that it will be an MVC 3 Web Role. Once I’ve gone through the steps, I get the following error:
Cannot add the item because the item
to add it to is not a solution folder
or the solution.
This happens no matter what I do to add it. Worker Role, standard Web Role work fine. Only the MVC 3 Web Role fails. Is there something special that I need to do to get this to work? Or how do I get started making an MVC 3 Azure app and combining it with a Worker Role?
SDK 1.3 will fix this (that using the MVC web role template when MVC 3 is installed doesn’t work). SDK 1.3 ships later this year.
Yes, for manually adding an MVC 3 web role, I think it works to create a new MVC 3 web app, mark the MVC binaries as “copy local” (since they’re not GAC’d in the cloud), and then “add existing web role in solution” to hook it up as a web role for your project. (What I described should be exactly what Jim’s talking about in that blog post.)