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

断了今生、忘了曾经 提交于 2019-12-24 01:38:23

问题


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. 

回答1:


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


来源:https://stackoverflow.com/questions/39063267/build-on-tfs-wants-to-copy-a-executable-from-node-js-test-project

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!