I just created a NuGet package for one of my open source projects and it includes a Windows Phone 7 binary. I just tested it and instead of adding the Windows Phone 7-specific library, it added the Silverlight library.
My question is, how can I set up my folder architecture such that the NuGet package manager recognizes my WP7-specific binaries and installs those instead of the Silverlight binaries?
I followed the instructions listed here for targeting multiple frameworks in NuGet packages.
Here’s what my folder tree currently looks like:
\lib
\.NetFramework 4.0
\MyAssembly.dll
\Silverlight 4.0
\MyAssembly.Silverlight.dll
\Windows Phone 7
\MyAssembly.Mobile.dll
What should I be doing differently?
We don’t support wp7 natively yet since there is no profile support (the profile part of the framework name isn’t supported in folders). See this issue for more details http://nuget.codeplex.com/workitem/219.
FWIW: Windows phone 7 is Silverlight 4, Profile=Windows Phone.
For now you’ll have to create another package for wp7.