Migrating node icons to .NET 10
Overview
Dynamo 4.0 runs on .NET 10. If your package includes node icons, you may need to update how those icons are stored. Packages that still use the old icon format may fail to build, or icons may not appear in the node library.
This guide explains what changed, why, and how to update your package.
Why icons broke
Node icons in Dynamo packages are stored in a *Images.resx file, compiled into a YourPackage.customization.dll, and loaded at runtime by Dynamo.
Historically, many packages embedded icons as System.Drawing.Bitmap objects inside the .resx file. That format relies on BinaryFormatter for serialization. BinaryFormatter was removed in .NET 10, so:
Build time:
GenerateResourcemay fail when processing old.resxentries.Runtime:
ResourceManager.GetObject()may throw when Dynamo tries to load icons.
Dynamo's built-in libraries were migrated in #16478 by avoiding BinaryFormatter entirely — icons are now stored as raw PNG byte[] data via ResXFileRef, not as serialized Bitmap objects.
There is no drop-in BinaryFormatter replacement. The supported approach is to migrate your icon resources to the new format.
Who needs to act
You need to migrate if your package:
Targets Dynamo 4.0 / .NET 10, and
Has a
YourPackageImages.resx(or similar) with entries like:
You do not need to change:
String localization
.resxfiles (Properties/Resources.resx) — these are unaffected.Packages with no node icons.
The overall
*.customization.dllpipeline — only the content format inside the.resxchanges.
How Dynamo loads icons (unchanged)
The loading pipeline is the same as before:
Your node library builds
YourPackage.dll.A post-build step compiles
YourPackageImages.resx→YourPackage.customization.dll.Both DLLs are placed in
package/bin/.Dynamo loads icons via
ResourceManager("{AssemblyName}Images", customizationAssembly).
What changed is the type of data stored in the resource assembly: byte[] (PNG bytes) instead of serialized Bitmap.
Migration steps
1. Extract icons as PNG files
For each embedded icon in your .resx, save it as a standalone .png file. A typical layout:
Naming rules:
Each node needs a Small and Large icon.
Resource keys use the format
{FullyQualifiedNodeName}.Smalland{FullyQualifiedNodeName}.Large.Match the fully qualified type name Dynamo uses for the node (e.g.
MyCompany.MyPackage.Nodes.MyNode).Use exact case in file names and
.resxpaths — Linux builds are case-sensitive.
2. Update the .resx file
Replace embedded Bitmap entries with ResXFileRef entries pointing at your PNG files.
Before (does not work on .NET 10):
After (.NET 10 compatible):
Tip: In Visual Studio, open
MyPackageImages.resx, remove the old embedded images, then drag PNG files into the resource editor. VS generates theResXFileRefentries automatically.
3. Confirm the build target (.csproj)
The customization DLL build step is unchanged. Ensure your .csproj still contains something like:
Also update your target framework:
4. Update custom icon-loading code (if any)
Most packages rely on Dynamo's built-in icon loading and need no code changes. If your package loads icons directly from a ResourceManager, update the deserialization.
Before:
After:
For base64 encoding (e.g. a web-based library view):
This matches how Dynamo loads icons internally as of #16478.
5. Rebuild and verify
Rebuild the package on the .NET 10 SDK.
Confirm
MyPackage.customization.dllis produced inbin/.Install the package in Dynamo 4.0 Sandbox.
Check that icons appear in the library for all nodes.
If you support cross-platform builds, verify PNG file names match
.resxpaths exactly (case-sensitive).
Complete minimal example
Project layout:
SamplePackageImages.resx (excerpt):
SamplePackage.csproj (excerpt):
Published package layout:
Troubleshooting
Build fails on GenerateResource
Old embedded Bitmap entries remain
Convert all icon entries to ResXFileRef
Icons missing at runtime, no build error
Stale customization.dll from pre-migration build
Clean and rebuild; republish package
Icons work on Windows, fail on Linux CI
Case mismatch between .resx path and PNG file name
Align casing exactly
InvalidCastException on GetObject()
Code still casts to Bitmap
Read byte[] and construct Bitmap from MemoryStream
Wrong / default icon shown
Resource key doesn't match node name
Use fully qualified node name + .Small/.Large suffix
What not to do
Do not try to re-enable
BinaryFormatter— it is removed in .NET 10 by design.Do not embed new icons as
System.Drawing.Bitmapin.resxfiles.Do not omit the
customization.dllfrom the publishedbin/folder.
References
Last updated