Skip to content

DYN-10353: Fix wrong AppData version directory for Sandbox#17011

Merged
jasonstratton merged 2 commits into
DynamoDS:masterfrom
jasonstratton:DYN-10353-Wrong-AppData-Dir
Apr 3, 2026
Merged

DYN-10353: Fix wrong AppData version directory for Sandbox#17011
jasonstratton merged 2 commits into
DynamoDS:masterfrom
jasonstratton:DYN-10353-Wrong-AppData-Dir

Conversation

@jasonstratton

@jasonstratton jasonstratton commented Apr 2, 2026

Copy link
Copy Markdown
Contributor

Purpose

DYN-10353. The TraverseForExecutableAssembly stack walk (introduced in #16951) can pick up .NET runtime assemblies when no host directory is configured, causing Sandbox to create a 10.0 AppData directory instead of 4.1.

Declarations

Release Notes

N/A

Reviewers

Copilot
@DynamoDS/eidos

FYIs

No release notes as it is a fix to an earlier PR, which contains the release note

…ost directory check

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings April 2, 2026 14:55

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

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-10353

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Fixes incorrect AppData version folder selection for Dynamo Sandbox when no host directory is configured by adjusting PathManager.TraverseForExecutableAssembly()’s stack-walk behavior (introduced in #16951) so it doesn’t accidentally derive the version from unrelated framework/runtime assemblies.

Changes:

  • Adds a guard to only run the “Option 2” managed stack-walk in TraverseForExecutableAssembly() under certain host-path conditions.
  • Adds comments explaining why the stack-walk should be avoided for standalone Sandbox scenarios.

Comment thread src/DynamoCore/Configuration/PathManager.cs Outdated
Comment thread src/DynamoCore/Configuration/PathManager.cs Outdated
@sonarqubecloud

sonarqubecloud Bot commented Apr 2, 2026

Copy link
Copy Markdown

@johnpierson johnpierson added this to the 4.1 milestone Apr 2, 2026
Use !string.IsNullOrEmpty instead of PathHelper.IsValidPath for the
host directory check, since the latter calls File.Exists which returns
false for directories. Update XML summary and inline comments to
reflect that Option 2 is now conditional.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@jasonstratton jasonstratton merged commit 68b6d2e into DynamoDS:master Apr 3, 2026
32 of 33 checks passed
github-actions Bot pushed a commit that referenced this pull request Apr 3, 2026
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
(cherry picked from commit 68b6d2e)
@github-actions

github-actions Bot commented Apr 3, 2026

Copy link
Copy Markdown

Successfully created backport PR for RC4.1.0_master:

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