I was trying to setup our new build server today and received this error:
error MSB4019: the imported project <Path to .net framework here>\Microsoft.CompactFramework.CSharp.targets was not found.
At first I was a bit confused as to what was going one, how could you not find my targets file? And of course this was working just fine on my laptop (always works on you machine), but not the build server.
Before I dive into the solution for this, I would like to pause to review what was on the build box.
Build Server: Team City
Build Script: NAnt
Build Action: MSBuild
Software Installed: .Net 2.0 SDK, .Net 3.5 SDK, .Net 3.5 Compact Framework SDK, need tools for build. NO Visual Studio IDE's
Onto the Solution:
Ok, now that we know what the server setup was like, lets get onto the solution.
For what ever reason my build server did not contain any .targets files for the compact framework. These files are normally found in your c:\Windows\Microsoft.Net\Framework\v3.5 folder, but mine were missing. The easiest way to fix this issue is to grab these files off of the server/laptop that has them and copy/paste them onto the server that does not. This worked just fine for me.
Note: My issue was with missing targets for the compact framework, but have heard reports of the same thing happening with other .targets files.
Hope this helps someone.
Till next time,
09-19-2008 7:19 AM