Skip to content

Conversation

@dnenov
Copy link
Contributor

@dnenov dnenov commented Sep 2, 2025

Purpose

This PR is part of the dotnet 10.0 upgrade initiative for Dynamo and all supporting components.

The primary change in this transition is the removal of BinaryFormatter, which was previously used to deserialize embedded resources. Because the sample packages did not include any resources, it was difficult to evaluate the impact of this change.

To address this, I added a custom node icon to the original .NET 8.0 version and then implemented the proper handling for it in .NET 10.0. This ensures that the new approach to resource management is correctly demonstrated and validated.

Addresses https://jira.autodesk.com/browse/DYN-9195 part of https://jira.autodesk.com/browse/DYN-9194 epic.

Declarations

Check these if you believe they are true

  • Is documented according to the standards
  • The level of testing this PR includes is appropriate
  • User facing strings, if any, are extracted into *.resx files
  • Snapshot of UI changes, if any.
  • Changes to the API follow Semantic Versioning and are documented in the API Changes document.
  • This PR modifies some build requirements and the readme is updated
  • This PR contains no files larger than 50 MB
  • This PR introduces new feature code involve network connecting and is tested with no-network mode.

Release Notes

  • net10.0 upgrade changes
  • included an example of a custom icon to a Dynamo packge node

Reviewers

@saintentropy
@zeusongit
@QilongTang
@jasonstratton

FYIs

@achintyabhat

- adding a simple icon to a node to demonstrate the 8.0 workflow to contrast and show a fix when introducing 10.0
- now the image is added as a File and in .png format
- this alone works in order to correctly provide the icon to Dynamo
- updated all projects to target .net 10.0
- updated workflow yaml
- updated readme reference to dotnet
- add customisation.dll file to the build output directory
@dnenov dnenov marked this pull request as ready for review September 3, 2025 12:01
@dnenov dnenov changed the title Net 10.0 update DYN-9195: Net 10.0 update Sep 3, 2025
@QilongTang QilongTang requested review from a team and Copilot September 10, 2025 15:35
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR upgrades all sample projects from .NET 8.0 to .NET 10.0 as part of the broader Dynamo .NET 10.0 upgrade initiative. The upgrade addresses the removal of BinaryFormatter by implementing proper resource management through a custom node icon example.

  • Updates all project files to target .NET 10.0 framework
  • Adds resource handling infrastructure for custom node icons
  • Updates build pipeline and documentation to reflect .NET 10.0 requirements

Reviewed Changes

Copilot reviewed 11 out of 15 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/*/**.csproj Updated TargetFramework from net8.0 to net10.0 across all sample projects
src/SampleLibraryUI/SampleLibraryUI.csproj Added resource compilation and customization DLL generation for custom icons
src/SampleLibraryUI/Resources/SampleLibraryUI.resx New resource file defining custom node icons for demonstration
README.md Updated requirements to specify .NET 10.0
.github/workflows/build.yml Updated CI pipeline to use .NET 10.0 SDK
Files not reviewed (1)
  • src/SampleLibraryUI/Resources/SampleLibraryUI.Designer.cs: Language not supported

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment on lines 49 to 51
<ItemGroup>
<PackageFiles Include="$(OutDir)\SampleLibraryUI.dll;$(OutDir)\SampleLibraryUI.XML" />
<PackageFiles Include="$(OutDir)\SampleLibraryUI.dll;$(OutDir)\SampleLibraryUI.XML;$(OutDir)\SampleLibraryUI.customization.dll;$(ProjectDir)\Resources\SampleLibraryUIImages.resources" />
<ENResourceFiles Include="$(OutDir)\en-US\*.*" />
Copy link

Copilot AI Sep 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mixed indentation: this line uses tabs while surrounding lines use spaces. Please use consistent indentation (spaces) to match the rest of the file.

Copilot uses AI. Check for mistakes.
Comment on lines +122 to +125
<value>.\LargeIcons\SampleLibraryUI.Examples.DropDownExample.Large.png;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="SampleLibraryUI.Examples.DropDownExample.Small" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>.\SmallIcons\SampleLibraryUI.Examples.DropDownExample.Small.png;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
Copy link

Copilot AI Sep 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The resource references use mscorlib version 4.0.0.0, which is specific to .NET Framework. For .NET 10.0, these should reference the appropriate .NET runtime assembly. Consider using System.Private.CoreLib or removing the version-specific references to allow automatic resolution.

Suggested change
<value>.\LargeIcons\SampleLibraryUI.Examples.DropDownExample.Large.png;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="SampleLibraryUI.Examples.DropDownExample.Small" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>.\SmallIcons\SampleLibraryUI.Examples.DropDownExample.Small.png;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>.\LargeIcons\SampleLibraryUI.Examples.DropDownExample.Large.png;System.Byte[]</value>
</data>
<data name="SampleLibraryUI.Examples.DropDownExample.Small" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>.\SmallIcons\SampleLibraryUI.Examples.DropDownExample.Small.png;System.Byte[]</value>

Copilot uses AI. Check for mistakes.
@QilongTang
Copy link
Contributor

@dnenov Check out the latest Nuget after your PR merge, here: https://www.nuget.org/packages/DynamoVisualProgramming.Core/4.0.0-beta2526. Curious if this can be applied to any of the dependency in this repo

- updated nuget package references
@dnenov
Copy link
Contributor Author

dnenov commented Sep 16, 2025

@dnenov Check out the latest Nuget after your PR merge, here: https://www.nuget.org/packages/DynamoVisualProgramming.Core/4.0.0-beta2526. Curious if this can be applied to any of the dependency in this repo

All nugets updated now @QilongTang! It is building fine and loading as before.

@QilongTang
Copy link
Contributor

We will wait for newer Nugets with actual .NET10 built binaries before merging

@zeusongit
Copy link
Contributor

We will wait for newer Nugets with actual .NET10 built binaries before merging

We should update this now, as we have .Net10 nugets available?

@dnenov
Copy link
Contributor Author

dnenov commented Oct 1, 2025

We will wait for newer Nugets with actual .NET10 built binaries before merging

We should update this now, as we have .Net10 nugets available?

Updated all nugets to 4.0.0-beta2685

@QilongTang
Copy link
Contributor

@dnenov Please also touch https://github.com/DynamoDS/DynamoSamples/blob/master/.github/workflows/build.yml to make the build check pass

- update the dotnet-version: "10.0.100-preview.5.25277.114"
- update to latest nugets
@dnenov
Copy link
Contributor Author

dnenov commented Oct 15, 2025

@dnenov Please also touch https://github.com/DynamoDS/DynamoSamples/blob/master/.github/workflows/build.yml to make the build check pass

I updated the dotnet version now, and also update to the latest nuget packages!

@QilongTang QilongTang merged commit f3ca98b into DynamoDS:master Oct 21, 2025
9 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants