Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report on
GitHub or Developer Community with
your current version information, steps to reproduce, and relevant error
messages or log files if you are hitting an issue that looks similar to
this resolved bug and you do not yet see a matching new report.
When compiling with mcs, the following code causes error CS1061, while csc compiles it without errors.
public abstract class ThingWithOrganizationId
public Guid OrganizationId;
public class Thing : ThingWithOrganizationId
public abstract class BaseService<TConstraint>
public abstract void Save<T> (T newThing) where T : TConstraint;
public class DerivedService:BaseService<Thing>
public override void Save<TThing>(TThing newThing)
This is the error message returned by the compiler:
error CS1061: Type TThing' does not contain a definition forOrganizationId' and no extension method OrganizationId' of typeTThing' could be found. Are you missing an assembly reference?
I am trying to compile this on a Mac, this is the output of "mcs --version":
>Mono C# compiler version 188.8.131.52
I am not sure this is a minimal reproduction, but this is the shortest example I've been able to produce.
Moving OrganizationId to the derived Thing class causes this to compile without errors, so does making Save a non-virtual method.
Fixed in master