Measurity / BepInEx.AssemblyPublicizer

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

BepInEx.AssemblyPublicizer

NuGet NuGet NuGet

Yet another assembly publicizer/stripper

Using

from code

AssemblyPublicizer.Publicize("./Test.dll", "./Test-publicized.dll");

from console

dotnet tool install -g BepInEx.AssemblyPublicizer.Cli
assembly-publicizer ./Test.dll - publicizes
assembly-publicizer ./Test.dll --strip - publicizes and strips method bodies assembly-publicizer ./Test.dll --strip-only - strips without publicizing

from msbuild

<ItemGroup>
    <PackageReference Include="BepInEx.AssemblyPublicizer.MSBuild" Version="1.0.0" />

    <!-- Publicize directly when referencing -->
    <Reference Include=".../TestProject.dll" Publicize="true" />
    <ProjectReference Include="../TestProject/TestProject.csproj" Publicize="true" />
    <PackageReference Include="TestProject" Publicize="true" />

    <!-- Publicize by assembly name -->
    <Publicize Include="TestProject" />
</ItemGroup>

works with both .NET (generates IgnoresAccessChecksTo attributes) and Mono (AllowUnsafeBlocks)

About

License:MIT License


Languages

Language:C# 100.0%