Placing gamelogic in separate library / VS project

Has anyone experienced with designing the gamelogic in a different library (dll)? This gives you the possiblity of (unit)testing and blackboxing logic that could be reused at some point.

I'm currently working on a project using this approach, but I'm having some troubles with Unity automatically resyncing the VS solutions, excluding the gamelogic project. Does anyone know a fix for this?

The main goal is to have a VS solution which contains more projects (e.g logic & testing) than the Unity project itself.

You need to be more specific than "gamelogic". If you have specific self-contained components, then those should be good to separate/unit test; however most gameplay scripting is tightly coupled to the engine (e.g. physics) which you can't separate, because there's no way to update the state of rigidbody. Also you can't unit test for things like "is this fun?"

What I did in my current project was just to duplicate the auto generated solution, rename it, then add new projects to it.

Because unity recreates the .csproj each time, this keeps the new solution up to sync, though it does tend to swap back to the original project when you double click a file

You should create a separate test folder as a sibling of the Assets folder, inside which you should create your test solution. It should contain your test project and it should reference the automatically generated projects that Unity maintains.

This is the approach used by Uniject, the testability framework for Unity, which you can find on github -

You can find out more about Uniject here