dotnet / dotnet/project-system

New resource editor doesn’t show existing and can‘t add new resources when opened through project properties in VB.NET

Open
#9,712 1 comment 0 reactions 1 assignee Claimed by @adamint View on GitHub
Feature-Resource-Explorer
Dominant language
C#
Stars
1k
Forks
415
PR merge metrics
No merged PRs in 30d

Description

## Visual Studio Version
17.14.9

## Summary
When creating a new resx file through the project properties in a VB.NET project, it shows a blank resource file with the plus sign for adding new ones greyed out. I have to click on the “icon with many pictures” (Resource Explorer) to open the “proper” new resource explorer and be able to click the plus for adding a resource. But this would only add a resource to Form1, the global resource file `Resources` doesn’t show up. For the global file to show up and be editable, I have to restart VS after, only then it becomes visible.

Opened via project properties
Image
Switching to Resource Explorer
Image
After restart of VS
Image

If I copy an existing resource file from another project to a new project and try to open this one as described above, it also comes up completely blank etc. as above, and when switching to the “real” Resource Explorer, also only gets detected and editable after a restart of VS.
By contrast, if I set the Solution Explorer to “Show all files” and `Open With…` the `Resources.resx` file with the Managed Resources Editor (Legacy), everything is there immediately.

**All of this works without any problem in C# projects**, creating new resource files as well as copying and changing other ones.

## Steps to Reproduce

1. Create a new VB.NET WinForms App.\
(In my case with .NET 9 and, if that matters, on a network drive.)
2. Double-click the `My Project` folder in the solution explorer (with “Show all files” disabled).
3. Scroll down to “Resources”.
4. Click “Create or open assembly resources”.
5. The `Resources.resx` file opens in the new Resource Explorer, but the plus-sign for adding new resources is greyed out.
6. Close the project, copy an already filled resource file from a previous project (created before the new Resource Explorer), replace the empty one of the new project and re-open the project.
7. Do steps 2-4 again.
8. The `Resources.resx` file is still completely blank and the plus sign greyed out.
9. Open the above file in the Managed Resources Editor (Legacy).
10. All resources are there and working as expected. They just don’t show in the new Resource Explorer.

## Expected Behavior
The new Resource Manager should directly be usable without the detour over clicking “Resource Manager” and finding the file in the blank window for new resource files. For “old” resource files, the new Resource Manager should just show what is already there…

## Actual Behavior
Blank resource file

## User Impact
Does this mean “User of VS” or “Users of the programs created with VS”? I’ll assume the former.\
Users like me get very confused, if their resources suddenly don’t work anymore for a new project.\
It took me a considerable amount of searching before I even found out that the resource manager had changed and the new one could cause problems, and how to skip all that using `Open with…`

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.