Error resolving `System.Int32` on a .NET Core assembly
See original GitHub issueI’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:
- Created 7 years ago
- Comments:9 (9 by maintainers)
Top 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 >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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

I’m like 99% sure it’s this issue yes 😃
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) 😃