Skip to content

Microsoft.CodeAnalysis.ResxSourceGenerator generating invalid C# for .resx in Shared Project #6888

@AArnott

Description

@AArnott

Analyzer

Microsoft.CodeAnalysis.ResxSourceGenerator

Problem

Corruption seems to creep in that produces many compile errors. See the screenshot that reveals the generated code and the corruption inside it (notice the namespace declaration):
image
Restarting VS did not solve the corruption problem. 😱
The corruption problem only reproduces (so far) for the SharedStrings.resx file which is in a Shared Project that is consumed by two csproj's in the solution. The namespace corruption includes what looks like the path to the directory containing the resx file.

This is with v3.3.5-beta1.23330.2 of the source generator, and VS 17.7.1.

Metadata

Metadata

Assignees

Labels

Area-ResxSourceGeneratorBugThe product is not behaving according to its current intended design

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions