Question

Our situation might not be ideal, but we have a solution with about 10 core libraries which have various dependencies. Were trying to move to Nuget to get this solutions dependencies as well as package the libraries in this solution into a Nuget package.

It seems like there's no way to generate a nuspec file that will take into account all the projects in a solution. I assume we can't have multiple nuspec files if we want a single package, so are we left with either manually managing the nuspec file or building our own tool to look at all the projects and generate the file? Are there any other alternatives for generating the nuspec file and still have all the deps and assemblies as I've laid out?

Was it helpful?

Solution 2

We decided we were going about it the wrong way; since many of the base libraries themselves have dependencies (eg we had a project that contain our MVC 3 specific code) we ended up packaging them all separately, using a generated NuSpec file based on each individual project file. This way we don't force dependencies downstream unless you really are using MVC 3 for example.

OTHER TIPS

Sounds like you're building some kind of framework, I'm currently in the same position of setting up this kind of solution for our set of libraries so, i'll try to explain my current plan,

  1. Create a nuspec for all libraries.
  2. Create a main project for the whole framework, create a nuspec for that project
  3. Add nuget dependencies to all the libraries to your main framework nuspec file (see the official reference on dependencies)

That way you'll only have to add /update the framework nuget package in the projects where you want to use it, and all libs will get added.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top