Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cherrypicking https://github.com/DynamoDS/Dynamo/pull/14890 #14893

Merged
merged 1 commit into from
Jan 26, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1901,6 +1901,10 @@ private void AddAdditionalFile(string filename)
}
}

// A boolean flag used to trigger only once the message prompt
// When the user has attempted to load an existing dll from another path
private bool duplicateAssemblyWarningTriggered = false;

private void AddDllFile(string filename)
{
try
Expand All @@ -1914,13 +1918,14 @@ private void AddDllFile(string filename)

// The user has attempted to load an existing dll from another path. This is not allowed
// as the existing assembly cannot be modified while Dynamo is active.
if (this.Assemblies.Any(x => assemName == x.Assembly.GetName().Name))
if (this.Assemblies.Any(x => assemName == x.Assembly.GetName().Name) && !duplicateAssemblyWarningTriggered)
{
MessageBoxService.Show(Owner, string.Format(Resources.PackageDuplicateAssemblyWarning,
dynamoViewModel.BrandingResourceProvider.ProductName),
Resources.PackageDuplicateAssemblyWarningTitle,
MessageBoxButton.OK,
MessageBoxImage.Stop);
duplicateAssemblyWarningTriggered = true;
return; // skip loading assembly
}

Expand Down
Loading