Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
marklam opened this issue Aug 14, 2015 · 5 comments
Labels

Comments

@marklam
Copy link

marklam commented Aug 14, 2015

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

namespace badlib

open System
open System.Windows.Input

type Interface2<'T> =
    inherit ICommand

type Class<'T>() =
    interface Interface2<'T> with
        [<CLIEvent>]
        member __.CanExecuteChanged : IEvent<EventHandler,EventArgs> = Event<EventHandler,EventArgs>().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.
@latkin
Copy link
Contributor

latkin commented Aug 16, 2015

Thanks for the report and the repro code.

That warning was added in 4.0 as a mitigation for #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.

@eriawan
Copy link
Member

eriawan commented Oct 6, 2015

@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

@dsyme
Copy link
Contributor

dsyme commented Oct 8, 2015

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.

@dsyme
Copy link
Contributor

dsyme commented Nov 10, 2015

Closing as this was fixed by the commit above

@Thorium
Copy link
Contributor

Thorium commented May 8, 2018

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants