Home > Back-end >  How to add a "Resource file (*.resx)" to a "Shared Project" of Visual Studio 202
How to add a "Resource file (*.resx)" to a "Shared Project" of Visual Studio 202

Time:10-27

Inside Visual Studio 2022, I have a "Shared Project" and I want to add a "Resource File (*.resx)", but it's not listed inside the available elements.

But if I try to add it to a "Windows Forms App", it works as well.

How can I add a "Resource File (*.resx)" to a "Shared Project"?

CodePudding user response:

The resources file for the shared project in VS2022 is different.

It starts with extension .resw. Look for it.

Right click project -> Add -> New item

You can find the file template .resw.

CodePudding user response:

This is probably a bug in the item template for resource files. Can you use the "Provide feedback" link in VS and create a ticket about this so it'll get fixed? If you link it here I'll make sure it gets to the right team (I work at MS).

For a workaround, can you create a .resx file in a regular (non-shared) project, then move it to your shared project?

  • Related