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

Emit a warning when EmbeddedResourceUseDependentUponConvention is true and first type in a file doesn't match file name. #31219

Open
smoothdeveloper opened this issue Mar 15, 2023 · 0 comments
Labels
Area-WebSDK untriaged Request triage from a team member

Comments

@smoothdeveloper
Copy link

When a project defines <EmbeddedResourceUseDependentUponConvention>true</EmbeddedResourceUseDependentUponConvention>, and a SomeName.cs file has a matching SomeName.resx file, one expects things to go smoothly.

It may occur that a type is added at the top of the SomeName.cs file, and the resource gets renamed by that fact.

I believe generating a warning in this case, pointing to the documentation (https://learn.microsoft.com/en-us/dotnet/core/project-sdk/msbuild-props#embeddedresourceusedependentuponconvention) would alleviate the troubleshooting steps.

Describe the solution you'd like

res1111: project defines EmbeddedResourceUseDependentUponConvention, and file SomeName.cs and SomeName.resx were matched, although the first type defined in SomeName.cs doesn't match SomeName, the embedded resource may be generated under the wrong name.

@dotnet-issue-labeler dotnet-issue-labeler bot added Area-WebSDK untriaged Request triage from a team member labels Mar 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-WebSDK untriaged Request triage from a team member
Projects
None yet
Development

No branches or pull requests

1 participant