coderiekelt / lidgren

A free networking engine
1 stars 0 forks source link

VS2010 sln/csproj #179

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Any chance you can put the VS2010 files back. lidgren is obviously very popular 
with XNA apps which are still stuck in VS2010 land.

Original issue reported on code.google.com by z...@thezbuffer.com on 2 Dec 2014 at 5:25

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Required changes to work with VS2010/.Net 4.0

Lidgren.Network.csproj:
    <TargetFrameworkVersion>v4.5.1</TargetFrameworkVersion>
to
    <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>

NetBuffer.Read.Reflection.cs and
NetBuffer.Write.Reflection.cs

#if UNITY_WEBPLAYER || UNITY_4_5
    var setMethod = fi.GetSetMethod();
#else
    var setMethod = fi.SetMethod;
#endif

Needs to use the first part of the #if somehow. Not sure if its safe for me to 
define Unity in case other things stop working too.

After some research GetMethod() and SetMethod() are still valid calls in .Net 
4.5 though the new properties work too. It doesn't look like its marked as 
obsolete either 
http://msdn.microsoft.com/en-us/library/system.reflection.propertyinfo.getsetmet
hod(v=vs.110).aspx

So there is probably no need for the #if at all.

Original comment by z...@thezbuffer.com on 3 Dec 2014 at 12:05

GoogleCodeExporter commented 9 years ago
I'll look into framework versions and solution files. In the mean time, just 
drop the files into an new solution and you should be good to go.

Original comment by lidg...@gmail.com on 3 Dec 2014 at 12:07

GoogleCodeExporter commented 9 years ago
Yes thsts what we did already, but its nice to be able to stay in sync with 
your bug fixes. Cheers

Original comment by z...@thezbuffer.com on 3 Dec 2014 at 12:08

GoogleCodeExporter commented 9 years ago
One idea would be to use protobuild - I've seen other open source projects use 
that. You make a protobuild definition file and it can automatically build all 
the different solution and project files for you depending on the versions 
required.

Original comment by z...@thezbuffer.com on 3 Dec 2014 at 12:09