How to edit Resources file (.resx ) after publishing in Blazor Server Project ?

AGRAHARI Shyam 0 Reputation points
2023-01-23T07:29:57.2066667+00:00

Hi, I have a Blazor Server Project in which I want to add a feature to Edit resource files after publishing. Exactly after publishing, there would be a publish folder in the bin directory of the project. I need to edit the string in the resources file contains in the bin directory.

.NET
.NET
Microsoft Technologies based on the .NET software framework.
3,647 questions
ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,400 questions
Blazor
Blazor
A free and open-source web framework that enables developers to create web apps using C# and HTML being developed by Microsoft.
1,500 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Bruce (SqlWork.com) 61,731 Reputation points
    2023-01-23T17:13:53.7133333+00:00

    this is not really practical. the easiest approach is to move the resource file to its own dll. then after publish you can regenerate it with the c# compiler api. a recycle would be required to read it.

    you are better of replacing the resource files with a database, or structured file.

    0 comments No comments