I have a C# solution with a referenced dll (also C# with the same .Net version). When I build the solution and run the resulting exe, without merging the exe and the refere
In case you merge assemblies into a existing one (for-example all DLLs to the EXE) you can use the solution proposed in this answer:
// AssemblyInfo.cs for My.exe
[assembly: TypeForwardedTo(typeof(SomeTypeFromMergedDLL))]
This at least works for deserializing pre-merge. IL-Merge also still passes; even if you can't compile with a type-forward to a type of the same assembly...
I have not tried, if serializing works post-merge yet. But I'll keep my answer updated.