将服务器检入到构建服务器(使用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软件包文件。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句