ICSharpCode.ReferenceAssemblyAnnotator
2.0.0-preview.7
Prefix Reserved
dotnet add package ICSharpCode.ReferenceAssemblyAnnotator --version 2.0.0-preview.7
NuGet\Install-Package ICSharpCode.ReferenceAssemblyAnnotator -Version 2.0.0-preview.7
<PackageReference Include="ICSharpCode.ReferenceAssemblyAnnotator" Version="2.0.0-preview.7"> <PrivateAssets>all</PrivateAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> </PackageReference>
<PackageVersion Include="ICSharpCode.ReferenceAssemblyAnnotator" Version="2.0.0-preview.7" />
<PackageReference Include="ICSharpCode.ReferenceAssemblyAnnotator"> <PrivateAssets>all</PrivateAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> </PackageReference>
paket add ICSharpCode.ReferenceAssemblyAnnotator --version 2.0.0-preview.7
#r "nuget: ICSharpCode.ReferenceAssemblyAnnotator, 2.0.0-preview.7"
#:package ICSharpCode.ReferenceAssemblyAnnotator@2.0.0-preview.7
#addin nuget:?package=ICSharpCode.ReferenceAssemblyAnnotator&version=2.0.0-preview.7&prerelease
#tool nuget:?package=ICSharpCode.ReferenceAssemblyAnnotator&version=2.0.0-preview.7&prerelease
Reference Assembly Annotator
IL weaver for adding nullability annotations to .NET Framework, .NET Standard, and .NET Core reference assemblies.
This is the continuation of TunnelVisionLabs.ReferenceAssemblyAnnotator,
published as ICSharpCode.ReferenceAssemblyAnnotator. To migrate, replace the package ID; the MSBuild properties and items are unchanged.
Requirements
- Build: .NET SDK 8 or newer, or Visual Studio 2022 version 17.8 or newer.
Usage
Assemblies included by default
- .NET Framework targets
- mscorlib
- System
- System.Core
- System.Data
- System.Drawing
- System.IO.Compression.FileSystem
- System.Numerics
- System.Runtime.Serialization
- System.Xml
- System.Xml.Linq
- .NET Standard targets
- All assemblies which are defined by the .NET Standard
- .NET Core targets before 3.0
- All reference assemblies defined by .NET Core
.NET Core 3.0 and newer are not annotated: their reference assemblies already carry nullable annotations. Don't add the
Microsoft.NETCore.App.Ref PackageDownload for those target frameworks. The SDK may download that package itself, and
a second download fails restore with NU1505. When multi-targeting, condition it, for example:
<PackageDownload Include="Microsoft.NETCore.App.Ref" Version="[10.0.0]" Condition="'$(TargetFramework)' != 'net10.0'" />
Example configuration
<PropertyGroup>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="ICSharpCode.ReferenceAssemblyAnnotator" Version="2.0.0-preview.*" PrivateAssets="all" />
<PackageDownload Include="Microsoft.NETCore.App.Ref" Version="[10.0.0]" />
</ItemGroup>
Minimal:
<ItemGroup>
<PackageReference Include="ICSharpCode.ReferenceAssemblyAnnotator" Version="2.0.0-preview.*" PrivateAssets="all" />
<PackageDownload Include="Microsoft.NETCore.App.Ref" Version="[10.0.0]" />
</ItemGroup>
Configuration reference
- MSBuild properties
<AnnotatedReferenceAssemblyVersion>: Specifies the version of Microsoft.NETCore.App.Ref to obtain nullability information from. This is required if there are multiple PackageDownload versions of Microsoft.NETCore.App.Ref.<GenerateNullableAttributes>: Set toTrueto include definitions of nullability attributes in the build; otherwise,Falseto exclude the definitions. The default value isTrue.
- MSBuild items
<UnannotatedReferenceAssembly>: Specifies reference assemblies to annotate. This is only required for assemblies that are not automatically annotated by this package.
Releases
Learn more about Target Frameworks and .NET Standard.
This package has no dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 2.0.0-preview.7 | 63 | 11/9/2026 |