我有一个.NET Micro Framework项目,其中包含一个*.resx嵌入式资源文件。
在VS中,自定义构建工具设置为ResXFileCodeGenerator(似乎是.NET Micro Framework特定版本,因为生成的代码 质量较低 并且存在 并发错误)。
当通过Visual Studio更改*.resx文件时,将运行此自定义构建工具。当从Visual Studio外部更改*.resx文件或构建项目时,不会运行该工具。选择*.resx文件并选择“运行自定义工具”时也会运行该工具。
这是一个问题,因为我想通过msbuild构建项目。在那种环境下,过时的*.Designer.cs文件不是什么好东西 ;-)
- How can I invoke a custom tool like ResXFileCodeGenerator from msbuild?
- If this is not possible: Where can I find documentation about how this ResXFileCodeGenerator works? How can I invoke it manually from command line?
How does the ResXFileCodeGenerator deduce the numeric identifiers that are generated in the Designer.cs file?
[System.SerializableAttribute()] internal enum BinaryResources : short { SomeBinaryResource = -7023, }
GenerateResource.cs
中的GenerateIdFromResourceName
。 - Etan