Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Build on TFS wants to copy a executable from Node.js test project

I created a Node.js project for an protractor test environment using the Node.js Tools to test a web application on a team foundation server. Locally i can create the test project and run it with the debugger. However, the build on the TFS does not work.

Log:

"<PATH>\TestProject.Web.Protractor.Tests.njsproj" (13) on node 2 (default targets).
13>PrepareForBuild:
     Creating directory "obj\Debug\".
   CoreCompile:
     Creating directory "bin".
     Copying file from "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\Node.js Tools\Microsoft.NodejsTools.WebRole.dll" to "bin\Microsoft.NodejsTools.WebRole.dll".
   _CopyWebApplicationLegacy:
     Copying Web Application Project Files for TestProject.Web.Protractor.Tests
     Creating directory "<PATH>\bin\_PublishedWebsites\TestProject.Web.Protractor.Tests\bin".
13>C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\WebApplications\Microsoft.WebApplication.targets(136,5): error MSB3030: Could not copy the file "obj\Debug\TestProject.Web.Protractor.Tests.exe" because it was not found. 
like image 698
geskill Avatar asked Aug 21 '16 10:08

geskill


1 Answers

After analyzing the Microsoft.WebApplication.targets i found the switch Disable_CopyWebApplication to disable the copy process.

Inside the project file for me TestProject.Web.Protractor.Tests.njsproj add <Disable_CopyWebApplication>True</Disable_CopyWebApplication> to the property group and it will work fine :)

<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
  <PropertyGroup>
    ...
    <Disable_CopyWebApplication>True</Disable_CopyWebApplication>
</PropertyGroup>
...
like image 136
geskill Avatar answered Sep 22 '22 07:09

geskill