我在Windows上使用Visual Studio开发此项目,但我在使用Linux上的xbuild编译它时没有任何问题,直到我添加了一些需要使用TypeScript构建的文件。具体来说,编译一组.ts文件以生成app.js,然后将其作为嵌入式资源包含在内。构建在VS中工作,但是使用xbuild我得到了这个:
$ xbuild Guncho.sln XBuild Engine Version 12.0 Mono, Version 3.10.0.0 Copyright (C) 2005-2013 Various Mono authors Build started 12/23/2014 13:00:53. __________________________________________________ Project "/home/guncho/test-guncho/Guncho.sln" (default target(s)): Target ValidateSolutionConfiguration: Building solution configuration "Debug|Any CPU". Target Build: Project "/home/guncho/test-guncho/Guncho.Site/Guncho.Site.csproj" (default target(s)): Target PrepareForBuild: Configuration: Debug Platform: AnyCPU Target CopyNonResxEmbeddedResources: /usr/lib/mono/xbuild/12.0/bin/Microsoft.Common.targets: error : Cannot copy /home/guncho/test-guncho/Guncho.Site/app/app.js to /home/guncho/test-guncho/Guncho.Site/obj/Debug/Guncho.Site.app.app.js, as the source file doesn't exist. /usr/lib/mono/xbuild/12.0/bin/Microsoft.Common.targets: error : Cannot copy /home/guncho/test-guncho/Guncho.Site/app/app.js.map to /home/guncho/test-guncho/Guncho.Site/obj/Debug/Guncho.Site.app.app.js.map, as the source file doesn't exist. Task "Copy" execution -- FAILED Done building target "CopyNonResxEmbeddedResources" in project "/home/guncho/test-guncho/Guncho.Site/Guncho.Site.csproj".-- FAILED Done building project "/home/guncho/test-guncho/Guncho.Site/Guncho.Site.csproj".-- FAILED Task "MSBuild" execution -- FAILED Done building target "Build" in project "/home/guncho/test-guncho/Guncho.sln".-- FAILED Done building project "/home/guncho/test-guncho/Guncho.sln".-- FAILED Build FAILED.
它甚至没有尝试使用TypescriptCompile步骤。如果我手动运行tsc来生成app.js,那么构建工作正常,但是我需要做些什么才能让它自动运行?