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

Files added to resource files in sub-folders using new editor are generated with incorrect path in .resx #9622

Open
TimSirmovics opened this issue Dec 12, 2024 · 1 comment

Comments

@TimSirmovics
Copy link

Visual Studio Version

17.12.3

Summary

When adding a file such as an image to a resources file contained within a project sub-folder using the new editor, the .resx file is generated with an incorrect path.

Steps to Reproduce

  1. Create a new class library project.
  2. Add a new folder inside the project.
  3. Add a resources file inside the folder.
  4. Add an existing file or image to the resource file.
  5. The project will not build due to an error finding the file.

Expected Behavior

The file should be referenced from the root Resources folder and available to use when referencing the resource file.

Actual Behavior

The project now fails to build, as the path within the .resx file is relative to the sub-folder the resources file is in, but the actual file is placed in a "Resources" folder in the project root.

Image
Image
Image
Image

User Impact

Requires manually editing the generated resx.

@TimSirmovics
Copy link
Author

In addition, no entry is added to the .Designer.cs file.

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

No branches or pull requests

1 participant