FlexibleBinder doesn't work correctly for >=.NET 4
I was trying to use the forge networking library in .NET 4.5.1 and I noticed that the $type field in the serialized network messages were always empty. I traced it back to SerializationHelpers, specifically FlexibleBinder which reads types from TypeCache. For some reason breakpoints did not trigger in this class so I could not investigate further.
Removing the Binder entry from the settings solves this issue. (Json.net seems to find the types without issue)
The easiest way to reproduce is to change the .net framework level to >4 in NetworkingDebug then start / connect to the server, the serialization exception will be triggered. Weirdly, the framework version stays at 3.5. I'm not sure if I'm doing it right, I started coding in c# yesterday, so still figuring visual studio and how assemblies work...
The build process only supports .NET 3.5 or .NET 4.0 CP right now. It really needs to be rewritten to support more platforms.
There is currently an issue with TypeCache.FindType where it fails to discover private types. I'll push the fix as soon as I am able. FlexibleBinder is using TypeCache.FindType to lookup types.
Okay, so it turns out there's a new method in SerializationBinder in .net 4.0, BindToName: http://msdn.microsoft.com/en-us/library/system.runtime.serialization.serializationbinder.bindtoname(v=vs.110).aspx
Everything works fine when it's implemented. Though you'll have to do some ugly ifdefs.
Is it just the build system, or are there any code parts that might not work with 4.5? I'm fine with 4.0cp, but I'm curious if there are more things that won't work (with 4.0cp that is)
thanks!