我试图将一个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。