I found this question: how can i put components in external dlls and store dlls in asset bundles - Questions & Answers - Unity Discussions
It talks about using DLL’s in a project and that it would be possible to use MonoBehaviour inside of these DLL’s.
But C# also uses references to other projects with source files. Is it possible to add a reference to a library project as well? I would like to do this, because I want two projects to use one shared library with some general files.