Hello, i have some questions regarding the .NET version i use.
At this moment, and since i started with RunUO, i had the version: 2.0.50727
which in my opinion is not up to date compared to 4.x, here are some questions i was wondering:

1: If i'd use VS to change the .net version, what would it change in the files? How can i do that action manually?

2: Will updating .NET version break most of what i worked on in the past?

3: I guess i would have to recompile the core?

4: Is ServUO using the latest version of .NET?

5: I was wishing to update only to include Linq in one of my systems, would this be a bright idea to do so?

6: I saw anoher way to include Linq, using LinqBridge, with which we can still use .NET 2.0, would it be a good idea too?

7: Is any of you concretly using Linq in your servers?

I can get my thing working without Linq in a dirty way, but i'm thinking in the long term, so i had to ask.
Thanks for your time.
 
I'm not familiar with doing this kind of thing, but here's a pretty good step by step explanation: https://social.msdn.microsoft.com/F...mework-upgrade-from-20-to-40?forum=netfxsetup

3: I guess i would have to recompile the core?
Probably, I'd recommend doing it

4: Is ServUO using the latest version of .NET?
I believe it's using 4. which is pretty new but not the "newest". I'm guessing for stability reasons

Sorry I can't give better answers, I'm sure someone who knows more about this topic with come around and I'm interested to see what they have to say as well.
 
I don't believe there's any drawback to updating to .NET 4.5. You'll have more compatibility with everything. The only reason I can think of not to is if your Visual Studio doesn't support it, which is only a download away. It won't break any of your previous scripts.

I personally use LINQ a lot in my RunUO scripts. In my opinion it makes code less cluttered and is actually easier to write once you get the hang of it. It makes ease of searching, sorting and list/dictionary manipulation.
 
4.0 also allows for optional parameters instead of using method overloading, makes it infinitely easier to create flexible classes and methods.
 
1: "If i'd use VS to change the .net version, what would it change in the files? How can i do that action manually?"

The .NET Framework's csc.exe always compiles code with the latest framework optimizations, so switching the target framework of your VS projects should be enough.

In older RunUO versions, 4.0 specific code is surrounded by checks on the "Framework_4_0" preprocessor symbol, this is optional.
The Framework_4_0 symbol can be define on the same project options page as the target framework option.
If you compile using a batch file or command-line, affix argument /d:Framework_4_0


2: "Will updating .NET version break most of what i worked on in the past?"

There may be some compile errors, but they generally involve small changes like updating ArrayList to List<T> (Type Generics, .NET 3.5)


3: "I guess i would have to recompile the core?"

Yes, definitely.


4: "Is ServUO using the latest version of .NET?"

ServUO targets 4.0 as some users still use Windows XP, which doesn't support 4.5+ without hackish mods.


5: "I was wishing to update only to include Linq in one of my systems, would this be a bright idea to do so?"

Updating from .NET 2.0 is almost essential at this point, if you don't update, you will essentially be writing code that forces you to use parts of the framework that are considered redundant/deprecated - one such example being List<T> in favour of ArrayLists.
A List<object> is pretty much the exact equivalent of a stock ArrayList, except it is more optimal.


6: "I saw anoher way to include Linq, using LinqBridge, with which we can still use .NET 2.0, would it be a good idea too?"

Sounds like it would be more work than just updating your framework target version.


7: "Is any of you concretly using Linq in your servers?"

Linq is used in the latest ServUO and RunUO versions, it is used in Map.cs to improve sector lookups and is also used in the new FastMovement implementation to optimize object collision detection.

Any server that adopts Vita-Nex: Core will be using Linq heavily, it is an amazing way to manipulate data.
 
Back