question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error resolving `System.Int32` on a .NET Core assembly

See original GitHub issue

I’m using Mono.Cecil (via submodule, this commit currently: 272feac ), and encountering the following error when trying to resolve System.Int32.

System.NotSupportedException: Specified method is not supported.
  at Mono.Cecil.PE.ImageReader.ReadArchitecture () [0x00040] in <6f5dcfb43b83409e9bb6016a08899100>:0 
  at Mono.Cecil.PE.ImageReader.ReadImage () [0x0005c] in <6f5dcfb43b83409e9bb6016a08899100>:0 
  at Mono.Cecil.PE.ImageReader.ReadImage (Mono.Disposable`1[T] stream, System.String file_name) [0x00008] in <6f5dcfb43b83409e9bb6016a08899100>:0 
  at Mono.Cecil.ModuleDefinition.ReadModule (Mono.Disposable`1[T] stream, System.String fileName, Mono.Cecil.ReaderParameters parameters) [0x00006] in <6f5dcfb43b83409e9bb6016a08899100>:0 
  at Mono.Cecil.ModuleDefinition.ReadModule (System.String fileName, Mono.Cecil.ReaderParameters parameters) [0x0006f] in <6f5dcfb43b83409e9bb6016a08899100>:0 

The assembly in question was built via dotnet new classlib … so it’s the default template. It was created with 1.0.0-rc4-004771. And I’m adding assemblyResolver.AddSearchDirectory ("/usr/local/share/dotnet/shared/Microsoft.NETCore.App/1.1.0/").

At this stage, mainly trying to figure out if this is an issue on my end (should I be using another, special resolver?), or an issue in Mono.Cecil’s support for .net core. Any guidance would be appreciated 😃

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:9 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
jbevaincommented, Mar 7, 2017

I’m like 99% sure it’s this issue yes 😃

0reactions
joelmartinezcommented, Mar 7, 2017

Can confirm that the resolution to #337 (https://github.com/jbevain/cecil/commit/bb40c2108ecf303691d0536c4f9d3b9035790c5c) resolves this issue (once I finally got around to creating a repro case) 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unable to resolve service for type 'System.Int32' while ...
The BankAccountModel is created by DI container. While creating page model the container is resolving all constructor parameters in order to ...
Read more >
NET Core: Could not load file or assembly 'System. ...
This seems very similar to Issue 150 and Issue 139 but I could not solve the problem by removing dependencies to my shared...
Read more >
Type.GetType Method (System)
Gets the type with the specified name, optionally providing custom methods to resolve the assembly and the type. GetType(String, Func<AssemblyName,Assembly> ...
Read more >
Int32 Struct (System)
Represents a 32-bit signed integer.
Read more >
WPF .NET Core Designer - XLS0414 The type 'sys:Int32' ...
Error XLS0414 The type 'sys:Int32' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found