如何使用Mono';s xbuild在Linux上构建TypeScript项目?

如何使用Mono';s xbuild在Linux上构建TypeScript项目?,mono,typescript,xbuild,Mono,Typescript,Xbuild,我在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

我在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. $xbuild Guncho.sln XBuild引擎版本12.0 Mono,版本3.10.0.0 版权所有(C)2005-2013各种Mono作者 构建开始于2014年12月23日13:00:53。 __________________________________________________ 项目“/home/guncho/test guncho/guncho.sln”(默认目标): 目标验证解决方案配置: 构建解决方案配置“调试|任何CPU”。 目标构建: 项目“/home/guncho/test guncho/guncho.Site/guncho.Site.csproj”(默认目标): 目标PrepareForBuild: 配置:调试平台:AnyCPU 目标CopyUnresxEmbeddedResources: /usr/lib/mono/xbuild/12.0/bin/Microsoft.Common.targets:错误:无法将/home/guncho/test guncho/guncho.Site/app/app.js复制到/home/guncho/test guncho/guncho.Site/obj/Debug/guncho.Site.app.js,因为源文件不存在。 /usr/lib/mono/xbuild/12.0/bin/Microsoft.Common.targets:错误:无法将/home/guncho/test guncho/guncho.Site/app/app.js.map复制到/home/guncho/test guncho/guncho.Site/obj/Debug/guncho.Site.app.js.map,因为源文件不存在。 任务“复制”执行--失败 已完成在项目“/home/guncho/test guncho/guncho.Site/guncho.Site.csproj”中构建目标“CopyUnresxEmbeddedResources”。--失败 已完成构建项目“/home/guncho/test guncho/guncho.Site/guncho.Site.csproj”。--失败 任务“MSBuild”执行--失败 已完成在项目“/home/guncho/test guncho/guncho.sln”中生成目标“Build”。--失败 已完成构建项目“/home/guncho/test guncho/guncho.sln”。--失败 生成失败。
它甚至没有尝试TypescriptCompile步骤。如果我手动运行tsc生成app.js,构建工作正常,但是我需要做什么才能让它自动工作?

文件
/home/guncho/test guncho/guncho.Site/app/app.js
是否存在?@knocte否。它应该通过编译TypeScript代码生成,但是这个构建步骤似乎不起作用。Linux机器上是否存在TypeScript.targets文件?该项目可能会有一个
部分。如果Microsoft.TypeScript.targets文件不存在,则生成将不会运行将TypeScript文件编译为JavaScript文件的任务。我将考虑将各种类型的脚本文件从Windows机器复制到Linux机器,更改.csproj中的路径以使用.targets文件,并测试其编译。