我制作了一个包含原生DLL的本地软件包。该软件包就像SqlServerCompact.4.0.8852.1.nupkg。通过nuget命令行执行powershell脚本
当我通过GUI'Manage Nuget Packages ...'安装包时,一切正常,本机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
(编译只需要净的DLL)。然而,nuget install
不会执行依赖包中的副本脚本 - 因此编译MyProjectTest
是好的,但是在执行它的EXE时,它的Debug/Release文件夹中没有本地DLL。
我的问题是为什么从命令行安装包时powershell脚本没有执行?以及如何处理它?谢谢!