IgnoresAccessChecksToGenerator 0.8.0

dotnet add package IgnoresAccessChecksToGenerator --version 0.8.0                
NuGet\Install-Package IgnoresAccessChecksToGenerator -Version 0.8.0                
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="IgnoresAccessChecksToGenerator" Version="0.8.0">
  <PrivateAssets>all</PrivateAssets>
  <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add IgnoresAccessChecksToGenerator --version 0.8.0                
#r "nuget: IgnoresAccessChecksToGenerator, 0.8.0"                
#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 IgnoresAccessChecksToGenerator as a Cake Addin
#addin nuget:?package=IgnoresAccessChecksToGenerator&version=0.8.0

// Install IgnoresAccessChecksToGenerator as a Cake Tool
#tool nuget:?package=IgnoresAccessChecksToGenerator&version=0.8.0                

IgnoresAccessChecksTo Generator (MSBuild)

The IgnoresAccessChecksToAttribute is the reverse of the InternalsVisibleToAttribute - it allows an assembly to declare assemblies whose internals would be visible to it. The attribute class isn't declared in the BCL but is recognized by the CLR (Desktop >= 4.6 and Core), i.e. you can declare it in your code and it would work.

Since there's currently no compiler support for this attribute (I've submitted a PR to Roslyn), this package can be used as a workaround. It generates reference assemblies where all the internal types & members become public, and adds a C# file with the attribute and its instances.

Usage

Just add the package and define IgnoresAccessChecksTo items with the assemblies you need access to.

<Project Sdk="Microsoft.NET.Sdk">

  <ItemGroup>
    <IgnoresAccessChecksTo Include="AssemblyToGrantAccessTo1" />
    <IgnoresAccessChecksTo Include="AssemblyToGrantAccessTo2" />
    <IgnoresAccessChecksToExcludeTypeName Include="Namespace.TypeName" />
  </ItemGroup>

  <ItemGroup>
    <PackageReference Include="IgnoresAccessChecksToGenerator" Version="0.8.0" PrivateAssets="All" />
  </ItemGroup>

</Project>
There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on IgnoresAccessChecksToGenerator:

Package Downloads
AutoMockFixture.Moq4

Extensions for AutoFixture and Moq

AutoMockFixture.AnalyzerAndCodeCompletion

Extensions for AutoFixture and Moq

GitHub repositories (9)

Showing the top 5 popular GitHub repositories that depend on IgnoresAccessChecksToGenerator:

Repository Stars
CosmosOS/Cosmos
Cosmos is an operating system "construction kit". Build your own OS using managed languages such as C#, VB.NET, and more!
roslynpad/roslynpad
A cross-platform C# editor based on Roslyn and AvalonEdit
VitalElement/AvalonStudio
Cross platform IDE and Shell
ashmind/mirrorsharp
MirrorSharp is a code editor <textarea> built on Roslyn and CodeMirror
NeoAxis/NeoAxisEngine
A versatile real-time platform for making 3D, 2D games and apps.
Version Downloads Last updated
0.8.0 437 12/3/2024
0.7.0 23,423 12/1/2023
0.6.0 78,417 11/22/2022
0.5.0 54,384 2/28/2021
0.4.0 89,332 8/14/2017
0.3.0 963 8/8/2017
0.2.0 1,079 8/2/2017
0.1.0 1,289 7/21/2017