FAKE构建无法在单声道下在osx上创建nuget包

时间:2016-06-30 16:40:31

标签: macos f# mono nuget f#-fake

我在FAKE下的OSX上使用mono构建工具作为构建链的一部分。

所有工具链均已使用homebrew安装。

部分构建是在nuget包中捆绑发布工件 - 这是在CreatePackage构建文件的build.fsx目标中处理的。

正在从包装器bash脚本运行构建文件,如下所示:

#!/usr/bin/env bash

export EnableNuGetPackageRestore=true
nuget "Install" "FAKE" "-OutputDirectory" "./build/packages" “-ExcludeVersion"
nuget "Install" "FSharp.Data" "-OutputDirectory" "./build/packages" "-ExcludeVersion"
mono "./build/packages/FAKE/tools/Fake.exe" build.fsx "$1"

当我最初运行时,我收到以下错误:

Cannot open assembly '***/tools/NuGet/NuGet.exe': No such file or directory.

我尝试修复此问题只是创建预期的目录结构,并从nuget.exe安装目录复制brew程序集。

此时运行构建然后会出现以下错误:

System.Exception: Error during NuGet package creation. ***/tools/NuGet/nuget.exe pack -Version 1.0.0 -OutputDirect
Method 'String.Format' not found.

为了完整性,我的build.fsx构建文件的CreatePackage目标如下(截断):

Target "CreatePackage" (fun _ ->
        projectName
        |> sprintf "%s.nuspec"
        |> NuGet (fun p ->
        {p with
                Authors = authors
                Project = packageName
                Description = projectDescription
                OutputPath = deployDir
                WorkingDir = root
                Version = version
                Dependencies = dependenciesWithVersion
                Files = [(@"build/tmp/**", Some "lib", None)
                        (@"MyProject/dsc/modules/**/*", Some "dsc", None)
                        (@"MyProject/dsc/manifests/*", Some "dsc", None)
                        (@"MyProject/Install/*", Some "tools", None)]
                Publish = false })
)

0 个答案:

没有答案