C#C
C#2y ago
stigzler

✅ How to solve "[MyType] cannot be cast to [MyType] due to different assembly versions.

This is due to my lack of knowledge around how Visual Studio manages references, I think. I have a custom Controls library. I store this on a personal NuGet and update any projects that depend upon it via the NuGet package manager.

Recently, When I drag a specific custom control onto a form, I get the attached error.

I tried uninstalling the library, cleaning solution then re-installing the library - same error. Where the hell are these different versions stored and why?

How do I fix this?
image.png
Was this page helpful?