FSharp项目构建于MSBuild的失败中的TeamCity [英] FSharp project build fails in MSBuild in TeamCity

查看:463
本文介绍了FSharp项目构建于MSBuild的失败中的TeamCity的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我所描述的以下设置<一个href=\"http://stackoverflow.com/questions/22347950/fsharp-build-fails-in-msbuild-but-works-ok-in-visual-studio/22348201?noredirect=1#comment33973474_22348201\">here (TeamCity的带的MSBuild和F#3.1安装工具)。

我有一些项目在我的解决方案,其中也有F#项目。一切都建立在Visual Studio很好,但是当我试图用的MSBuild我的TeamCity服务器(其中没有安装VS)来构建它,它抛出以下在引用我的FSharp项目一期工程建设的错误:

 C:\\ TeamCity的\\ buildAgent \\工作\\ 9d3b5b7177ddb2b9 \\ MY_SOLUTION.sln.teamcity(TeamCity_Generated_Build目标)(1) - &GT;
[17时04分14秒]C:\\ TeamCity的\\ buildAgent \\工作\\ 9d3b5b7177ddb2b9 \\ MY_SOLUTION.sln(构建目标)(2) - GT;
[17时04分14秒]C:\\ TeamCity的\\ buildAgent \\工作\\ 9d3b5b7177ddb2b9 \\文件夹0 \\ ONE_PROJECT.csproj.metaproj(默认目标)(3) - &GT;
[17时04分14秒]C:\\ TeamCity的\\ buildAgent \\工作\\ 9d3b5b7177ddb2b9 \\文件夹1 \\ ANOTHER.csproj(默认目标)(4) - GT;
[17时04分14秒]C:\\ TeamCity的\\ buildAgent \\工作\\ 9d3b5b7177ddb2b9 \\文件夹2 \\ REFERENCING_PROJECT.csproj(默认目标)(7) - GT;
[17时04分14秒](CoreCompile目标) - GT;
[17时04分14秒] SOME_CLASS_IN_REFERENCING_PROJECT.cs(10,7):错误CS0246:类型或命名空间名称MY_FSHARP_PROJECT_NAME'找不到(是否缺少using指令或程序集引用?)[C:\\ TeamCity的\\ buildAgent \\工作\\ 9d3b5b7177ddb2b9 \\文件夹2 \\ REFERENCING_PROJECT.csproj]
[17时04分14秒] ...和一群这里类似的错误。

不过,我看到了在建设MY_FSHARP_PROJECT_NAME(该项目FSharp)没有任何错误,所以我想构建了确定。
这是唯一的错误我在构建项目得到。
我安装了F#3.1工具(FSharp.Core 4.3.1.0)。

请问跨越此类问题的人来了?

这是从TeamCity的构建日志:

 步骤2/3:2,生成解决方案(的MSBuild)(10秒)
