SharedCode is a feature in 2sxc 10.01 and compiles a CSharp file for sharing code across apps. This polyfill implement only parts of what SharedCode does, but it should suffice for most use cases. 

Usually you'll see code ca. like this:

var someObject = SharedCode("MyThing.cs");

This simply compiles the CSharp and returns the object. It assumes that this file contains a class called MyThing. As a polyfill, add this function:

private dynamic InstantiateClass(string name){
	var fileName = name + ".cs";
	var path = System.IO.Path.Combine("~", App.Path, getEdition() , "api/Parts", fileName);
	var assembly = BuildManager.GetCompiledAssembly(path);
var compiledType = assembly.GetType(name, true, true);

	object objectValue = null;
	if (compiledType != null)
	{
		objectValue = RuntimeHelpers.GetObjectValue(Activator.CreateInstance(compiledType));
		return ((dynamic)objectValue);
	}
	throw new Exception("Error while creating class instance.");
}

Then call it using something like:

var someObject = CreateInstance("MyThing")

Note that this polyfill doesn't do everything SharedCode does - for example, it doesn't add object of the current context like App, Dnn etc. to the other class.