DYN-10440: Fix Microsoft.CodeAnalysis satellite assemblies leaking into pt-BR build output#17082
Conversation
…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>
There was a problem hiding this comment.
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
PackageReferenceIncludeAssetsforMicrosoft.CodeAnalysis.PublicApiAnalyzersto excluderuntimein 4 projects. - Keeps
PrivateAssets=allso 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>
|
There was a problem hiding this comment.
See the ticket for this pull request: https://jira.autodesk.com/browse/DYN-10440
jasonstratton
left a comment
There was a problem hiding this comment.
Pretty straightforward
|
@aparajit-pratap reran SelfServe Merging |
|
/cherrypick |
|
/cherrypick |
|
Successfully created backport PR for |



Purpose
The LibG NuGet package (
DynamoVisualProgramming.LibG_232_0_0) shipsMicrosoft.CodeAnalysis.CSharp.resources.dllandMicrosoft.CodeAnalysis.resources.dllundertools/netstandard2.1/windows/pt-BR/as unexpected cargo alongside its legitimate locale resources (ProtoGeometry.resources.dll,LibG.ProtoInterface.resources.dll, etc.).The
BeforeBuildOpstarget inDynamoCore.csprojcopies all*.resources.dllfiles from that path recursively using**\*.resources.dll, which picks up theMicrosoft.CodeAnalysissatellite assemblies and writes them to$(OutputPath)\pt-BR\. This was first surfaced by Florin while updatingPackageApprovedDllList.txtfor the Dynamo Core 4.1 upgrade in Revit (REVIT-250592).Fix: add an
Excludeto theLibGProtoGeometryUICultureAllLanguagesitem inDynamoCore.csprojto filter outMicrosoft.CodeAnalysis*.resources.dllfiles from that copy, while still copying all legitimate LibG locale resources.Also removes
runtimefromIncludeAssetsforMicrosoft.CodeAnalysis.PublicApiAnalyzersacross all four referencing projects (DynamoCore,DynamoCoreWpf,DynamoUtilities,DynamoServices) as a correctness cleanup — the package has nolib/folder and is a build-time-only analyzer, soruntimewas 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)