- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I've migrated a small ContextMenu app I've been using since 2010 to .NET 8 which now uses a System.Drawing.Common package in lieu of previous .NET Framework's assembly reference to same.
I skipped 2025, so am still new to .NET 8, NuGet, etc.
The app works great... for me, on multiple workstations, that each have VS installed... but I've had two folks I've shared the app with for a long time report that it's crashing on their end, and the rawdata-t2.pb crash reports both reference the exact same exception & PublicKeyToken code (at completely different companies), so I must have done something wrong:
System.IO.FileNotFoundException: Could not load file or assembly 'System.Drawing.Common, Version=9.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. The system cannot find the file specified.
File name: 'System.Drawing.Common, Version=9.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'
System.Drawing.Common 9.0.4 NuGet was used to build the app when they provided the crash reports. I've since upgraded that to 9.0.9 as VS said there was an update... but both crash reports list 9.0.0.0 (despite 9.0.4 being used to build?), so am I using the wrong NuGet, or is it that they just need an update?
The app is built for 2026 & 2026.1, so should work with OOTB dependencies.
The app uses System.Drawing for Icon & Bitmap types to populate a ContextMenu's MenuItems.
More specifically, since Autodesk deprecated Autodesk.AutoCAD.Internal.Utils.GetAcadResourceIcon() +3 years ago, I'd rolled my own extension method. Autodesk's implementation was limited to just Main cui, so when I wrote it, I enhanced it to also cull Enterprise CUI (if anyone wants it, I'll share).
Again, I've not had any issue with the extension method code itself, only with the app not loading properly and/or crashing due to System.Drawing.Common which is coming from NuGet package.
Please advise.
"How we think determines what we do, and what we do determines what we get."
Sincpac C3D ~ Autodesk Exchange Apps
Solved! Go to Solution.