How can I use C# classes that exist outside of my Asset folder?

My game’s multiplayer server exists as separate .NET project that is in a folder outside of my Asset folder. They both use a C# class called Packets.cs which has to be exactly the same for the game and the server because they communicate using the same packets. So I have to copy and paste it in both places every time I change it. It would be really nice if I could just reference the same class from both places. Is that possible?

That’s not really possible in Unity. However probably the best solution is to setup a hardlink inside your Assets folder. If you need multiple shared files you could create a junction of a folder instead. That way both projects have direct access to the same file. Note that hardlinks and junctions only work on the same volume.