.NET 6.0 - TypeLoadException
See original GitHub issueType of issue
[X] Bug
[ ] Question (e.g. about handling/usage)
[ ] Request for new feature/improvement
Expected Behavior
Should load the assembly.
Current Behavior
Referencing the library throws a TypeLoadException
, with zero information.
This happens when targeting .NET 6.0, and the actual dll copied to the bin folder is that of the .NET 6.0 (~120KB).
When overwriting with the .NET Standard dll, or the .NET 5.0 dll - it works.
Possible Solution (optional)
Recompile?
Steps to Reproduce (for bugs)
- New project
- Target .NET 6.0
- Reference QRCoder 1.4.3
- Reference any class from the library
Your Environment
- Version used: 1.4.3
- Compiled from source or NuGet package?: NuGet
- Payload/Encoded text:
- Used payload generator:
- Used ECC-level:
- Used renderer class:
- Environment (.NET 3.5, .NET 4.X, .NETCore, …): .NET 6.0 –>
Issue Analytics
- State:
- Created a year ago
- Reactions:22
- Comments:25
Top Results From Across the Web
.NET 6.0 upgrade gives System.TypeLoadException Could ...
I have a project which is currently running in .NET 5.0. It is written using C#. I installed .NET SDK 6.0.201 in my...
Read more >NET 6.0 upgrade gives System.TypeLoadException
net framework, due to some requirement one component we have migrated to .net 6 , then during instalation of artifacts I am getting...
Read more >Could not load type 'Microsoft.AspNetCore.Mvc.Internal. ...
NET Core 3.1 to .NET 6.0. After upgrade of project along with ... TypeLoadException: Could not load type 'Microsoft.AspNetCore.Mvc.Internal.
Read more >TypeLoadException Class (System)
TypeLoadException is thrown when the common language runtime cannot find the assembly, the type within the assembly, or cannot load the type.
Read more >TypeLoadException after upgrade to 6.3.0
Hello, After upgrading my .NET 6.0 project from using ServiceStack 6.1.0 to 6.3.0 (from nuget.org), I am encountering the following ...
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
You can enable System.Drawing for .NET 6. It’s disabled by default because some features are not available cross-platform, but this library does not use any of those.
all works fine with version Include=“QRCoder” Version=“1.4.1”