How to use FxCop CustomDictionary.xml from the project localization?

624 Views Asked by At

I create an custom FxCop rule, that need the the path to CustomDictionary.xml, but not this in Program Files, but that used in my FxCop project file. I has tryed to use reflection to Assembly.GetEntryAssembly() and diagnostic to Process.GetCurrentProcess() but no result. Where should i search such information?

1

There are 1 best solutions below

4
Nicole Calinoiu On BEST ANSWER

Do you really want to access that particular file, or would you simply like to take advantage of the cumulative dictionary contents (as do the Microsoft-provided FxCop rules)? If the latter, you can use the public Microsoft.FxCop.Sdk.NamingService class, which takes care of all the messy dictionary file reading details for you.