Error doing an MSBuild on a CLR Storedprocedure project on Build Server

Posted by CraftyFella on Stack Overflow See other posts from Stack Overflow or by CraftyFella
Published on 2010-02-15T16:44:33Z Indexed on 2010/03/19 4:11 UTC
Read the original article Hit count: 376

Hi,

When building a CLR Storedprocedure Project using MSBuild on our build server (Team City) we're getting the following error:

error MSB4019: The imported project "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\SqlServer.targets" was not found. Confirm that the path in the declaration is correct, and that the file exists on disk

I've checked to see if the file exists on disk and sure enough it doesn't. I've checked on my own machine and it does exist.

I don't really want to start copying over files manually to the build server.

Here's the line from the csproj file which is being imported to the proj file:

  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
  <Import Project="$(MSBuildToolsPath)\SqlServer.targets" />

Here's the line from the proj file which is begin run by our Team City Server:

<Import Project="..\$(ProjectName).csproj"/>

My question is really:

Where does this file comes from? Is it part of the Visual Studio install for example.. Or is there some re-distribution package somewhere to allow me to compile this project on our build server?

Thanks

BTW.. if i just copy the file onto the Build server it does actually work.

Dave

© Stack Overflow or respective owner

Related posts about msbuild

Related posts about import