本例是在用VS2008打开项目是报错 未找到C:\Program Files\MSBuild\Microsoft\VisualStudio\V10.0

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\v10.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.

Keep in mind that my development machine (from where I queue my build) is different than my TFS build machine.

So, there are two solution to this problem:

  1. Install Visual Studio 2010 (or the same version as in development machine) in your TFS server.
  2. Copy the “Microsoft.WebApplication.targets” from development machine file to TFS build machine.
The “Microsoft.WebApplications.targets” file is normally located under: “C:\Program Files\MSBuild\Microsoft\VisualStudio\v10.0\WebApplications”. The file will need to be copied to same path in TFS build machine.

That should take care of your build problems.

更详细的解答可以见:stackoverflow  或者http://stack247.wordpress.com/2011/08/29/the-imported-project-microsoft-webapplications-targets-was-not-found/

用VS不同版本打开项目,报错:MS Build Error MSB4019: Microsoft.WebApplication.targets was not found的更多相关文章

  1. 替换openjdk的版本时遇到报错Transaction check error

    x想要使用jmap对jvm内存进行排查问题,但是默认安装的openjdk包中并不带有这个命令,需要新升级到新版本才有 而在安装新的版本时,遇到报错: :   file /usr/lib64/libns ...

  2. JMeter 5.4 打开测试计划 报错:Unexpected error

    保存测试计划名为: 新增用户.jmx 关闭 JMeter 再次打开JMeter : 双击 jmeter.bat JMeter 启动 打开 新增用户.jmx Unexpected error. 看上图 ...

  3. idea中编译项目报错 java: javacTask: 源版本 1.8 需要目标版本 1.8

    问题如上面所叙: > idea中编译项目报错 java: javacTask: 源版本 1.8 需要目标版本 1.8 解决方案: > Setting->Compiler->Ja ...

  4. 新导入的eclipse项目报错,找不到java包,找不到web.xml文件报错。

    新导入的项目可能会出现报错,特别是web项目.我这里提供一种解决方法: 1.右击项目,选择“属性” 2.选择 Resource->java build path->libraries 图中 ...

  5. tomcat7 启动项目报错 java.lang.NoSuchMethodError: javax.servlet.ServletContext.getSessionCookieConfig()

    JDK版本:jdk1.8.0_77 Tomcat 版本:apache-tomcat-7.0.47 异常重现步骤: 1.完成项目部署 2.启动Tomcat 异常头部信息:java.lang.NoSuch ...

  6. STS新建的maven项目报错问题

    STS新建的maven项目报错问题 解决方法:打开pom.xml文件添加 <dependency> <groupId>javax.servlet</groupId> ...

  7. 打开eclipse报错:发现了以元素 'd:skin' 开头的无效内容。此处不应含有子元素。

    [错误] 打开eclipse报错:发现了以元素 ‘d:skin’ 开头的无效内容.此处不应含有子元素. [具体报错信息] Error parsing D:\Android-sdks\system-im ...

  8. 项目报错-无法解析类型 XXXX.xx 从必需的 .class 文件间接引用了它

    这个编译错误有几个原因 1.jdk版本问题 要是报错是某些java包里的东西那就可以肯定是jdk版本的问题, 比如无法解析类型java.lang.Object,无法解析类型java.lang.Char ...

  9. eclipse发布项目报错:Multiple Contexts hava a path of “/xxx“

    你的位置:首页 > Java编程 > eclipse发布项目报错:Multiple Contexts hava a path of “/xxx“ eclipse发布项目报错:Multipl ...

随机推荐

  1. MySQL 添加外键约束,不检查现有数据

    这可能是MySQL在InnoDB中设置了foreign key关联,造成无法更新或删除数据.可以通过设置FOREIGN_KEY_CHECKS变量来避免这种情况. SET FOREIGN_KEY_CHE ...

  2. Web服务(Web Service)相关概念

    1.概述 Web服务技术(Web Service )是一种面向服务的架构技术,通过标准的Web协议提供服务,保证不同平台的应用服务能够互相操作. 因为Web服务公布的数据基于XML格式和 SOAP协议 ...

  3. Redis集群搭建问题汇总

    环境 centos7+redis3.2.12 redis requires Ruby version >= 2.2.2. redis官方提供了redis-trib.rb工具,但是在使用之前 需要 ...

  4. Building and running Node.js for Android

    转自: http://www.goland.org/nodejsonandroid/ Building and running Node.js for Android October 14, 2014 ...

  5. js基本知识2

    一.提示框 1. 弹出警示框 alert(); window.alert(); window 窗口 2. 控制台输出 console.log() 3. 文档打印 document 文档 documen ...

  6. Linux之目录的操作(创建、移动、改名、删除、复制)

    .创建 mkdir [dirname] //创建单个目录 mkdir -p newdir1/newdir2/newdir3 //递归创建多级目录 mkdir dir1/dir2/newdir3 //在 ...

  7. dp之多重背包hdu1114

    题目很水,不多说......... #include<stdio.h> int main() { long t,n,m,a,i,j,dp[10005],vol[505],jizhi[505 ...

  8. .NET Standard - 揭秘 .NET Core 和 .NET Standard[转自MSDN]

    作为 .NET 系列的最新成员,.NET Core 和 .NET Standard 的概念及其与 .NET Framework 的区别并不十分明确.在本文中,我将准确介绍每个产品及其适用场景. 在详细 ...

  9. [driver]简单地hello驱动加载

    转自:http://blog.chinaunix.net/uid-24264134-id-98061.html Linux设备驱动会以内核模块的方式出现,因此,内核模块也成了我们编写驱动的入门知识,这 ...

  10. RadioButton单选按钮的使用

    namespace WindowsFormsApplication1 { public partial class Form1 : Form { public Form1() { Initialize ...