f# - 使用 F# NuGet 包生成器添加内容文件
问题描述
我正在尝试将一个 dll 添加到使用我的 NuGet 包的任何项目的输出文件夹中。我使用 F# 来构建它,但对于如何让它工作已经没有想法了。
用于构建的 F# 代码:
NuGet (fun p ->
{p with
Authors = ["Delsys"]
References = ["DelsysAPI.dll"]
Project = projectName
Description = projectDescription
OutputPath = artifactsNuGetDir
Summary = projectSummary
WorkingDir = packagingDir
Version = version
Files = [(@"**/SiUSBXp.dll", Some @"lib", Some @"")]
}) "DelsysAPI.nuspec"
SiUSBXp dll 存在于我的 NuGet 包中,但当我包含并使用此 NuGet 包构建时,它不会复制到输出文件夹中。任何帮助或见解都会很棒。
编辑:
我在这个问题上取得了一些进展。我不确定是否应该打开一个新线程,但基本上当我将该文件添加为内容文件时,F# nuget 创建者认为我的项目根文件夹是 C 驱动器。
Running build failed.
Error:
System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\DelsysAPI\bin\Release'.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileSystemEnumerableIterator`1.CommonInit()
at System.IO.FileSystemEnumerableIterator`1..ctor(String path, String originalUserPath, String searchPattern, SearchOption searchOption, SearchResultHandler`1 resultHandler, Boolean checkHost)
at System.IO.Directory.GetFiles(String path, String searchPattern, SearchOption searchOption)
at FSI_0005.Build-core.clo@45-2.Invoke(Unit _arg3) in C:\Users\path\to\project\DelsysAPI\trunk\build-core.fsx:line 52
at Fake.TargetHelper.runSingleTarget(TargetTemplate`1 target) in D:\code\fake\src\app\FakeLib\TargetHelper.fs:line 626
这是新的 F# NuGet 规范代码:
NuGet (fun p ->
{p with
Authors = ["Delsys"]
References = ["DelsysAPI.dll"]
Project = projectName
Description = projectDescription
OutputPath = artifactsNuGetDir
Summary = projectSummary
WorkingDir = packagingDir
Version = version
Files = [(@"SiUSBXp.dll", Some @"", Some @"")]
}) ("DelsysAPI.nuspec")
我试过使用SOURCE_DIRECTORY但它认为该值也是 C:/ProjectFolder 。
解决方案
推荐阅读
- php - 想在 php laravel (API) 中添加电子钱包和支付网关
- angular - 从角度 6 中的另一个组件调用 app.component.ts 中的方法
- r - 将顶点序列列表转换为R中的表
- javascript - 如何仅在 javascript 中的 onclick 上播放 gif
- algorithm - 如何根据某些条件合并两个大文件?
- google-sheets - 将范围与大括号 { } 组合时是否可以添加 IFERROR
- perl - Curl 工作正常,但 Perl LWP 无法将 Unicode 代码发布到 HTTPS 服务器
- ios - 拥有同步线程的目的
- python - 通过 gcloud 发送 Hadoop 作业
- directx - 何时使用 IDXGIFactory3::GetCreationFlags