Public class CreateManifestResourceName has internal abstract member SourceFileExtension
Steps to reproduce
Write a class that extends CreateManifestResourceName , for example
public class CreateMyLangManifestResourceName : CreateManifestResourceName { public override bool Execute() { return true; } protected override string CreateManifestName( string fileName, string linkFileName, string rootNamespaceName, string dependentUponFileName, Stream binaryStream ) { return null; } protected override bool IsSourceFile( string fileName ) { return true; } }
build the class and you get this error: error CS0534: 'CreateMyLangManifestResourceName' does not implement inherited abstract member 'CreateManifestResourceName.SourceFileExtension.get'
Add the override:
public class CreateMyLangManifestResourceName : CreateManifestResourceName { <… same methods as before …> internal override string SourceFileExtension => throw new NotImplementedException(); }
Now you get 2 errors:
error CS0115: 'CreateMyLangManifestResourceName.SourceFileExtension': no suitable method found to override error CS0534: 'CreateMyLangManifestResourceName' does not implement inherited abstract member 'CreateManifestResourceName.SourceFileExtension.get'
Expected behavior
Successful compilation of derived class
Actual behavior
Errors because SourceFileExtension is 'internal abstract'... It must be either public or protected + abstract, like IsSourceFile or CreateManifestName.
Environment data
I see this is a duplicate of #4759, closing it.