我为我的一个库创建了一个XML注释文件,并希望它可用于我的所有项目,而无需在每个项目二进制文件夹中复制它.
对于我所读到的,可以通过将其复制到Resharper安装文件夹来完成,但我尝试了一些地方但没有成功.
我已将其复制到以下文件夹中:
C:\Users\myuser\AppData\Local\JetBrains\Installations\ReSharperPlatformVs14\ExternalAnnotations\MyCompany
C:\Users\myuser\AppData\Local\JetBrains\ReSharper\vAny\vs14.0\Bin\ExternalAnnotations
Run Code Online (Sandbox Code Playgroud)
xml文件与注释的dll完全相同,但是xml扩展名.内容如下:
<assembly name="Company.Tools.Libs.Logging">
<member name="M:Company.Tools.Libs.Logging.Interfaces.IBasicLogger.WriteDebug(System.String,System.Object[])">
<attribute ctor="M:JetBrains.Annotations.StringFormatMethodAttribute.#ctor(System.String)" />
<argument>"format"</argument>
</member>
<member name="M:Company.Tools.Libs.Logging.Interfaces.IBasicLogger.WriteInfo(System.String,System.Object[])">
<attribute ctor="M:JetBrains.Annotations.StringFormatMethodAttribute.#ctor(System.String)" />
<argument>"format"</argument>
</member>
<member name="M:Company.Tools.Libs.Logging.Interfaces.IBasicLogger.WriteWarning(System.String,System.Object[])">
<attribute ctor="M:JetBrains.Annotations.StringFormatMethodAttribute.#ctor(System.String)" />
<argument>"format"</argument>
</member>
<member name="M:Company.Tools.Libs.Logging.Interfaces.IBasicLogger.WriteError(System.String,System.Object[])">
<attribute ctor="M:JetBrains.Annotations.StringFormatMethodAttribute.#ctor(System.String)" />
<argument>"format"</argument>
</member>
<member name="M:Company.Tools.Libs.Logging.Interfaces.IBasicLogger.WriteFatal(System.String,System.Object[])">
<attribute ctor="M:JetBrains.Annotations.StringFormatMethodAttribute.#ctor(System.String)" />
<argument>"format"</argument>
</member>
</assembly>
Run Code Online (Sandbox Code Playgroud)
我在这里错过了什么?
更新:
由于@citizenmatt说我的xml是错误的,并且参数节点需要嵌套在属性元素中.使用我用于复制问题的简单项目执行此操作使其工作,但这是通过在与dll相同的文件夹中创建外部注释并使用.ExternalAnnotation前缀.
我仍然试图找到在我的机器上复制它的位置,因此它被Resharper选中而不是沿着dll分发它.
更新2:
在与@citizenmatt讨论后,我决定沿着dll发送我的注释.他有一个很好的观点,将它添加到Resharper的安装目录上将使它们在每个新装置中消失,而且它不是一个非常直观的地方.另外,我还没能让VS从那里得到我的注释.