Is there any way of making a single NuGet package that contains binaries targeting x86 ARM x64 etc. so that VisStudio/MSBuild will pick up the correct binaries for each given build configuration?
I can only see support for os target - i.e. Windows, Windows8, win, win8, wp, wp7, WindowsPhone, WindowsPhone7, silverilght4-wp71, wp71, WindowsPhone71 etc.
And you end up with a folder structure like this:
\content
\net11
\MyContent.txt
\net20
\MyContent20.txt
\net40
\sl40
\MySilverlightContent.html
\tools
init.ps1
\net40
install.ps1
uninstall.ps1
\sl40
install.ps1
uninstall.ps1
Do I really have to do some powershell-script or pre-build step to accomplish this? It seems like this should be supported by NuGet out-of-the-box?
If I do have to use a script - does anyone have good example code? A ps1 script or some sort of build hook?
I also found this work item on the subject: http://nuget.codeplex.com/workitem/679. But its been around since June 2011, last commented in July.
Any ideas?
Many thanks, Jon
Sources:
Put simply, a NuGet package is a single ZIP file with the . nupkg extension that contains compiled code (DLLs), other files related to that code, and a descriptive manifest that includes information like the package's version number.
NuGet is a package manager that delivers compiled source code (DLLs) and other files (scripts and images) related to code. A NuGet package takes the form of a zip file with the extension . nupkg. This makes adding, updating, and removing libraries easy in Visual Studio applications.
Open your file, and inside packageSources add a new local key following this structure <add key="local" value="path" /> . This path can be a relative or absolute from NuGet. config folder. Now you can install a package locally with dotnet add package and source option to local.
As far as I know, this is still unsupported.
This SO question has two answers that should work for you, one for addressing this with a single package, the other a simple multipackage solution:
How should I create or upload a 32-bit and 64-bit NuGet package?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With