I made a native package which includes native DLLs. The package is just like SqlServerCompact.4.0.8852.1.nupkg.
When I install the package through GUI by 'Manage Nuget Packages ...', everything is fine and the native DLL is copied to Debug/Release folder. Copying the native Dlls is done by a script similar to that in SqlSerCompact.
And I have the following .bat
file to automate the packaging procedure of 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
The above script runs perfectly to get MyProject.nupkg
(Compiling only needs .Net dlls). However nuget install
does not execute the copy script in the dependency packages -- so compiling MyProjectTest
is fine, but when executing its EXE there is no native DLL in its Debug/Release folder.
My question is why the powershell script is not executed when installing packages from command line? And how to deal with it? Thanks!