Run a Visual Studio custom tool at build time

后端 未结 3 1092
长发绾君心
长发绾君心 2021-01-07 17:29

I have a script that will convert a text file into a resource file, so that I can have multiple language support by having text files for different languages converted into

3条回答
  •  醉酒成梦
    2021-01-07 18:14

    There is a way to generate the *.Designer.cs for *.resx as part of the build process. There is a built-in MSBuild task GenerateResource, which basically a wrapper around the SDK tool resgen.exe. Here you can find an example how to use it.

    Another thing you would find useful, if the generated *.Designer.cs version is not correct, basically, GenerateResource task is not calling the desired version of resgen.exe, setting property SdkToolsPath might help you.

提交回复
热议问题