❔ Wpf app can't find libraries at runtime
I have a WPF app that's using a couple libraries that I installed from nuget. But when I do something in the app that tries to use the libraries, I get a "Could not load file or assembly" error. Weird thing is, I created a small test app does nothing but call a method with the library and it works fine.
4 Replies
do the libraries target the same framework your app does?
i've seen that trying to use a netfx library from a newer .net project
Yes. The app was originally written in .NET5 but we switched it and the libraries over to .NET6. That's when the problem started. I spent this morning recreating the whole app starting in .NET6, but I'm still getting the same problem.
maybe this can help you track it down? i don't think i've used it since .NET Framework so i'm not sure it still applies https://stackoverflow.com/questions/255669/how-to-enable-assembly-bind-failure-logging-fusion-in-net
Stack Overflow
How to enable assembly bind failure logging (Fusion) in .NET
How do I enable assembly bind failure logging (Fusion) in .NET?
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.