I have created a XML annotation file for one of my libraries and want to make it available for all my projects without needing to copy it in each project binary folder.
For what I have read this can be done by copying it into the Resharper installation folder but I have tried a few places without success.
I have copied it in the following folders:
C:\Users\myuser\AppData\Local\JetBrains\Installations\ReSharperPlatformVs14\ExternalAnnotations\MyCompany
C:\Users\myuser\AppData\Local\JetBrains\ReSharper\vAny\vs14.0\Bin\ExternalAnnotations
The xml file has the exact same name as the dll that annotates, but xml extension. And the contents are like the follow:
<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>
What am I missing here?
UPDATE:
As @citizenmatt has said my xml was wrong, and the argument nodes need to be nested inside the attribute element. Doing this with a simple project I used to replicate the issue make it work, but that was by creating the external annotations in the same folder as the dll and with .ExternalAnnotation prefix.
I am still trying to find out where to copy it on my machine so its picked by Resharper without distributing it along the dll.
UPDATE 2:
After discussing with @citizenmatt I have decided to ship my annotations along the dll. He had a good point, adding it on the installation dir of Resharper will make them disappear in every new installation plus its not a very intuitive place. Also, I haven't been able to get VS to get my annotations from there.