Rec'g a false-positive error on a sub that uses "overrides" keywor

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a child-class that inherits from a base class that implements an
Interface. The child class overrides a SUB from the base class that
implements a sub from the interface. (The "MapAttributesForImport" is a sub
in an interface that is implemented by the base class marked 'overridable'.)

This code was fine in VS2003/.net 1.1 and is in production.

BUT...While upgrading to the .net 2.0, VS2005 is giving me an error that
says "sub 'MapAttributesForImport' cannot be declared 'Overrides' because it
does not override a sub in a base class." This is not true and I have
verified the sub's signature matches. THE REALLY WEIRD THING IS that if I
remove the 'Overrides' keyword, the vs2005 designer then gives me an error
that says "sub 'MapAttributesForImport' shadows an overridable method in the
base class 'HRBaseExtension'. To override the base method, this method must
be declared 'Overrides' "


Thanks
 
Something to Add:

This call to the baseClass is in another project within the solution. If
the reference is made against the project I receive this error. If the
reference made made to the .dll generated by the project, the error is NOT
for the "overrides" keyword in the function definition.

Thanks!!!!
 
Back
Top