I have a problem when I check in my server to my build server (using TFS), but for some reason, return me the next error:
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)
Adn as detail:
\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.
I'm not sure what is the problem or what I can solve it. Someone can help me?
targets files from Visual Studio 2015 that can be found in the "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14. 0\{Web,WebApplications}" directories. The files are in the "tools\VSToolsPath" directory.
targets file. Essentially, this target takes the build output of your web application project and turns it into a web deployment package that can be published to an IIS web server.
Your reference to
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\WebApplications\Microsoft.WebApplication.targets"
This works if the build is done on a machine that has Visual studio installed on it. If you change the reference to use nuget instead- https://www.nuget.org/packages/MSBuild.Microsoft.VisualStudio.Web.targets/ this package is the equivalent one to your local file. In your csproj.
<Import Project="$(MSBuildBinPath)\Microsoft.WebApplication.targets" />
to (for example)
<Import Project="$(Yourpackageslocation)\MSBuild.Microsoft.VisualStudio.Web.targets\Microsoft.WebApplication.targets" />
You'll need to edit your csproj to point to the Nuget packages file.
Your application is build on using MSBuild. MSBuild depends on target files that describe how certain application types need to be build.
In this case you are building a web application and your project file contains a link to the Microsoft.WebApplication.targets
file. This file is installed on your local pc by installing Visual Studio but it's not available on your build server.
You have two options:
To be honest, the second option is the easiest. You will probably need to copy a lot of files if you want to manually setup your build server. Installing Visual Studio takes care of all dependencies.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With