Converts all JetBrains ReSharper code annotation attributes to External Annotations, so you can provide R# annotations to 3rd parties but don't need to deploy JetBrainsAnnotations.dll.
PM> Install-Package JetBrainsAnnotations.Fody
PM> Update-Package Fody
The Update-Package Fody
is required since NuGet always defaults to the oldest, and most buggy, version of any dependency.
JetBrainsAnnotations
to your FodyWeavers.xml:<Weavers>
<JetBrainsAnnotations />
</Weavers>
The assembly JetBrains.Annotations.dll
is shipped as a nuget package.
It provides standard JetBrains ReSharper code annotation attribute implementations.
This allows you to better leverage the ReSharper intellisense.
To provide the annotations to 3rd parties you must define JETBRAINS_ANNOTATIONS
to include the attributes in your assembly.
However now you have a reference and would need to ship the JetBrainsAnnotations.dll with your product.
This Fody plugin adds the define JETBRAINS_ANNOTATIONS
to your existing defines, then converts all attributes to an external annotations XML file on the fly, and then removes the reference to
JetBrains.Annotations
again so you can ship just the text file with your assembly and don't need to deploy JetBrains.Annotations.dll
.
For more information about JetBrains Annotations read:
Updates <project name>.ExternalAnnotations.xml
every time you compile.
NOTE: To make your annotations available to 3rd parties, you must ship this file along with the assembly.
If your project is set to generate an XML documentation file, the documentation is extended with the annotation attributes.
<project name>.ExternalAnnotations.xml
to your project manually and mark it as content + copy to output.Jetbrains.Annotations.dll
as Copy Local => False
, so it won't get copied to yourdevelopmentDependency="true"
to thepackages.config
files, else NuGet will list JetBrains.Annotations<package id="JetBrains.Annotations" version="11.0.0" targetFramework="net452" developmentDependency="true" />
or if you are using a PackageReference
in your project files, mark it as private assests:
<PackageReference Include="JetBrains.Annotations" Version="*">
<PrivateAssets>all</PrivateAssets>
</PackageReference>
Fighter Jet designed by Luke Anthony Firth from The Noun Project.