我有一个拼写正确的文本资源“{0} by Test GmbH”,因为 GmbH 是“Gesellschaft mit beschränkter Haftung”的官方缩写。我了解 Microsoft CodeAnalysing 试图将其标记为“Gmb”和“H”,但我认为应该可以使用此 CodeAnalysingDictionary 引入这个具有特定拼写和大小写的术语:
<?xml version="1.0" encoding="utf-8" ?>
<Dictionary>
<Words>
<Unrecognized>
</Unrecognized>
<Recognized>
<Word>Gmbh</Word>
</Recognized>
<Deprecated>
</Deprecated>
<DiscreteExceptions>
<Term>GmbH</Term>
</DiscreteExceptions>
</Words>
<Acronyms>
<CasingExceptions>
<Acronym>GmbH</Acronym>
</CasingExceptions>
</Acronyms>
</Dictionary>
但是它不起作用:
CA1703 Resource strings should be spelled correctly
In resource 'MyCode.Properties.Resources.resx',
referenced by name 'CopyrightWithCompanyName',
correct the spelling of 'Gmb' in string value '{0} by Test GmbH'.
如何正确调整字典?