I figured this might help someone, as I spent quite a bit of time figuring this one out last night trying to get my shard running on Linux for the first time last night. The shard has about a year and a half worth of development, and there were quite a few warnings that I've never bothered to fix because Windows compiled fine.

When trying to run under Mono, my shard would not start despite having 0 errors (only warnings). Turns out that mono will not let you compile with warnings that "hide inherited members".

An example of this warning might look something like this:
Code:
Warning 1 'Server.BaseWeapon.BaseWand.FireWorksWand.Charges' hides inherited member 'Server.BaseWeapon.BaseWand.Charges'. Use the new keyword if hiding was intended.

This is a reasonable warning to halt on, but it would be smarter if the compiler treated it as an error, since compiling fails and leads you scratching your head as to why. My shard had a lot of warnings and it took me a while of searching to find out that it was these warnings in particular causing it.

You'll have to fix these by either adding the "new" keyword to the variable/method, overriding where applicable or deleting the variable in the sub class if it is not actually necessary.

Examples might be:
Code:
public class BaseMob
{
   public virtual int VarToOverride{ get; set; }
   public int InheritedVariable{ get; set; }
}

public class MobOne : BaseMob
{
   // The below will cause a warning because this should be override and not virtual.
   public virtual int VarToOverride{ get; set; }
}

public class MobTwo: BaseMob
{
   /*
      The below will cause a warning because it is hiding "InheritedVariable" in the base class.
       Should be either "public new int InheritedVariable", or deleted because it already exists in 
       the baseclass.
   */
   public int InheritedVariable{ get; set; }
}

Hope this helps someone!
 
Yeah. This isn't a question thread, it's just intended as a resource so anyone Googling or searching the forums can find it if they are having trouble compiling on Mono with the same issue
 
Back