Adding a nuget package solution source to a solution

I have a project that consumes a NuGet package from a private NuGet feed. I also have the source code for this package in a separate project / solution. When I work on a project, I want to be able to temporarily add the mentioned package source code to the solution, so I can work with changes both in the project and in the nuget package at the same time.

In Visual Studio 2015 with the dotnet core and project.json / global.json, I can add the NuGet package to the project and then modify global.json to include the source from disk.

global.json:
{
   "projects" : [ "src", "../<path_to_external_source>/src" ]
}

This will temporarily change the link to the project on disk. Before moving to the build server, I just delete one line from global.json and remove the projects from the solution.

In Visual Studio 2017 and the dotnet core, the csproj core I don't seem to get this functionality. I have to remove the nuget package, manually add the source code through the "add / existing project" to the solution, and then manually add the link, and not remove the NuGet links. Then undo it all before clicking to create the server.

This is especially problematic when there are several projects in the solution that consume the NuGet package, and I need to go through this process with each of them.

Is there a way to reproduce global.json functionality in VS17?

+4
source share

Source: https://habr.com/ru/post/1681464/


All Articles