[十三时57分31秒] [步骤2/3]首发:C:\\ TeamCity的\\ buildAgent \\插件\\ dotnetPlugin \\ BIN \\ JetBrains.BuildServer.MsBuildBootstrap.exe / WORKDIR:C:\\ TeamCity的\\ buildAgent \\工作\\ 9d3b5b7177ddb2b9/ msbuildPath:C:\\ Program Files文件(x86)的\\的MSBuild \\ 12.0 \\ BIN \\ MSBuild.exe
[十三时57分31秒] [步骤2/3]目录:C:\\ TeamCity的\\ buildAgent \\工作\\ 9d3b5b7177ddb2b9
[13点57分35秒] [步骤2/3] SOLUTION.sln.teamcity:建立目标:TeamCity_Generated_Build(5S)
[13点57分35秒] [SOLUTION.sln.teamcity] TeamCity_Generated_Build(5S)
[13点57分35秒] [TeamCity_Generated_Build]的MSBuild(5S)
[13点57分35秒] [的MSBuild] SOLUTION.sln:建立目标:清洁;建立(5S)
[13点57分35秒] [SOLUTION.sln] ValidateSolutionConfiguration
[13点57分35秒] [SOLUTION.sln] ValidateProjects
[13点57分35秒] [SOLUTION.sln]清洁(2S)
[13点57分36秒] [步骤2/3] C:\\ Program Files文件(x86)的\\的MSBuild \\ 12.0 \\ BIN \\ Microsoft.CSharp.CurrentVersion.targets(388,5):警告MSB4011:C:\\ Program Files文件(86)\\的MSBuild \\ 12.0 \\ BIN \\ Microsoft.Common.targets不能被再次导入。它已经在C:\\ Program Files文件(x86)的\\微软的SDK \\ F#\\ 3.1 \\框架\\ V4.0 \\ Microsoft.FSharp.Targets(203,5)原装进口。这是最有可能的生成创作错误。此后续导入将被忽略。 [C:\\ TeamCity的\\ buildAgent \\工作\\ 9d3b5b7177ddb2b9 \\ FSHARP_PROJECT \\ Infotron.FSHARP_PROJECT.fsproj]
[13时57分33秒] [步骤2/3] MSBuild的命令行参数包含/属性:或/ P:。建议在构建参数定义系统属性。
[13时57分38秒] [SOLUTION.sln]构建(2S)
[13时57分38秒] [创建]的MSBuild(2S)
[13时57分38秒] [的MSBuild] SOME_FOLDER3 \\ Nl.SOME_PARENT_REFERENCING_PROJ.UI.csproj.metaproj:构建缺省目标(2S)
[13时57分38秒] [SOME_FOLDER3 \\ Nl.SOME_PARENT_REFERENCING_PROJ.UI.csproj.metaproj]构建(2S)
[13时57分38秒] [创建]的MSBuild(2S)
[13时57分38秒] [的MSBuild] SOME_FOLDER \\ SOME_PARENT_REFERENCING_PROJ.csproj:构建缺省目标(2S)
[13时57分38秒] [SOME_FOLDER \\ SOME_PARENT_REFERENCING_PROJ.csproj] ResolveProjectReferences(2S)
[13时57分38秒] [ResolveProjectReferences]的MSBuild(2S)
[13时57分38秒] [的MSBuild] SOME_FOLDER2 \\ PROJECT2.csproj:构建缺省目标(1S)
[13时57分39秒] [的MSBuild] FormulaTransformation \\ REFERENCING_FSHARPPROJ_PROJECT.csproj:构建缺省目标
[13时57分39秒] [FormulaTransformation \\ REFERENCING_FSHARPPROJ_PROJECT.csproj] ResolveProjectReferences
[13时57分39秒] [FormulaTransformation \\ REFERENCING_FSHARPPROJ_PROJECT.csproj] GenerateTargetFrameworkMonikerAttribute
[13时57分39秒] [FormulaTransformation \\ REFERENCING_FSHARPPROJ_PROJECT.csproj] CoreCompile
[13时57分39秒] [CoreCompile]中信建投
[13时57分39秒] [中信建投] C:\\ Program Files文件(x86)的\\的MSBuild \\ 12.0 \\ BIN \\ CSC.EXE / noconfig / nowarn:1701,1702包括/ nostdlib + / errorreport:提示/警告:4 /定义:DEBUG ; TRACE / highentropyva + /reference:C:\\TeamCity\\buildAgent\\work\\9d3b5b7177ddb2b9\\SOME_FOLDER2\\bin\\Debug\\SOME_FOLDER2.dll /参考:C:\\ Program Files文件(x86)的\\参考大会\\微软\\框架\\ .NETFramework \\ V4.5 \\ FSharp.Core.dll/reference:C:\\TeamCity\\buildAgent\\work\\9d3b5b7177ddb2b9\\lib\\Irony.dll /参考:C:\\ Program Files文件(x86)的\\参考大会\\微软\\框架\\。 .net框架\\ V4.5 \\ Microsoft.CSharp.dll/引用:C:\\ Program Files文件(x86)的\\参考大会\\微软\\框架\\ .NETFramework \\ V4.5 \\ mscorlib.dll中/引用:C:\\程序文件(x86)\\参考大会\\微软\\框架\\ .NETFramework \\ V4.5 \\ System.Core.dll/引用:C:\\ Program Files文件(x86)的\\参考大会\\微软\\框架\\ .NETFramework \\ V4 0.5 \\ System.Data.DataSetExtensions.dll/引用:C:\\ Program Files文件(x86)的\\参考大会\\微软\\框架\\ .NETFramework \\ V4.5 \\ System.Data.dll中/引用:C: \\程序文件(x86)\\参考大会\\微软\\框架\\ .NETFramework \\ V4.5 \\ System.Data.Entity.dll/引用:C:\\ Program Files文件(x86)的\\参考大会\\微软\\框架\\。 .net框架\\ V4.5 \\ System.dll中/引用:C:\\ Program Files文件(x86)的\\参考大会\\微软\\框架\\ .NETFramework \\ V4.5 \\ system.xml.dll的/引用:C:\\程序文件(x86)\\参考大会\\微软\\框架\\ .NETFramework \\ V4.5 \\ System.Xml.Linq.dll/参考:C:\\ TeamCity的\\ buildAgent \\工作\\ 9d3b5b7177ddb2b9 \\的Util \\ BIN \\调试\\的Util。 DLL /调试+ /调试:全/ filealign:512 / optimize- /out:obj\\Debug\\FormulaTransformation.dll /subsystemversion:6.00 /目标:图书馆/ utf8output REFERENCING_FSHARPPROJ_CLASS.cs属性\\ AssemblyInfo.cs中C:\\ TeamCity的\\ buildAgent \\ TEMP \\ buildTmp \\ .NETFramework,版本= v4.5.AssemblyAttributes.cs
[十三点57分四十秒] [中信建投] REFERENCING_FSHARPPROJ_CLASS.cs(10,7):错误CS0246:类型或命名空间名称SOME_CLASS_FROM_FSHARP_PROJ'找不到(是否缺少using指令或程序集引用)
[十三点57分四十秒] [中信建投] REFERENCING_FSHARPPROJ_CLASS(**这个类是在引用FSharp项目,并从FSharp项目需要SOME_CLASS_FROM_FSHARP_PROJ类**项目),CS(38,16):错误CS0246:类型或命名空间名称'SOME_CLASS_FROM_FSHARP_PROJ'找不到(是否缺少using指令或程序集引用?)
[十三点57分四十秒] [中信建投] REFERENCING_FSHARPPROJ_CLASS.cs(154,24):错误CS0246:类型或命名空间名称SOME_CLASS_FROM_FSHARP_PROJ'找不到(是否缺少using指令或程序集引用?)
[十三点57分四十秒] [中信建投] REFERENCING_FSHARPPROJ_CLASS.cs(192,78):错误CS0246:类型或命名空间名称SOME_CLASS_FROM_FSHARP_PROJ'找不到(是否缺少using指令或程序集引用?)
[十三点57分四十秒] [中信建投] REFERENCING_FSHARPPROJ_CLASS.cs(192,28):错误CS0246:类型或命名空间名称SOME_CLASS_FROM_FSHARP_PROJ'找不到(是否缺少using指令或程序集引用?)
[十三点57分四十秒] [中信建投] REFERENCING_FSHARPPROJ_CLASS.cs(229,32):错误CS0246:类型或命名空间名称SOME_CLASS_FROM_FSHARP_PROJ'找不到(是否缺少using指令或程序集引用?)
[十三点57分四十秒] [中信建投] REFERENCING_FSHARPPROJ_CLASS.cs(252,16):错误CS0246:类型或命名空间名称SOME_CLASS_FROM_FSHARP_PROJ'找不到(是否缺少using指令或程序集引用?)
[十三点57分四十秒] [中信建投] REFERENCING_FSHARPPROJ_CLASS.cs(263,29):错误CS0246:类型或命名空间名称SOME_CLASS_FROM_FSHARP_PROJ'找不到(是否缺少using指令或程序集引用?)
[十三点57分四十秒] [中信建投] REFERENCING_FSHARPPROJ_CLASS.cs(357,50):错误CS0246:类型或命名空间名称SOME_CLASS_FROM_FSHARP_PROJ'找不到(是否缺少using指令或程序集引用?)
[十三点57分四十秒] [的MSBuild] ANOTHER_PROJECT \\ ANOTHER_PROJECT.csproj:构建缺省目标
[13:57:41] [的MSBuild] ANOTHER2_PROJECT \\ ANOTHER2_PROJECT.csproj.metaproj:构建缺省目标
[13:57:41] [ANOTHER2_PROJECT \\ ANOTHER2_PROJECT.csproj.metaproj]构建
[13:57:41] [创建]的MSBuild
[13:57:41] [的MSBuild] SOME_FOLDER \\ SOME_PARENT_REFERENCING_PROJ.csproj:构建缺省目标
[13时57分41秒] [SOME_FOLDER \\ SOME_PARENT_REFERENCING_PROJ.csproj]项目SOME_FOLDER \\ SOME_PARENT_REFERENCING_PROJ.csproj失败。
[13:57:41] [步骤2/3]进程已退出,code 1
[13:57:41] [步骤2/3]的MSBuild输出
[13:57:41] [步骤2/3]第2步:生成解决方案(的MSBuild)失败


