Reference .NET Core csproj file directly like a NuGet package
I would like to be able to reference a .NET Core csproj file from LINQPad, similar to how NuGet references work. LINQPad could read the package references from the csproj file and add those NuGet packages, then it could locate the dll that is output by the csproj and add that as a reference. This would make testing changes made in a project with LINQPad extremely simple. Currently I have to package the project, move the package to a local NuGet feed, clear the LINQPad NuGet cache for that package, and readd the package reference in LINQPad.
This functionality is supported in recent versions of LINQPad 6. Referencing the DLL in the output folder has the same effect as referencing the .csproj file: it automatically references all the NuGet packages that the project does (it gets these by parsing the .deps.json file). LINQPad will even restore the NuGet packages if the correct dependencies are not available for the target framework version.
-
Thomas Levesque commented
Yes, that would be very useful. Currently I reference the assemblies directly, which is a pain, because I have to take cake of transitive dependencies myself.
Just being able to reference a csproj and automatically pull its dependencies would be awesome