Skip to content

Fix resx source generator for less common resx metadata and locations#81994

Merged
JoeRobich merged 5 commits into
dotnet:mainfrom
AArnott:fix81973
Mar 5, 2026
Merged

Fix resx source generator for less common resx metadata and locations#81994
JoeRobich merged 5 commits into
dotnet:mainfrom
AArnott:fix81973

Conversation

@AArnott

@AArnott AArnott commented Jan 13, 2026

Copy link
Copy Markdown
Contributor
  • Stop resx source generator from declaring type with original name when overridden
  • Avoid emitting illegal namespace identifiers when resx file is not under the project directory by using Link metadata or removing the non-relative path.

This change deletes a block of code that is commented as being necessary to support NativeAOT. I have tested a NativeAOT app with these changes and it works. The source generator is also producing code more similar to the old resx SFG, so we should be quite confident it will run correctly.

Fixes #81973
Fixes #81991

@AArnott AArnott requested a review from a team as a code owner January 13, 2026 19:37
@dotnet-policy-service dotnet-policy-service Bot added the Community The pull request was submitted by a contributor who is not a Microsoft employee. label Jan 13, 2026
@AArnott AArnott changed the title Stop resx source generator from declaring type with original name when overridden Fix resx source generator for less common resx metadata and locations Jan 13, 2026
@JoeRobich

Copy link
Copy Markdown
Member

/azp run roslyn-integration-CI

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@phil-allen-msft

Copy link
Copy Markdown
Member

/azp run roslyn-CI

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@JoeRobich JoeRobich merged commit 697a893 into dotnet:main Mar 5, 2026
25 checks passed
@dotnet-policy-service dotnet-policy-service Bot added this to the Next milestone Mar 5, 2026
333fred added a commit to 333fred/roslyn that referenced this pull request Mar 9, 2026
* upstream/main: (56 commits)
  [main] Source code updates from dotnet/dotnet (dotnet#82655)
  Update insert.yml to use roslyn-tools for insertions (dotnet#82615)
  Localized file check-in by OneLocBuild Task: Build definition ID 327: Build ID 2921538
  Localized file check-in by OneLocBuild Task: Build definition ID 327: Build ID 2921538
  Reduce allocations during source text diffing (dotnet#82462)
  Localized file check-in by OneLocBuild Task: Build definition ID 327: Build ID 2920904
  Localized file check-in by OneLocBuild Task: Build definition ID 327: Build ID 2920904
  Revert "Throw NotImplementedException when a build errorId is not supported" (dotnet#82638)
  [main] Source code updates from dotnet/dotnet (dotnet#82623)
  Revert System.ValueTuple version update (dotnet#82639)
  Pack enum values
  Track non-blocking PROTOTYPE comments for `Unions` feature in an issue (dotnet#82637)
  Update the build system errors instructions for Visual Studio 2026
  Don't log named pipe connection failures as errors in BuildServerConnection (dotnet#82609)
  Fix resx source generator for less common resx metadata and locations (dotnet#81994)
  Disallow `ref` modifier for a union declaration (dotnet#82632)
  Add IFSharpInlineHintsService2 for displayAllOverride support (dotnet#82629)
  Report errors for union members that are not permitted (dotnet#82626)
  Check language version for union matching and conversions (dotnet#82617)
  [main] Update dependencies from dotnet/arcade (dotnet#82618)
  ...
@jjonescz jjonescz modified the milestones: Next, 18.6 Mar 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area-Analyzers Community The pull request was submitted by a contributor who is not a Microsoft employee.

Projects

None yet

5 participants