IllegalClassReferenceAnalyzer 1.0.0.2

There is a newer version of this package available.
See the version list below for details.
dotnet add package IllegalClassReferenceAnalyzer --version 1.0.0.2                
NuGet\Install-Package IllegalClassReferenceAnalyzer -Version 1.0.0.2                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="IllegalClassReferenceAnalyzer" Version="1.0.0.2" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add IllegalClassReferenceAnalyzer --version 1.0.0.2                
#r "nuget: IllegalClassReferenceAnalyzer, 1.0.0.2"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install IllegalClassReferenceAnalyzer as a Cake Addin
#addin nuget:?package=IllegalClassReferenceAnalyzer&version=1.0.0.2

// Install IllegalClassReferenceAnalyzer as a Cake Tool
#tool nuget:?package=IllegalClassReferenceAnalyzer&version=1.0.0.2                

IllegalClassReferenceAnalyzer

Diagnostics Analyzer that prohibits use of referenced Types in dependency injection.

This analyzer will mark as error all references to a specified list of Types. The specified list can be provided per project using this analyzer as an AdditionalFile. The structure of the file must be as such:

<?xml version="1.0" encoding="utf-8" ?>
<AnalyzerSettings>
	<ForbiddenType>System.Net.Http.IHttpClientFactory</ForbiddenType>
</AnalyzerSettings>

This AdditionalFile will prohibit all references to System.Net.Http.IHttpClientFactory. Additional ForbiddenType elements can be inserted as needed.

AdditionalFile entries should be added to the project's csproj file as such:

<ItemGroup>
	<AdditionalFiles Include="Settings\IllegalTypes.xml" />
</ItemGroup>

The analyzer will iterate all AdditionalFiles and parse the ones that have the compatible structure above.

There are no supported framework assets in this package.

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
1.0.0.3 1,133 12/2/2023
1.0.0.2 132 11/29/2023
1.0.0.1 160 11/29/2023
1.0.0 118 11/27/2023

Elevated rule category to Security for markdown purposes.