开发者

CruiseControl.NET, VS 2010 and MVC 3 -- build error

开发者 https://www.devze.com 2023-02-15 07:59 出处:网络
Using the latest stable of CC.NET (new to it) and VS 2010. I have defined project files for simple C# projects (4 开发者_StackOverflowin total) and one MVC Project.

Using the latest stable of CC.NET (new to it) and VS 2010.

I have defined project files for simple C# projects (4 开发者_StackOverflowin total) and one MVC Project.

The C# projects all compile correctly; however, the MVC3 project refuses to build.

I receive the following error in CC.NET:

error MSB4019: The imported project "C:\Program Files\MSBuild\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" was not found. Confirm that the path in the declaration is correct, and that the file exists on disk.

After searching around and finding This link and This other link (both referring to older versions of Visual Studio), it seemed that the general solution was to copy these files from that directory to the solution directory, add them to the solution with visual studio, and then change this line in the .csproj file:

<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" />

To this:

  <Import Project="$(SolutionDir)\Microsoft.WebApplication.targets" />

However, this technique that worked for other VS Versions produces a different result in VS 2010: I receive the .NET Project upgrade wizard, as if upgrading the project from an old version of .NET. This strangeness is compounded by the fact that even if I do an undo and re-save the file exactly as it was, I receive the same message. It's as if the project has been marked dirty or something else has changed somehow.

Anyone have any ideas? This seems like it should be easier, but I can't seem to find another resource on it anywhere. Hoping StackOverflow will come through per usual. :)

Thanks in advance for any help!


The .targets file for v10.0 also has an assembly in the install folder - Microsoft.WebApplication.Build.Tasks.dll. Did you copy that file over as well? That will likely be necessary for the .targets file to work correctly, though that may not be the cause of your problem.


It sounds like CC.Net isn't getting a proper reference to the msbuild executables.

Trying installing both of these on your build server (that's who I was able to get past that exact error).

Links :

Windows SDK .Net 4

VS2010 Integrated Shell

0

精彩评论

暂无评论...
验证码 换一张
取 消