views:

365

answers:

2

Im testing out the new MVC2 framework, and there I also have tried out the new areas functionality.

Im following this example:
Walkthrough: Creating an ASP.NET MVC Areas Application Using Multiple Projects

Everything builds and runs okay locally, but when I try to commit to my repository and the use the build automation engine Team City I get a build error.

error MSB4062: The "Microsoft.Web.Mvc.Build.CreateAreaManifest" task could not be loaded from the assembly Microsoft.Web.Mvc.Build, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35. Could not load file or assembly 'Microsoft.Web.Mvc.Build, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified. Confirm that the declaration is correct, and that the assembly and all its dependencies are available.

I have built other MVC2 applications on my Team City server and it worked out fine, but when I added the whole "areas" thing it just could not get it right.

Any ideas?

+1  A: 

I sounds like Microsoft.Web.Mvc.Build isn't GAC'd on the server, this happens automatically when MVC is installed, perhaps it wasn't installed or at least the RC version wasn't?

EDIT: From a comment at http://haacked.com/archive/2010/01/12/ambiguous-controller-names.aspx, someone asks:

On a somewhat related note, where has the Microsoft.Web.Mvc.Build.dll assembly gone from the MVC2 RC release.

It was present in the Preview 2 release (within VS2008 Tools installer) but is no longer present in RC. Is this no longer supported?

... and Phil Haack answers:

@Becker that's correct, it's been moved to the MVC Futures assembly.

INinjaAndy
Yes, this looks to be correct. I now tried to install VS2010 Beta on the server and now the solution got bulit correctly. Guess the VS2010 installer added something the MVC2 installer did not add. But it is not a good thing to have VS installed on my server...
Martin
A: 

Well... maby it's been moved, but there is no Microsoft.MVC.build assembly in futures that are available to download from codeplex ! So it does not resolve the issue.

I've found a solution and posted it here: http://stackoverflow.com/questions/2005018/asp-net-mvc-2-areas-and-afterbuildcompiler/2096884#2096884

Sorry that I've double posted it, but I was looking 2 days for a solution, so maby someone will save some time.

Jarek