问题描述,一个asp.net的项目,原来是用VS2005开发的,目前需要修改,但是新机器上没装VS,也不方便装
百度了个“一行命令搞定没有Visual Studio2003(2005)时的手动编译命令”%SYSTEMROOT%\Microsoft.NET\Framework\v2.0.50727\MSBuild.exe YourSolutionName.sln /t:Rebuild /p:Configuration=Release /l:FileLogger,Microsoft.Build.Engine;logfile=Build.log确实好用,不过出现一个问题
error MSB4019: The imported project "C:\Program Files\MSBuild\Microsoft\VisualStudio\v8.0\WebApplications\Microsoft.WebApplication.targets" was not found. 又百度了一下,发现一段英文In the last article Build and deploy web application project using NANT script i discusses how various options and configurations can be set on command line to overrride settings in Microsoft.WebAppliction.targets file. Well that worked perfectly fine. I was configuring a new build server for doing automated builds of the web application. I started getting following build error. error MSB4019: The imported project "C:\ProgramFiles\MSBuild\Microsoft\VisualStudio\v8.0\WebApplications\Microsoft.WebApplication.targets" was not found. Confirm that the path in the <Import>declaration is correct, and that the file exists on disk 
Well this project was building fine on older machine. There are two options to fix this error. Install VS2005 SPI on the build machine. Well thats because Web Application Project (WAP) model was made part of SPI1 release. So you are going to need it. 
If you do not like installing VS IDE on build machine, then your option is to copy Microsoft.WebApplication.targets file from your older build machine or for that matter any machine that has VS2005 SP1 installed, to this machine at exact location as specified in error message. 
That should take care of your build problems. 大概是需要Microsoft.WebApplication.targets这个东西。
装了VS2005 SP1的就有
路径应该是C:\ProgramFiles\MSBuild\Microsoft\VisualStudio\v8.0\WebApplications\Microsoft.WebApplication.targets麻烦谁有这个文件的直接发到[email protected]
加上你回复的ID,我好给分。多谢