Consuming NuGet with SL4 and Net4 projects in same folder?

Jan 7, 2011 at 6:32 PM

We have a common scenario where we have some shared code between Silverlight 4 client and our backend service layers.  DTO objects, some framework objects, etc.  So thus far I've been creating one folder structure and then placing two projects within.  So you'll have Project.csproj and Project.Silverlight.csproj in the same folder.  bin and Properties renamed to bin.SL and Properties.SL to keep that seperate.  Otherwise all of the class files and such are used within each project, just compiled down into different framework assemblies.

The problem is there is only one packages.config.  If I add something to one project, I can add it to the other project without any problems.

If I remove a package though, then it all starts falling apart because I can't remove it from the other project.

It seems to me like NuGet should be creating a file called Project.csproj.packages rather than a generic packages.config, because this is configurable at the project level.

Am I missing something?  For now we're going to move to a solution where the two projects sit in different folders and the SL4 project just references the files as linked files.

Jan 7, 2011 at 7:06 PM

That's an interesting point that hadn't come up.  Naming the file after the project file might make sense.  Can you please file a bug to track this?  Thanks!