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

Multi-Targeting with Full Debug Symbols results in Missing Method Exception #495

Closed
sebandraos opened this issue Mar 6, 2018 · 4 comments

Comments

@sebandraos
Copy link

When multi-targeting and using DebugType = Full, the issue below is thrown. There is a minimal repro here.

Fody: An unhandled exception occurred:
Method not found: 'Mono.Collections.Generic.Collection`1<Mono.Cecil.MethodDefinition> Mono.Cecil.Cil.AsyncMethodBodyDebugInformation.get_ResumeMethods()'.
Type: System.MissingMethodException
StackTrace:
   at Mono.Cecil.Pdb.NativePdbReader.Read(MethodDefinition method)
   at Mono.Cecil.Cil.CodeReader.ReadMethodBody()
   at Mono.Cecil.Cil.CodeReader.ReadMethodBody(MethodDefinition method)
   at Mono.Cecil.MethodDefinition.<>c.<get_Body>b__41_0(MethodDefinition method, MetadataReader reader)
   at Mono.Cecil.ModuleDefinition.Read[TItem,TRet](TRet& variable, TItem item, Func`3 read)
   at Mono.Cecil.MethodDefinition.get_Body()
   at RecursiveIlFinder.Execute(MethodDefinition getMethod)
   at IlGeneratedByDependencyReader.ProcessGet(PropertyDefinition property)
   at IlGeneratedByDependencyReader.Process()
   at ModuleWeaver.DetectIlGeneratedByDependency(List`1 notifyNodes)
   at ModuleWeaver.Execute()
   at lambda_method(Closure , Object )
   at InnerWeaver.ExecuteWeavers()
   at InnerWeaver.Execute()
Source: Mono.Cecil.Pdb
TargetSite: Mono.Cecil.Cil.MethodDebugInformation Read(Mono.Cecil.MethodDefinition)

I was able to reproduce the error by targeting any two or more frameworks, either a mix of core and framework, all core or all full framework. That said as soon as I dropped back to a single target framework the error disappears ditto if I switch the DebugType to Portable. I assume an assumption is made when multiple target frameworks are active that the PDBs are all portable.

@jbevain
Copy link
Owner

jbevain commented Mar 6, 2018

A missing method exception? That's very weird. As if the Mono.Cecil.dll and Mono.Cecil.Pdb.dll are not in sync.

@jbevain
Copy link
Owner

jbevain commented Mar 6, 2018

@SimonCropp Simon does this ring a bell?

@SimonCropp
Copy link
Contributor

first observation. it only occurs in VS. ie not in dotnet build or jetrains rider

@jbevain
Copy link
Owner

jbevain commented Jan 31, 2019

A missing exception sounds like a tooling error here. I'm going to assume this is no longer a problem, feel free to re-open if you still have issues.

@jbevain jbevain closed this as completed Jan 31, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants