C
C#10mo 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?
No description
2 Replies
stigzler
stigzlerOP10mo ago
Packages.Config:
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="LiteDB" version="5.0.17" targetFramework="net472" />
<package id="stigzler.Utilities.Base" version="1.0.4" targetFramework="net472" />
<package id="stigzler.Winforms.Base" version="0.8.43" targetFramework="net472" />
</packages>
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="LiteDB" version="5.0.17" targetFramework="net472" />
<package id="stigzler.Utilities.Base" version="1.0.4" targetFramework="net472" />
<package id="stigzler.Winforms.Base" version="0.8.43" targetFramework="net472" />
</packages>
Forget it - I forgot to restart Visual Studio 🤣 Gotta love the lumbering, idiosyncratic beast!
Unknown User
Unknown User10mo ago
Message Not Public
Sign In & Join Server To View
Want results from more Discord servers?
Add your server