IllegalClassReferenceAnalyzer 1.0.0.2
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
<PackageReference Include="IllegalClassReferenceAnalyzer" Version="1.0.0.2" />
paket add IllegalClassReferenceAnalyzer --version 1.0.0.2
#r "nuget: IllegalClassReferenceAnalyzer, 1.0.0.2"
// 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.
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.
Elevated rule category to Security for markdown purposes.