Skip to content

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

License

Notifications You must be signed in to change notification settings

PhyxionNL/AssemblyPatcher

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AssemblyPatcher Nuget

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

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" />
   <!-- or filtered -->
   <RemoveSealedFrom Include="SomeAssembly" TypeNames="SomeAssembly.TypeA;SomeAssembly.Folder.*" />
</ItemGroup>

Add virtual keywords in SomeAssembly:

<ItemGroup>
   <AddVirtualTo Include="SomeAssembly" />
   <!-- or filtered -->
   <AddVirtualTo Include="SomeAssembly" MemberNames="SomeAssembly.TypeA;SomeAssembly.Types::Member*" />
</ItemGroup>

License

MIT

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

No packages published

Contributors 2

  •  
  •  

Languages