Fsharp: FS3186: An error occurred while reading the F# metadata node at position X in table 'itypars' of assembly .... The node had no matching declaration

Created on 14 Aug 2015  路  5Comments  路  Source: dotnet/fsharp

(With F#4)
If I compile an assembly with the following code:

``` F#
namespace badlib

open System
open System.Windows.Input

type Interface2<'T> =
inherit ICommand

type Class<'T>() =
interface Interface2<'T> with
[]
member __.CanExecuteChanged : IEvent = Event().Publish
member __.Execute(parameter : obj): unit = ()
member __.CanExecute(parameter : obj): bool = false


Then referencing the assembly from another assembly produces the following build error:

FSC: warning FS3186: An error occurred while reading the F# metadata node at position 4 in table 'itypars' of assembly 'badlib, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'. The node had no matching declaration. Please report this warning. You may need to recompile the F# assembly you are using.
```

bug

Most helpful comment

After Visual Studio 15.7 update I get similar kind of

FSC: warning FS3186: An error occurred while reading the F# metadata node at position 1 in table
'itycons' of assembly '...'. The node had no matching declaration. Please report this warning. 
You may need to recompile the F# assembly you are using.

All 5 comments

Thanks for the report and the repro code.

That warning was added in 4.0 as a mitigation for https://github.com/Microsoft/visualfsharp/issues/362, and points to invalid F# metadata generation. The assumption was that only earlier versions of F# were generating bad metadata this way. Will need to investigate how 4.0 is doing this, too.

Since this is only a warning, you can workaround in the meantime with /nowarn:3186.

@latkin

The reference of this issue to #632 is no longer valid.
Because it's different in context, not related to F# metadata. I also have answered the question there and the original submitter closed the issue.
I suggest to de-reference this issue to focus on F# metadata problems/issues. The reference to #631 is still valid, since it's basically the same context with different repro.
Could we de-reference this issue to #632?

FYI @KevinRansom , @kbattocchi

I investigated this. The warning is benign, you can add a #nowarn 3186 to your code, or as a project option. A fix is linked above.

Closing as this was fixed by the commit above

After Visual Studio 15.7 update I get similar kind of

FSC: warning FS3186: An error occurred while reading the F# metadata node at position 1 in table
'itycons' of assembly '...'. The node had no matching declaration. Please report this warning. 
You may need to recompile the F# assembly you are using.
Was this page helpful?
0 / 5 - 0 ratings