解决方案

打开 .fsproj 文件为文本文件,并检查它在它下面的行

 &LT;!导入项目=$(MSBuildExtensionsPath32)\\ FSharp \\ 1.0 \\ Microsoft.FSharp.Targets条件=存在('$(MSBuildBinPath)\\ Microsoft.Build.Tasks .v4.0.dll')/&GT;
  &LT;导入项目=$(MSBuildExtensionsPath32)\\ .. \\微软F#\\ V4.0 \\ Microsoft.FSharp.Targets条件=存在('$(MSBuildBinPath)\\ Microsoft.Build.Tasks.v4.0.dll )/&GT;

的ItemGroup&GT;它具有所有的 .FS 部分

如果它不具备这一点,那么就在&LT前插入上述code>文件中了。

仔细检查路径和文件构建服务器上实际存在的。如果没有,你可能只是想安装VS跨越相关文件从一台机器移动,虽然它们已回落与 F#工具包。

I have the following setup described here (TeamCity with MSBuild and F# 3.1 Tools installed).

I have a number of projects in my solution, among which also a F# project. Everything builds fine in Visual Studio, but when I try to build it with MSBuild on my TeamCity server (which does not have VS installed) it throws the following build error on a project that references my FSharp project:

"C:\TeamCity\buildAgent\work\9d3b5b7177ddb2b9\MY_SOLUTION.sln.teamcity" (TeamCity_Generated_Build target) (1) ->
[17:04:14]"C:\TeamCity\buildAgent\work\9d3b5b7177ddb2b9\MY_SOLUTION.sln" (Build target) (2) ->
[17:04:14]"C:\TeamCity\buildAgent\work\9d3b5b7177ddb2b9\Folder 0\ONE_PROJECT.csproj.metaproj" (default target) (3) ->
[17:04:14]"C:\TeamCity\buildAgent\work\9d3b5b7177ddb2b9\Folder 1\ANOTHER.csproj" (default target) (4) ->
[17:04:14]"C:\TeamCity\buildAgent\work\9d3b5b7177ddb2b9\Folder 2\REFERENCING_PROJECT.csproj" (default target) (7) ->
[17:04:14](CoreCompile target) -> 
[17:04:14]  SOME_CLASS_IN_REFERENCING_PROJECT.cs(10,7): error CS0246: The type or namespace name 'MY_FSHARP_PROJECT_NAME' could not be found (are you missing a using directive or an assembly reference?) [C:\TeamCity\buildAgent\work\9d3b5b7177ddb2b9\Folder 2\REFERENCING_PROJECT.csproj]
[17:04:14] ... AND a bunch of similar errors here.

However, I see no errors in building the MY_FSHARP_PROJECT_NAME (the FSharp project) so I guess the build went ok. This is the only error I get in the build project. I have F# 3.1 Tools installed (FSharp.Core 4.3.1.0).

Does anyone came across this type of issue?

This is the build log from TeamCity:

Step 2/3: 2. Build Solution (MSBuild) (10s)
[13:57:31][Step 2/3] Starting: C:\TeamCity\buildAgent\plugins\dotnetPlugin\bin\JetBrains.BuildServer.MsBuildBootstrap.exe /workdir:C:\TeamCity\buildAgent\work\9d3b5b7177ddb2b9 "/msbuildPath:C:\Program Files (x86)\MSBuild\12.0\bin\MSBuild.exe"
[13:57:31][Step 2/3] in directory: C:\TeamCity\buildAgent\work\9d3b5b7177ddb2b9
[13:57:35][Step 2/3] SOLUTION.sln.teamcity: Build target: TeamCity_Generated_Build (5s)
[13:57:35][SOLUTION.sln.teamcity] TeamCity_Generated_Build (5s)
[13:57:35][TeamCity_Generated_Build] MSBuild (5s)
[13:57:35][MSBuild] SOLUTION.sln: Build targets: Clean;Build (5s)
[13:57:35][SOLUTION.sln] ValidateSolutionConfiguration
[13:57:35][SOLUTION.sln] ValidateProjects
[13:57:35][SOLUTION.sln] Clean (2s)
[13:57:36][Step 2/3] C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.CSharp.CurrentVersion.targets(388, 5): warning MSB4011: "C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Common.targets" cannot be imported again. It was already imported at "C:\Program Files (x86)\Microsoft SDKs\F#\3.1\Framework\v4.0\Microsoft.FSharp.Targets (203,5)". This is most likely a build authoring error. This subsequent import will be ignored. [C:\TeamCity\buildAgent\work\9d3b5b7177ddb2b9\FSHARP_PROJECT\Infotron.FSHARP_PROJECT.fsproj]
[13:57:33][Step 2/3] MSBuild command line parameters contain "/property:" or "/p:". It is recommended to define System Property on Build Parameters instead.
[13:57:38][SOLUTION.sln] Build (2s)
[13:57:38][Build] MSBuild (2s)
[13:57:38][MSBuild] SOME_FOLDER3\Nl.SOME_PARENT_REFERENCING_PROJ.UI.csproj.metaproj: Build default targets (2s)
[13:57:38][SOME_FOLDER3\Nl.SOME_PARENT_REFERENCING_PROJ.UI.csproj.metaproj] Build (2s)
[13:57:38][Build] MSBuild (2s)
[13:57:38][MSBuild] SOME_FOLDER\SOME_PARENT_REFERENCING_PROJ.csproj: Build default targets (2s)
[13:57:38][SOME_FOLDER\SOME_PARENT_REFERENCING_PROJ.csproj] ResolveProjectReferences (2s)
[13:57:38][ResolveProjectReferences] MSBuild (2s)
[13:57:38][MSBuild] SOME_FOLDER2\PROJECT2.csproj: Build default targets (1s)
[13:57:39][MSBuild] FormulaTransformation\REFERENCING_FSHARPPROJ_PROJECT.csproj: Build default targets
[13:57:39][FormulaTransformation\REFERENCING_FSHARPPROJ_PROJECT.csproj] ResolveProjectReferences
[13:57:39][FormulaTransformation\REFERENCING_FSHARPPROJ_PROJECT.csproj] GenerateTargetFrameworkMonikerAttribute
[13:57:39][FormulaTransformation\REFERENCING_FSHARPPROJ_PROJECT.csproj] CoreCompile
[13:57:39][CoreCompile] Csc
[13:57:39][Csc] C:\Program Files (x86)\MSBuild\12.0\bin\Csc.exe /noconfig /nowarn:1701,1702 /nostdlib+ /errorreport:prompt /warn:4 /define:DEBUG;TRACE /highentropyva+ /reference:C:\TeamCity\buildAgent\work\9d3b5b7177ddb2b9\SOME_FOLDER2\bin\Debug\SOME_FOLDER2.dll /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\FSharp.Core.dll" /reference:C:\TeamCity\buildAgent\work\9d3b5b7177ddb2b9\lib\Irony.dll /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\Microsoft.CSharp.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\mscorlib.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Core.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Data.DataSetExtensions.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Data.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Data.Entity.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Xml.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Xml.Linq.dll" /reference:C:\TeamCity\buildAgent\work\9d3b5b7177ddb2b9\Util\bin\Debug\Util.dll /debug+ /debug:full /filealign:512 /optimize- /out:obj\Debug\FormulaTransformation.dll /subsystemversion:6.00 /target:library /utf8output REFERENCING_FSHARPPROJ_CLASS.cs Properties\AssemblyInfo.cs "C:\TeamCity\buildAgent\temp\buildTmp\.NETFramework,Version=v4.5.AssemblyAttributes.cs"
[13:57:40][Csc] REFERENCING_FSHARPPROJ_CLASS.cs(10, 7): error CS0246: The type or namespace name 'SOME_CLASS_FROM_FSHARP_PROJ' could not be found (are you missing a using directive or an assembly reference?)
[13:57:40][Csc] REFERENCING_FSHARPPROJ_CLASS (**this class is in the project that references the FSharp project and calls SOME_CLASS_FROM_FSHARP_PROJ class from FSharp project**).cs(38, 16): error CS0246: The type or namespace name 'SOME_CLASS_FROM_FSHARP_PROJ' could not be found (are you missing a using directive or an assembly reference?)
[13:57:40][Csc] REFERENCING_FSHARPPROJ_CLASS.cs(154, 24): error CS0246: The type or namespace name 'SOME_CLASS_FROM_FSHARP_PROJ' could not be found (are you missing a using directive or an assembly reference?)
[13:57:40][Csc] REFERENCING_FSHARPPROJ_CLASS.cs(192, 78): error CS0246: The type or namespace name 'SOME_CLASS_FROM_FSHARP_PROJ' could not be found (are you missing a using directive or an assembly reference?)
[13:57:40][Csc] REFERENCING_FSHARPPROJ_CLASS.cs(192, 28): error CS0246: The type or namespace name 'SOME_CLASS_FROM_FSHARP_PROJ' could not be found (are you missing a using directive or an assembly reference?)
[13:57:40][Csc] REFERENCING_FSHARPPROJ_CLASS.cs(229, 32): error CS0246: The type or namespace name 'SOME_CLASS_FROM_FSHARP_PROJ' could not be found (are you missing a using directive or an assembly reference?)
[13:57:40][Csc] REFERENCING_FSHARPPROJ_CLASS.cs(252, 16): error CS0246: The type or namespace name 'SOME_CLASS_FROM_FSHARP_PROJ' could not be found (are you missing a using directive or an assembly reference?)
[13:57:40][Csc] REFERENCING_FSHARPPROJ_CLASS.cs(263, 29): error CS0246: The type or namespace name 'SOME_CLASS_FROM_FSHARP_PROJ' could not be found (are you missing a using directive or an assembly reference?)
[13:57:40][Csc] REFERENCING_FSHARPPROJ_CLASS.cs(357, 50): error CS0246: The type or namespace name 'SOME_CLASS_FROM_FSHARP_PROJ' could not be found (are you missing a using directive or an assembly reference?)
[13:57:40][MSBuild] ANOTHER_PROJECT\ANOTHER_PROJECT.csproj: Build default targets
[13:57:41][MSBuild] ANOTHER2_PROJECT\ANOTHER2_PROJECT.csproj.metaproj: Build default targets
[13:57:41][ANOTHER2_PROJECT\ANOTHER2_PROJECT.csproj.metaproj] Build
[13:57:41][Build] MSBuild
[13:57:41][MSBuild] SOME_FOLDER\SOME_PARENT_REFERENCING_PROJ.csproj: Build default targets
[13:57:41][SOME_FOLDER\SOME_PARENT_REFERENCING_PROJ.csproj] Project SOME_FOLDER\SOME_PARENT_REFERENCING_PROJ.csproj failed.
[13:57:41][Step 2/3] Process exited with code 1
[13:57:41][Step 2/3] MSBuild output
[13:57:41][Step 2/3] Step 2. Build Solution (MSBuild) failed

解决方案

Open your .fsproj file as a text file, and check that it has the following lines in it:

  <Import Project="$(MSBuildExtensionsPath32)\FSharp\1.0\Microsoft.FSharp.Targets" Condition="!Exists('$(MSBuildBinPath)\Microsoft.Build.Tasks.v4.0.dll')" />
  <Import Project="$(MSBuildExtensionsPath32)\..\Microsoft F#\v4.0\Microsoft.FSharp.Targets" Condition=" Exists('$(MSBuildBinPath)\Microsoft.Build.Tasks.v4.0.dll')" />

If it doesn't have this, then insert the above just before the <ItemGroup> section which has all the .fs files within it.

Double check that the paths and files actually exist on your build server. If not, you may just want to move the relevant files across from a machine with VS installed, although they should have come down with the F# Tools package.

这篇关于FSharp项目构建于MSBuild的失败中的TeamCity的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