Do I need the resx Designer.cs file?

前端 未结 5 2077
礼貌的吻别
礼貌的吻别 2020-11-27 20:52

My company uses a combination of some database tables, a web page front end and an \"export\" application to handle our string resources in our web sites.

The export

5条回答
  •  暖寄归人
    2020-11-27 21:36

    From MSDN we have:

    Compiling Resources into Assemblies

    When you build your application, Visual Studio invokes the resgen.exe tool to convert your application resources into an internal class called Resources. This class is contained in the Resources.Designer.cs file which is nested under the Resources.resx file in Solution Explorer. The Resources class encapsulates all your project resources into static readonly get properties as a way of providing strongly-typed resources at run-time. When you build through the Visual C# IDE, all the encapsulated resource data, including both the resources that were embedded into the .resx file and the linked files, is compiled directly into the application assembly (the .exe or .dll file). In other words, the Visual C# IDE always uses the /resource compiler option. If you build from the command line, you can specify the /linkresource compiler option that will enable you to deploy resources in a separate file from the main application assembly. This is an advanced scenario and is only necessary in certain rare situations.

提交回复
热议问题