AssemblyPatcher 1.0.6

dotnet add package AssemblyPatcher --version 1.0.6
                    
NuGet\Install-Package AssemblyPatcher -Version 1.0.6
                    
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="AssemblyPatcher" Version="1.0.6">
  <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.
<PackageVersion Include="AssemblyPatcher" Version="1.0.6" />
                    
Directory.Packages.props
<PackageReference Include="AssemblyPatcher">
  <PrivateAssets>all</PrivateAssets>
  <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add AssemblyPatcher --version 1.0.6
                    
#r "nuget: AssemblyPatcher, 1.0.6"
                    
#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.
#:package AssemblyPatcher@1.0.6
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=AssemblyPatcher&version=1.0.6
                    
Install as a Cake Addin
#tool nuget:?package=AssemblyPatcher&version=1.0.6
                    
Install as a Cake Tool

AssemblyPatcher Nuget

An MSBuild task that modifies existing assemblies to add InternalsVisibleTo attributes, remove sealed modifiers, add virtual keywords, or change access modifiers to public.

Usage

Add the NuGet package to your project:

<PackageReference Include="AssemblyPatcher">
   <PrivateAssets>all</PrivateAssets>
   <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>

Add an InternalsVisibleTo attribute to SomeAssembly with OwnAssembly as the assembly name:

<ItemGroup>
   <AddInternalsVisibleTo Include="SomeAssembly" AssemblyName="OwnAssembly" />
</ItemGroup>

Remove sealed modifiers from types in SomeAssembly:

<ItemGroup>
   <RemoveSealedFrom Include="SomeAssembly" />
   
   <RemoveSealedFrom Include="SomeAssembly" TypeNames="SomeAssembly.TypeA;SomeAssembly.Folder.*" />
</ItemGroup>

Add virtual keywords in SomeAssembly:

<ItemGroup>
   <AddVirtualTo Include="SomeAssembly" />
   
   <AddVirtualTo Include="SomeAssembly" MemberNames="SomeAssembly.Types::Member*" />
</ItemGroup>

Change access modifiers to public in SomeAssembly:

<ItemGroup>
   <MakePublic Include="SomeAssembly" />
   
   <MakePublic Include="SomeAssembly" MemberNames="SomeAssembly.Types::Member*" />
   <MakePublic Include="SomeAssembly" TypeNames="SomeAssembly.TypeA" />
</ItemGroup>

License

MIT

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.6 107 1/9/2026
1.0.5 142 12/12/2025
1.0.4 133 12/12/2025
1.0.3 116 12/12/2025
1.0.2 409 11/17/2025
1.0.1 404 11/17/2025
1.0.0 422 11/17/2025