-
Notifications
You must be signed in to change notification settings - Fork 49
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
Could not load type 'PhotoSauce.MagicScaler.Converters.ChannelChanger`1' #125
Comments
That type was renamed in 4a5048a, but it was internal and is no longer referenced anywhere in my code. I'd guess either you've got a mismatched codec assembly version (NuGet dependencies should prevent that) or you've got something using it through reflection (in which case you get what you get). |
I'm not using any reflation related to this library, just resizing large number of images from web.... |
Here is stack: System.TypeLoadException: Could not load type 'PhotoSauce.MagicScaler.Converters.ChannelChanger`1' from assembly 'PhotoSauce.MagicScaler, Version=0.14.0.0, Culture=neutral, PublicKeyToken=fc6b9b7b06809481'. |
Ok, that'll be an incompatible version of the libpng codec plugin. You need to update that to https://www.nuget.org/packages/PhotoSauce.NativeCodecs.Libpng/1.6.39-preview1. The dependencies are set up correctly in the packages (e.g. the older codec library is version restricted to Same applies to all of the codec plugin packages. There are updated versions of all of them tied to the new version of the MagicScaler package. I'm curious how you got in that state since the SDK should refuse to restore an incompatible combination of dependent packages. |
Aha....Tnx. Here are my project references:
I updated main MagicScaler package from visual studio but I did not see plugin updates as they are still published as previews and I did not check "include prerelase" in VS package manager. I'm not sure what SDK does in that situation but I received no warning and everything compiled nicely.... |
Ah, that's a bummer. I knew they wouldn't show up by default in the VS UI because of the preview version, but I assumed the package restore would fail and give you a clue. I really prefer to leave the codec packs tagged as preview for now, but that's obviously not a great user experience. Thanks for letting me know about the friction there. For now, I'll add something to the release notes to call out the incompatibility. |
FYI, I tried to reproduce this to log a bug against the NuGet client, but I'm getting a warning as expected in both the 7.0 and 8.0RC2 SDKs (also visible in the VS Error List window).
Maybe you missed the warning? I guess they wouldn't make it an error severity because they have no way of knowing whether the incompatibility will actually cause issues at runtime or not... |
yea I missed the warning, i have a lot :) |
After updating to 0.14 (dotnet 7 on linux):
The text was updated successfully, but these errors were encountered: