Skip to content

DYN-10098 Backport .NET 10 framework migration to legacy 3.6.2 branch#16863

Open
Copilot wants to merge 12 commits intoRC3.6.2_masterfrom
copilot/backport-dotnet10-support
Open

DYN-10098 Backport .NET 10 framework migration to legacy 3.6.2 branch#16863
Copilot wants to merge 12 commits intoRC3.6.2_masterfrom
copilot/backport-dotnet10-support

Conversation

Copy link
Contributor

Copilot AI commented Jan 30, 2026

Backports .NET 10 framework support from RC4.0.x branches. Migrates from .NET 8.0 → .NET 10.0.100 (LTS, final release). Framework changes only—PythonNet3 features excluded.

Cherry-picked commits

Commit PR Changes
fb1f8a33 #16478 Core migration: CS_SDK.props → net10.0, workflows updated, resources regenerated
d777883d #16517 Added global.json with SDK 10.0.100
1dee891a #16525 Multi-target DynamoServices: netstandard2.0 + net8.0 + net10.0
9e688e45 #16520 Fixed Windows MAX_PATH: renamed long resource paths to SHA hashes
2822f9f #16521 IntegerOverflow fix
9f318c0 #16501 Switching to a DS-specific escaper
c8a24222 #16566 Pinned to Preview 5 for stability
24ec5bbf #16583 Workflow version alignment
8d4f15cb (this PR) Upgraded Preview 5 → final release, rollForward: latestFeature

Scope

Included: Framework migration, build infrastructure, multi-targeting, resource regeneration, path fixes
Excluded: PythonNet3 changes from f30eda3d (engine updates, library changes, UI features)

Key changes

  • src/Config/CS_SDK.props: net8.0 → net10.0
  • global.json: SDK 10.0.100, rollForward: latestFeature
  • Workflows: .github/workflows/*.yml → dotnet-version: 10.0.x
  • src/NodeServices/DynamoServices.csproj: Multi-target net8.0 + net10.0
  • Resource files: Regenerated for .NET 10, long paths renamed
  • README.md: Build requirements updated

Build requirements

  • .NET 10 SDK (10.0.100+, LTS through Nov 2028)
  • Visual Studio 2022+
Original prompt

Plan how to backport .NET10 framework support to legacy target branch then wait. More specifically, this may involve locating and cherry-picking only the .NET10 migration changes from master branch to current branch so there will be not other feature gap.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 6 commits January 30, 2026 23:53
Co-authored-by: QilongTang <3942418+QilongTang@users.noreply.github.com>
Co-authored-by: QilongTang <3942418+QilongTang@users.noreply.github.com>
Co-authored-by: QilongTang <3942418+QilongTang@users.noreply.github.com>
Co-authored-by: QilongTang <3942418+QilongTang@users.noreply.github.com>
Co-authored-by: QilongTang <3942418+QilongTang@users.noreply.github.com>
Co-authored-by: QilongTang <3942418+QilongTang@users.noreply.github.com>
Copilot AI changed the title [WIP] Backport .NET10 framework support to legacy target branch Backport .NET 10 framework support to legacy branch Jan 31, 2026
Copilot AI requested a review from QilongTang January 31, 2026 00:02
Co-authored-by: QilongTang <3942418+QilongTang@users.noreply.github.com>
Copilot AI changed the title Backport .NET 10 framework support to legacy branch Upgrade .NET 10 Preview 5 to final release (10.0.100) Jan 31, 2026
@github-actions github-actions bot changed the title Upgrade .NET 10 Preview 5 to final release (10.0.100) DYN-9196: Backport .NET 10 framework support to legacy branch Jan 31, 2026
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

See the ticket for this pull request: https://jira.autodesk.com/browse/DYN-9196

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

See the ticket for this pull request: https://jira.autodesk.com/browse/DYN-9196

Copilot AI changed the title DYN-9196: Backport .NET 10 framework support to legacy branch Backport .NET 10 framework migration to legacy branch Jan 31, 2026
@QilongTang QilongTang marked this pull request as ready for review January 31, 2026 04:40
@github-actions github-actions bot changed the title Backport .NET 10 framework migration to legacy branch DYN-9196: Backport .NET 10 framework support to legacy branch Jan 31, 2026
@github-actions github-actions bot changed the title Backport .NET 10 framework migration to legacy branch DYN-9196: Backport .NET 10 framework support to legacy branch Jan 31, 2026
@QilongTang QilongTang changed the title DYN-9196: Backport .NET 10 framework support to legacy branch DYN-10098 Backport .NET 10 framework migration to legacy branch Feb 1, 2026
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

See the ticket for this pull request: https://jira.autodesk.com/browse/DYN-10098

@zeusongit zeusongit changed the title DYN-10098 Backport .NET 10 framework migration to legacy branch DYN-10098 Backport .NET 10 framework migration to legacy 3.6.2 branch Feb 2, 2026
@@ -240,6 +240,23 @@ internal static string ToLiteral(string input)
Copy link
Contributor

Choose a reason for hiding this comment

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

@copilot, does CodeDom need to be replaced for .NET 10 as was done in this PR: #16501?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The current implementation uses CodeDom with special handling for .NET 10's concatenated string format (added in commit 1d33469 from PR #16478).

I wasn't able to locate PR #16501 in the repository history. Could you share more details about the DS-specific escaper approach mentioned in that PR? If there's a better solution that replaces CodeDom entirely, I'd be happy to incorporate it.

The current workaround handles the new string concatenation behavior in .NET 10, but if there's a more robust alternative, that would be preferable.

Copy link
Contributor

@aparajit-pratap aparajit-pratap Feb 5, 2026

Choose a reason for hiding this comment

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

@copilot, the DS escaper solution implemented in #16501 is as follows:

/// <summary>
        /// Escapes a string for use in DesignScript string literals.
        /// Uses the same escaping logic as the Parser's GetEscapedString but in reverse,
        /// ensuring perfect round-trip compatibility with the DesignScript parser.
        /// Handles all standard escape sequences: \\, \", \a, \b, \f, \n, \r, \t, \v, \0
        /// Returns the escaped content without surrounding quotes.
        /// </summary>
        /// <param name="input">The string to escape</param>
        /// <returns>The escaped string suitable for DesignScript string literals</returns>
        internal static string ToLiteral(string input)
{
            if (input == null)
                return string.Empty;

            // Fast path: check if string needs escaping
            var needsEscape = false;
            for (int i = 0; i < input.Length; i++)
{
               
                char c = input[i];
                if (c == '\\' || c == '"' || c == '\a' || c == '\b' || c == '\f' || 
                    c == '\n' || c == '\r' || c == '\t' || c == '\v' || c == '\0')
                {
needsEscape = true;
                    break;
                }
            }
            
            if (!needsEscape)
                return input;
// Slow path: escape the characters that need escaping
            var sb = new System.Text.StringBuilder(input.Length + 8);
for (int i = 0; i < input.Length; i++)
            {
                char c = input[i];
                switch (c)
                {
                    case '\\':
                        sb.Append("\\\\");  // backslash
                        break;
                    case '"':
                        sb.Append("\\\"");  // quote
                        break;
                    case '\a':
                        sb.Append("\\a");   // alert
                        break;
                    case '\b':
                        sb.Append("\\b");   // backspace
                        break;
                    case '\f':
                        sb.Append("\\f");   // form feed
                        break;
                    case '\n':
                        sb.Append("\\n");   // newline
break;
                    case '\r':
                        sb.Append("\\r");   // carriage return
                        break;
                    case '\t':
                        sb.Append("\\t");   // tab
                        break;
                    case '\v':
                        sb.Append("\\v");   // vertical tab
                        break;
                    case '\0':
                        sb.Append("\\0");   // null character
                        break;
                    default:
                        sb.Append(c);  // Unicode and all other characters go through as-is
                        break;
                }
            }
            
            return sb.ToString();
}

@copilot, is this better?

@QilongTang
Copy link
Contributor

Only one reported regression from https://master-15.jenkins.autodesk.com/view/DYN/job/DYN-Dynamo/job/DynamoBuildscripts/job/RC3.6.x_master/5/, then I found Copilot missed cherry-picking #16521. Done in the latest commit

@QilongTang
Copy link
Contributor

@DynamoDS/eidos This PR is ready for a final review. See PR description for all cherry-picked PRs

@sonarqubecloud
Copy link

sonarqubecloud bot commented Feb 6, 2026

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.

4 participants