我制作了一个包含原生 DLL 的原生包。该包就像SqlServerCompact.4.0.8852.1.nupkg一样。
当我通过“管理 Nuget 包 ...”通过 GUI 安装包时,一切都很好,本机 DLL 被复制到 Debug/Release 文件夹。复制本机 Dll 由类似于 SqlSerCompact 中的脚本完成。
我有以下.bat
文件来自动化打包过程MyProject
:
..\..\tools\nuget\bin\NuGet.exe install MyProject\packages.config -o packages\
..\..\tools\nuget\bin\NuGet.exe install MyProjectTest\packages.config -o packages\
..\..\tools\nuget\bin\nuget update MyProject.sln
msbuild /m /p:Configuration=Release /p:Platform="x64" MyProject.sln
..\..\tools\nuget\bin\nuget pack MyProject.nuspec
上面的脚本运行完美得到MyProject.nupkg
(编译只需要.Net dlls)。但是nuget install
不执行依赖包中的复制脚本——所以编译MyProjectTest
很好,但是在执行它的 EXE 时,它的 Debug/Release 文件夹中没有本机 DLL。
我的问题是为什么从命令行安装软件包时不执行 powershell 脚本?以及如何处理?谢谢!