W
W
WhiteNinja2018-12-03 12:14:36
C++ / C#
WhiteNinja, 2018-12-03 12:14:36

What is the correct way to create NuGet packages in Solution with a large number of projects?

Good afternoon!
Please tell me how to create NuGet packages in a large Solution, for example:
-- MySolution --
Project1
Project2 (References on Project1)
Project3 (References on Project2 (and, accordingly, on Project1))
Project 4 (References on Project1, Project2 , Project3)
...
ProjectN (References on ProjectN-1...)
That is, projects depend on other projects.
Would it be correct to delete all References in all projects, and start uploading projects to NuGet recursively, starting with a project that does not depend on anything, and then connect it to dependent projects through NuGet and upload them to NuGet as well? It turns out "recursive flooding" in NuGet.
Or is there some other, better way?
Thanks in advance!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Iron Bug, 2018-12-03
@rare

Do you intend to use project2, project3 regardless of project1? If yes, then collect them separately in the form of packages, then connect them. If not, then you can first collect everything into one lib using ilmerge, and then pack it into .nupkg. For example, consul is going to be like this.
https://github.com/PlayFab/consuldotnet/blob/maste...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question