Can't get generator to run from build machine

Dec 14, 2011 at 8:21 PM

This works fine on my machine.

I am using the RazorGenerator.Msbuild package. Building on the build machine fails with:
  C:\Builds\10\OSS\Current\Sources\Current\Billing\Web\packages\RazorGenerator.MsBuild.1.3.1\tools\RazorGenerator.targets (21): An error occurred creating the configuration section handler for system.web.webPages.razor/pages: Could not load file or assembly 'System.Web.WebPages.Razor, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified. (C:\Builds\10\OSS\Current\Sources\Current\Billing\Web\src\CustomerPortal.Web\Views\web.config line 9)


I have tried adding any reference assemblies to the tools folder:

  Directory: C:\code\web\packages\RazorGenerator.MsBuild.1.3.1\tools

Mode                LastWriteTime     Length Name----                -------------     ------ -----a---        12/14/2011   1:16 PM      45416 Microsoft.Web.Infrastructure.dll-a---        12/14/2011   2:36 PM      35328
RazorGenerator.Core.dll-a---        12/14/2011   1:16 PM      35328
RazorGenerator.MsBuild.dll-a---        12/14/2011   2:36 PM      15872
RazorGenerator.targets-a---        12/14/2011   1:16 PM     445280
System.Web.Mvc.dll-a---          1/5/2011   3:45 PM     178536
System.Web.Razor.dll-a---          1/5/2011   3:45 PM     136552
System.Web.WebPages.dll-a---          1/5/2011   3:45 PM      37224


Has anyone else gotten this to work?

Dec 16, 2011 at 4:16 PM

I realize this is not the best practice, but how about installing MVC 3 on the CI machine? I use the msbuild task on one of our projects where the CI which has Mvc 3\ Web Pages installed on the server, and it works well.

Dec 16, 2011 at 4:23 PM

Was afraid you'd say that :)

I will try this route. Thanks

Dec 16, 2011 at 9:54 PM

Out of curiosity, what happens if you place the *Razor.* files next to MsBuild.exe? Might be that the CLR is looking for the assemblies next to the assembly that loaded it.