nuget packages in local work

what is the best way to handle nuget references in two local projects without making work harder?

NuGet has many advantages as a package manager for the Microsoft development platform, this does not mean that it is not flawed. Just as you encountered, if the referenced project is modified frequently, we have to rebuild it, build nuget, publish it for each modification. That will bring a lot of boring work. To resolve this disadvantages, the Project-to-project references should be a better way.

The advantage of a project-to-project reference is that it creates a dependency between the projects in the build system. The dependent project will be built if it has changed since the last time the referencing project was built. A file reference does not create a build dependency, so it is possible to build the referencing project without building the dependent project.

So what you have done is the best way. The project-to-project reference should be recommend when the referenced project is modified frequently, the nuget reference is more appropriate when share the reference project to others or publish it.


In the Node community, local packages problem is long solved with symbolic links (see this blog post and npm link command).

How it works: the directory of a distributed package is "symlinked" to package source directory. In this way, package consumers are transparently redirected to package source project, and changes in package sources are automatically reflected on the consumer side.

For some reason, NuGet still has no link feature. There is a feature request https://github.com/NuGet/Home/issues/1821, which indicates they have no plans of adding it.

Meanwhile I created a tool, which works similarly to npm link for NuGet packages, you may want to give it a try: https://www.nuget.org/packages/NuLink