How to generate Designer.cs from a lot of resx file in Visual Studio Code? #30715
Unanswered
giuseppenovielli
asked this question in
Q&A
Replies: 2 comments
-
I did answer it here: |
Beta Was this translation helpful? Give feedback.
0 replies
-
You're showing multiple .Designer files for the same resource, i.e. a English specific one and a generic one. That's not the way how it works. If you have multiple languages supplied, they should be accessed via the same .Designer file via the ResourceManager, e.g. var yourOrdersEn = SampleApp.Resources.OrderResources.ResourceManager.GetString("YOUR_ORDERS", new CultureInfo("en-US"));
var yourOrdersFr = SampleApp.Resources.OrderResources.ResourceManager.GetString("YOUR_ORDERS", new CultureInfo("fr-FR")); Also you are getting Visual Studio Code to manage your .Designer.cs files. Whilst there are some great extensions out there, I highly recommend you switch back to Visual Studio to do this step. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
i have a big .net maui application with a lot of features.
This discussion says that can be done added into csproj file the following code:
#27115 (comment)
But i can't store all strings in one file AppResources.resx, so i created one resx for each feature.
So i have for example:
Resources/Strings/Order
OrderResources.resx
OrderResources.Designer.cs
OrderResources.en.resx
OrderResources.en.Designer.cs
Resources/Strings/Client
ClientResources.resx
ClientResources.Designer.cs
ClientResources.en.resx
ClientResources.en.Designer.cs
So i must write, into csproj, visual studio code, for each resx file the for generate relative file Designer.cs?
There is a way to generate automatically the file Designer.cs for each resx file without specified the resx name name and namespace?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions