I would like to report a resource compatibility issue with .NET 10 that appears to be distinct from the RESX regression I previously reported.
The previous issue affected .NET Framework 4.8 after upgrading to Elements 13.0.0.3125, producing the error “The input stream is not a valid binary format.” Your team reproduced that regression and announced a fix. Downgrading to 13.0.0.3081 restored the .NET Framework application’s behavior.
However, the following .NET 10 issue also occurs with 13.0.0.3081.
Environment:
- Oxygene / Elements / EBuild 13.0.0.3081
- .NET SDK 10.0.302
- Microsoft.WindowsDesktop.App 10.0.10
- Target: .NET 10, Windows, x86
- Visual Studio 2026; the reproduction was built directly with EBuild.
We created an isolated Oxygene test project with a newly created .resx containing:
- A string.
- A
ResXFileRefreferencing a newly generated PNG asSystem.Drawing.Bitmap. - A
ResXFileRefreferencing an ICO file asSystem.Drawing.Icon.
These were new test resources, not resources copied from our legacy application.
The project uses the standard EmbeddedResource approach, as shown in the installed WinForms Core template, without external resource generation:
<TargetFramework>.NET10.0-windows</TargetFramework>
<NETCoreRuntime>Microsoft.WindowsDesktop.App</NETCoreRuntime>
<NETCoreRuntimeVersion>10.0.10</NETCoreRuntimeVersion>
<NETCoreSDKVersion>10.0.302</NETCoreSDKVersion>
<EmbeddedResource Include="Resources.resx">
<LogicalName>ProvaRecursos.Resources.resources</LogicalName>
</EmbeddedResource>
After a successful build, the test reads each resource using System.Resources.ResourceManager.GetObject.
Results:
| Test | Result |
|---|---|
| Native EBuild compilation | Successful |
| String resource | Loaded successfully |
| Bitmap resource | Failed |
| Icon resource | Failed |
Both the bitmap and icon fail with:
System.NotSupportedException:
BinaryFormatter serialization and deserialization are disabled within this application.
See https://aka.ms/binaryformatter for more information.
In our actual .NET 10 application, generating resources separately through the Microsoft SDK’s GenerateResource task with UsePreserializedResources="true" works. EBuild then embeds the generated .resources files.
However, our goal is to use native resource processing directly from .resx, as we would expect for a new Oxygene .NET 10 application, without maintaining a separate resource-generation project and resource list.
Could you please clarify:
- Is there a supported EBuild setting to generate image and icon resources that load correctly on .NET 10 without enabling BinaryFormatter?
- Is the direct
EmbeddedResourceapproach the recommended configuration for a new Oxygene WinForms application targeting .NET 10? - Is this behavior related to the previously acknowledged RESX regression, or does it require a separate fix?
Thank you.