3

I'm developing this project with Visual Studio on Windows, but I've had no problems compiling it with xbuild on Linux until I added some files that need to be built with TypeScript. Specifically, a set of .ts files are compiled to produce app.js, which is then included as an embedded resource. The build works in VS, but with xbuild I get this:

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

It's not even attempting the TypescriptCompile step. The build works if I manually run tsc to generate app.js, but what do I need to do to get it working automatically?

Tara McGrew
  • 1,987
  • 19
  • 28
  • does the file `/home/guncho/test-guncho/Guncho.Site/app/app.js` exist? – knocte Dec 23 '14 at 22:34
  • @knocte No. It's supposed to be generated by compiling the TypeScript code, but that build step doesn't seem to be working. – Tara McGrew Dec 23 '14 at 22:49
  • 1
    Does the TypeScript .targets file exist on the Linux machine? The project will probably have a `` section. If the Microsoft.TypeScript.targets file does not exist then the build will not run the task that compiles the TypeScript file to a JavaScript file. I would look at copying the various TypeScript files from the Windows machine to the Linux machine, change the path in the .csproj to use the .targets file and test that it compiles. – Matt Ward Dec 24 '14 at 10:58

0 Answers0