I have some common code between two project solutions, and I would like to link a source file from one solution to another. Specifically, I would like to add/link a single .cs file from a different solution to my current one.
This seems to be a good answer. However, Visual Studio Code does not have the add as link
or add existing item
. It only have Add Folder to Workplace
. Furthermore,dotnet add
and dotnet sln add
only takes .csproj file, which is the whole project.
So how do I achieve this?