Possible to use a newer C# version?Solved
I've notice that the compiller and version of C# is quite old.
For exable when I tryed to use an inlined varable decleriarion the compiller said that it wasn't supported e.g:
method(out string str);​

And also local functions is not supported this was a pain in the ass because ofcaouse visuel studio told me to use local functions insted of the
Action Method = () => { }
but opcause the compiller had no idea what I was trying to do, and pointed at a complitly deffirent line then where the problem was, witch is understandable because the syntax of a local function is complitly invalid for the version of C# umod is using.

So here is the questions anyway to update the compiller and C# version used by the compiller? and what is the current C# version used by the compiller?

There are no plans to update the compiler for Oxide. It is based on Mono, so you could potentially compile and use it without the changes we make and how we bundle it, but that’d be a bit of work as you’d also have to disable some checks.

The compiler has been rewritten for uMod, but that will not be available for Oxide.

The currently supported C# version is 6 I believe.

Thanks. The compiller is showing errors on empty lines again :P

Btw when there is an error at runtime, forexable when a hook throws an expection, is there anyway to make it show what line the expection is thorwen in?

In response to TactiTac0z ():
Thanks. The compiller is showing errors on empty lines again :PBtw when there is an error at runtim...
Potentially, but not at the moment without a debug build of Oxide.
Also when you say version 6 you mean .netframework 6.0 right?
No, C# 6. There is no .NET 6.
Ohh yeah I ment 4.6 sorry about that. but how the heck do I chance c# version then :P in visuel studio, to make visuel studios error checking a bit better protentuelly
You can’t use any functions or methods from a newer C# version with the compiler, only C# 6 and below. If you want to limit the version in VS, you can create a project and set the LangVersion.
Alright seaching on google helps sorry

Merged post

yeah I did

Merged post

OMG I'm a fucking ideot :D You know when you ask visuel studio to auto generate an interface? it makes it in a seperate filed no fucking wounder it says it says the interface is not existing ... Took for 2 and half hours to find that out

Locked automatically