-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
.NET 6.0 - TypeLoadException #393
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
Comments
Same here. |
Same here |
1 similar comment
Same here |
all works fine with version Include="QRCoder" Version="1.4.1" |
same here |
thanks , I can't find class QRCode in 1.4.3 , 1.4.1 is fine! |
Error : cs0246 : namespace 'QRCode' not found |
I have the same or similar issue, I am on a cross platform build, local macos and remote alpine linux container. We are in the process of upgrading from 3.1 to net6.0. And we came across this issue. My error is as follows:
Rolling back to 1.4.1 does not help my case, as I get a new exception throwing,
dotnet 6.0 removes support for the System.Drawing.Common only supported on Windows: Looks like the base64 encoder will need to find a cross platform alternative, PR anyone? |
Same here while upgrading to net6... |
1 similar comment
Same here while upgrading to net6... |
Is this project still being maintained? Now the basic demo in the home readme can produce this issue. Please fix this. |
Do we have any alternatives to this library that works in .net6? |
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. |
There are conditional compilation symbols in the QRCode class If you explicitly load the library from the netstandard2.0 folder instead the library works. You can technically even just replace the .dll in the output directory with the one from the netstandard2.0 folder. I would guess setting your target framework to net6.0-windows would also work. I don't know if this is because of a compatibility issue with some dependency or just an oversight. But it's essentially making the net6.0 version of the library match the netstandard1.3 version of the library - which doesn't have the QRCode class. I'd guess the compilation symbol should be NET5_0_OR_GREATER, but again I don't know if this was intentional or not. |
@willshoemaker thanks for your comment You can set option of your project to run on 'Windows' target |
I'm using QRCoder in a platform-independant (netstandard2.0) library which is then used in a .net6.0 project. It defeats the purpose to set TFM to net6.0-windows if I want to target both, windows and linux. Rolling back to QRCoder 1.4.1 until this issue is resolved. |
My issue was also not detecting the QRCode class, So rolling back to version 1.4.1 worked for me. If you have another issue I am not sure if rolling the version back will work |
Is this library still maintained? |
Last update was December 2022
…On Tue, 10 Jan 2023 at 6:17 PM, Thomas Galliker ***@***.***> wrote:
Is this library still maintained?
—
Reply to this email directly, view it on GitHub
<#393 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AWAUQIEBCP6NDXAPMC7XA33WRWDQHANCNFSM5RKL47HQ>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Okay. Because it looks like the latest version of this library doesn't work with .NET 6 - and .NET 6 is also pretty old already. |
Yes it does net, but if you roll back your version to 1.1 it works
…On Tue, 10 Jan 2023 at 6:58 PM, Thomas Galliker ***@***.***> wrote:
Okay. Because it looks like the latest version of this library doesn't
work with .NET 6 - and .NET 6 is also pretty old already.
—
Reply to this email directly, view it on GitHub
<#393 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AWAUQIBZVYSHGFFDA5XVPM3WRWIJ3ANCNFSM5RKL47HQ>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
That's what I did - and yes it works with an older version, thanks. But this is not a permanent solution, rather a quick workaround, do you agree? |
In the following issue may be the explanation to why it has changed tldr: DotNet 6 changed something and the library followed: |
Thanks, I'll check it out.
…On Fri, 17 Feb 2023 at 9:53 AM, ThaDaVos ***@***.***> wrote:
In the following issue may be the explanation to why it has changed
tldr: DotNet 6 changed something and the library followed:
#361 (comment)
<#361 (comment)>
—
Reply to this email directly, view it on GitHub
<#393 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AWAUQIES6BL36FAZUOPLWC3WX4VA3ANCNFSM5RKL47HQ>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
thanks a lot, it worked. |
|
Type 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)
Your Environment
-->
The text was updated successfully, but these errors were encountered: