tfs - Microsoft.WebApplication.targets

标签 tfs msbuild build-server

当我将服务器 checkin 构建服务器(使用 TFS)时遇到问题,但由于某种原因,返回下一个错误:

Exception Message: MSBuild error 1 has ended this build. You can find more specific information about the cause of this error in above messages. (type BuildProcessTerminateException)
Exception Stack Trace:    at System.Activities.Statements.Throw.Execute(CodeActivityContext context)
   at System.Activities.CodeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager)
   at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)

广告详情:
\WcfService4.csproj (92): The imported project "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.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.

我不确定是什么问题或我能解决什么问题。有人可以帮助我吗?

最佳答案

你的引用

C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\WebApplications\Microsoft.WebApplication.targets"



如果构建是在安装了 Visual Studio 的机器上完成的,则此方法有效。
如果您更改引用以使用 nuget 代替 -
https://www.nuget.org/packages/MSBuild.Microsoft.VisualStudio.Web.targets/
这个包相当于你的本地文件。在你的 csproj.
 <Import Project="$(MSBuildBinPath)\Microsoft.WebApplication.targets" />

到(例如)
<Import Project="$(Yourpackageslocation)\MSBuild.Microsoft.VisualStudio.Web.targets\Microsoft.WebApplication.targets" />

您需要编辑 csproj 以指向 Nuget 包文件。

关于tfs - Microsoft.WebApplication.targets,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25047714/

相关文章:

c# - 如何使用 C# 在 tfs 中创建具有本地文件夹映射的工作区

asp.net-mvc - 无法将 App_Data 中的 .mdf/.ldf checkin TFS

msbuild - 将属性值从TFS构建定义传递到proj文件

msbuild - 如何使 .NET Core MSBuild 不为元包项目生成空程序集

TFS 2017 - 构建服务器不构建 Visual Studio 2017

tfs - 为什么构建草稿不合并/通知草稿发布时的合并冲突?

eclipse - Team Explorer Everywhere - 从待定更改中删除忽略的文件

asp.net-mvc - 安装 KB2993928 后 ASP.NET MVC4 解决方案无法构建

continuous-integration - Jenkins 的模板插件

.net - 什么是可靠的 NMaven 或为 .NET 替代构建服务器?