All Projects → getsentry → dotnet-assembly-alias

getsentry / dotnet-assembly-alias

Licence: MIT license
Tool to rename .NET assemblies and references

Programming Languages

C#
18002 projects

Projects that are alternatives of or similar to dotnet-assembly-alias

backtrace-unity
First-class error reporting for the Unity game engine.
Stars: ✭ 99 (+230%)
Mutual labels:  il2cpp
ILject
Provides a way which you can load a .NET dll/exe from disk, modify/inject IL, and then run the assembly all in memory without modifying the file.
Stars: ✭ 25 (-16.67%)
Mutual labels:  il
red-alert
Israeli Pikud Haoref missile detection API
Stars: ✭ 21 (-30%)
Mutual labels:  il
MathExpressions.NET
➗ Library for parsing math expressions with rational numbers, finding their derivatives and compiling an optimal IL code
Stars: ✭ 63 (+110%)
Mutual labels:  il
Il2cppdumper
Unity il2cpp reverse engineer
Stars: ✭ 3,362 (+11106.67%)
Mutual labels:  il2cpp
frida-il2cppDumper
Riru Il2cppDumper 加强版 内存里直接dump出源码信息
Stars: ✭ 113 (+276.67%)
Mutual labels:  il2cpp
Cpp2IL
Work-in-progress tool to reverse unity's IL2CPP toolchain.
Stars: ✭ 689 (+2196.67%)
Mutual labels:  il2cpp
natsu-clr
il2cpp transpiler and runtime compatible with .Net Core
Stars: ✭ 76 (+153.33%)
Mutual labels:  il2cpp
IL2CPP Resolver
A run-time API resolver for IL2CPP Unity.
Stars: ✭ 114 (+280%)
Mutual labels:  il2cpp
Oxide.Patcher
IL patcher for use with adding Oxide support to .NET games
Stars: ✭ 27 (-10%)
Mutual labels:  il
Dust
A programming language written in C# that will compile to IL. (still very WIP)
Stars: ✭ 18 (-40%)
Mutual labels:  il
il-ilce-json
Türkiye'de bulunan bütün illerin nüfus, yüzölçümü, bölgesi, ilçeleri gibi ve çok daha fazla veri json çıktısı olarak sunulmaktadır.
Stars: ✭ 22 (-26.67%)
Mutual labels:  il
Open-Terraria-API
Open Terraria API - Mac, Linux & Windows
Stars: ✭ 65 (+116.67%)
Mutual labels:  il

Alias

Build status NuGet Status NuGet Status

Rename assemblies and fixes references. Designed as an alternative to Costura, ILMerge, and ILRepack.

Designed to mitigate scenarios where an assembly is run in a plugin scenario. For example Unity extensions, MSBuild tasks, or SharePoint extensions. In these scenarios an assembly, and all its references, are loaded into a shared AppDomain. So dependencies operate as "first on wins". So, for example, if two addins assemblies use different versions of Newtonsoft, the first addin that is loaded defines what version of Newtonsoft is used by all subsequent addins assemblies.

This project works around this problem by renaming references and preventing name conflicts.

dotnet tool

https://www.nuget.org/packages/Alias/

.net 6 or higher is required to run this tool.

For a given directory and a subset of assemblies:

  • Changes the assembly name of each "alias" assembly.
  • Renames "alias" assemblies on disk.
  • For all assemblies, fixes the references to point to the new alias assemblies.

Installation

Ensure dotnet CLI is installed.

Install Alias

dotnet tool install --global Alias

Usage

assemblyalias --target-directory "C:/Code/TargetDirectory"
              --suffix _Alias
              --assemblies-to-alias "Microsoft*;System*;EmptyFiles"

Arguments

Target Directory

-t or --target-directory

Optional. If no directory is passed the current directory will be used.

Internalize

-i or --internalize

Optional. To internalize all types in the aliased assemblies. Defaults to false.

Prefix/Suffix

Either a prefix or suffix must be defined.

Prefix

-p or --prefix

The prefix to use when renaming assemblies.

Suffix

-s or --suffix

The suffix to use when renaming assemblies.

Assemblies to alias

-a or --assemblies-to-alias

Required. A semi-colon separated list of assembly names to alias. Names ending in * are treated as wildcards.

Assemblies to exclude

-e or --assemblies-to-exclude

Optional. A semi-colon separated list of assembly names to exclude.

Key

-k or --key

Path to an snk file.

Optional. If no key is passed, strong naming will be removed from all assemblies.

References

-r or --references

Optional. A semi-colon separated list of paths to reference files.

Reference File

--reference-file

Optional. A path to a file containing references file paths. On file path per line.

Default Reference File

By default the target directory will be scanned for a reference file named alias-references.txt

It can be helpful to extract reference during a build using msbuild and write them to a file accessible to Alias:

<Target Name="WriteReferenceForAlias" AfterTargets="AfterCompile">
  <ItemGroup>
    <ReferenceForAlias Include="@(ReferencePath)" Condition="'%(FileName)' == 'CommandLine'" />
  </ItemGroup>
  <WriteLinesToFile File="$(TargetDir)/alias-references.txt" Lines="%(ReferenceForAlias.FullPath)" Overwrite="true" />
</Target>

snippet source | anchor

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].