Skip to content

Error in pass2 for type MyExceptionTypeException, error: duplicate entry 'get_Message' in method table #14326

@nbevans

Description

@nbevans

Repro steps

    exception InitializeException of Message : string

Expected behavior

The exception type doesn't throw an exception at build time.

Actual behavior

It throws:

FSC : error FS2014: A problem occurred writing the binary 'C:\Sandbox\Singapore\Singapore.Mobile.Storage\obj\Debug\netstandard2.0\Singapore.Mobile.Storage.dll': Error in pass2 for type Singapore.Mobile.Storage.Tasks, error: Error in pass2 for type DataSet, error: Error in pass2 for type InitializeException, error: duplicate entry 'get_Message' in method table [C:\Sandbox\Singapore\Singapore.Mobile.Storage\Singapore.Mobile.Storage.fsproj]

Known workarounds

Change the exception type to:

exception InitializeException of MessageText : string

Related information
This is a regression that occurred after updating to VS 17.4.0

Metadata

Metadata

Labels

BugImpact-High(Internal MS Team use only) Describes an issue with extreme impact on existing code.Needs-TriageRegression

Type

No type

Projects

Status

Done

Relationships

None yet

Development

No branches or pull requests

Issue actions