Skip to content

DYN-10440: Fix Microsoft.CodeAnalysis satellite assemblies leaking into pt-BR build output#17082

Merged
jasonstratton merged 2 commits into
DynamoDS:masterfrom
aparajit-pratap:aparajit/fix-public-api-analyzer-satellite-assembly-leak
Apr 29, 2026
Merged

DYN-10440: Fix Microsoft.CodeAnalysis satellite assemblies leaking into pt-BR build output#17082
jasonstratton merged 2 commits into
DynamoDS:masterfrom
aparajit-pratap:aparajit/fix-public-api-analyzer-satellite-assembly-leak

Conversation

@aparajit-pratap

@aparajit-pratap aparajit-pratap commented Apr 28, 2026

Copy link
Copy Markdown
Contributor

Purpose

The LibG NuGet package (DynamoVisualProgramming.LibG_232_0_0) ships Microsoft.CodeAnalysis.CSharp.resources.dll and Microsoft.CodeAnalysis.resources.dll under tools/netstandard2.1/windows/pt-BR/ as unexpected cargo alongside its legitimate locale resources (ProtoGeometry.resources.dll, LibG.ProtoInterface.resources.dll, etc.).

The BeforeBuildOps target in DynamoCore.csproj copies all *.resources.dll files from that path recursively using **\*.resources.dll, which picks up the Microsoft.CodeAnalysis satellite assemblies and writes them to $(OutputPath)\pt-BR\. This was first surfaced by Florin while updating PackageApprovedDllList.txt for the Dynamo Core 4.1 upgrade in Revit (REVIT-250592).

Fix: add an Exclude to the LibGProtoGeometryUICultureAllLanguages item in DynamoCore.csproj to filter out Microsoft.CodeAnalysis*.resources.dll files from that copy, while still copying all legitimate LibG locale resources.

Also removes runtime from IncludeAssets for Microsoft.CodeAnalysis.PublicApiAnalyzers across all four referencing projects (DynamoCore, DynamoCoreWpf, DynamoUtilities, DynamoServices) as a correctness cleanup — the package has no lib/ folder and is a build-time-only analyzer, so runtime was always a no-op there.

Declarations

Check these if you believe they are true

Release Notes

N/A — build/packaging fix only; no user-facing or API changes.

Reviewers

(FILL ME IN)

FYIs

Florin (reported the issue)

…ild output

Remove `runtime` from IncludeAssets for Microsoft.CodeAnalysis.PublicApiAnalyzers
in DynamoCore, DynamoCoreWpf, DynamoUtilities, and DynamoServices. The package is
a build-time-only analyzer and needs no runtime artifacts; including `runtime` caused
its pt-BR satellite assemblies (Microsoft.CodeAnalysis.resources.dll and
Microsoft.CodeAnalysis.CSharp.resources.dll) to be copied into the build output.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>

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

Removes runtime from IncludeAssets for the Microsoft.CodeAnalysis.PublicApiAnalyzers package references so Roslyn analyzer satellite assemblies (e.g., pt-BR/) don’t get copied into Dynamo build output. This aligns the dependency usage with its build-time-only intent across the solution.

Changes:

  • Updated PackageReference IncludeAssets for Microsoft.CodeAnalysis.PublicApiAnalyzers to exclude runtime in 4 projects.
  • Keeps PrivateAssets=all so the analyzer remains non-transitive to downstream consumers.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
src/NodeServices/DynamoServices.csproj Removes runtime from analyzer IncludeAssets to prevent satellite assemblies in output.
src/DynamoUtilities/DynamoUtilities.csproj Same IncludeAssets adjustment for build-time-only analyzer dependency.
src/DynamoCoreWpf/DynamoCoreWpf.csproj Same IncludeAssets adjustment to avoid copying analyzer runtime artifacts.
src/DynamoCore/DynamoCore.csproj Same IncludeAssets adjustment to prevent pt-BR resource leakage.

…ild output

The LibG package ships Microsoft.CodeAnalysis.CSharp.resources.dll and
Microsoft.CodeAnalysis.resources.dll under tools/netstandard2.1/windows/pt-BR/
as unexpected cargo. The BeforeBuildOps wildcard copy (**\*.resources.dll) in
DynamoCore.csproj was picking them up and writing them to $(OutputPath)\pt-BR\.

Add an Exclude to the LibGProtoGeometryUICultureAllLanguages item to filter out
Microsoft.CodeAnalysis*.resources.dll files from the LibG copy, while still
copying all legitimate locale resources (ProtoGeometry, LibG.ProtoInterface, etc.).

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
@sonarqubecloud

Copy link
Copy Markdown

@aparajit-pratap aparajit-pratap changed the title Fix Microsoft.CodeAnalysis satellite assemblies leaking into pt-BR build output DYN-10440: Fix Microsoft.CodeAnalysis satellite assemblies leaking into pt-BR build output Apr 28, 2026

@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-10440

@jasonstratton jasonstratton 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.

Pretty straightforward

@jasonstratton

Copy link
Copy Markdown
Contributor

@jasonstratton jasonstratton merged commit 398369c into DynamoDS:master Apr 29, 2026
28 of 33 checks passed
@jasonstratton

Copy link
Copy Markdown
Contributor

/cherrypick

@jasonstratton jasonstratton added this to the 4.1.1 milestone Apr 29, 2026
@jasonstratton

Copy link
Copy Markdown
Contributor

/cherrypick

@github-actions

Copy link
Copy Markdown

@aparajit-pratap aparajit-pratap deleted the aparajit/fix-public-api-analyzer-satellite-assembly-leak branch April 29, 2026 01:07
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