Recently I started messing with the xproj projects in Visual Studio 2015. While building a web app, I have a class library located in a different solution that I'm able to reference using a global.json file. I love this feature because you can build it all in one shot as opposed to switching between Visual Studio instances.
I find out now Microsoft is moving away from these projects and going back to the csproj way of doing things. I'm all about keeping up with best practices, but I can't seem to figure out how to bring external projects into a solution in the same way you can do it with the global.json. I'm also embarrassed to admit I can't seem to think of how to google for this.
Is there a new, recommended way of doing this in Visual Studio 2017?
We can use the dotnet
command line inteface to add an existing project...
to a project:
C:\temp\Bar> dotnet add .\Bar.csproj reference ..\Foo\Foo.csproj
to a solution:
C:\temp\Bar> dotnet sln .\Bar.sln add ..\Foo\Foo.csproj
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With