Creating .dll subproject in Visual Studio Code editor

porton picture porton · Dec 7, 2017 · Viewed 9.7k times · Source

I am going to create a .dll and an .exe using this .dll with C# and .NET.

How to create a .dll subproject in Visual Studio Code editor?

I develop on Debian Linux.

Answer

porton picture porton · Dec 7, 2017

Create folders for both the main .exe project and for the .dll subproject. .dll subproject folder should not be inside the main project folder.

Then in the main project folder run

dotnet add . reference ../xyz/xyz.csproj

where xyz is the name of the .dll subproject.

After this building the main project automatically builds the subproject too. Exactly what I need.