Mods / RoslynSourceCompiler

Draft
Set to published to be listed. A draft mod is still visible to everyone via direct link
Category: #Utility
Author: Fulgen
Side: Both
Created: Jul 24th at 8:56 AM
Last modified: Jul 24th at 9:55 AM
Downloads: 81

This mod replaces the builtin C# source mod compiler with Roslyn, allowing Vintage Story to compile source files using features of C# > 5.0.

Example:

using Vintagestory.API.Common;
using Vintagestory.API.Server;

public class CSharp7Mod : ModSystem
{
	public override bool ShouldLoad(EnumAppSide forSide) => forSide == EnumAppSide.Server;
	public override void StartServerSide(ICoreServerAPI api)
	{
		static int Foo() => 3;
		api.Logger.Notification("CSharp7Mod {0}", Foo());
	}
}

To use it, simply put the DLL into your mod path. No further steps required.

Version For Game version Downloads Release date Changelog Download
v1.0.0 81 Jul 24th at 9:55 AM Show RoslynSourceCompiler.dll

0 Comments (oldest first | newest first)

delete edit