JetBrains.Refasmer.CliTool 1.0.32

The ID prefix of this package has been reserved for one of the owners of this package by NuGet.org. Prefix Reserved
.NET 5.0 .NET Core 3.1
dotnet tool install --global JetBrains.Refasmer.CliTool --version 1.0.32
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest # if you are setting up this repo
dotnet tool install --local JetBrains.Refasmer.CliTool --version 1.0.32
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=JetBrains.Refasmer.CliTool&version=1.0.32
nuke :add-package JetBrains.Refasmer.CliTool --version 1.0.32

Refasmer

Simple tool to make reference assembly. Strips method bodies, private class fields etc. Also can generate xml files like FrameworkList.xml. Can be used as library (Refasmer.dll).

Installation

You could download refasmer from GitHub: https://github.com/JetBrains/Refasmer/releases or install as .NET Tool: dotnet tool install -g JetBrains.Refasmer.CliTool

NuGet packages

Package Version
JetBrains.Refasmer Nuget
JetBrains.Refasmer.CliTool Nuget

Usage:

refasmer [options] <dll> [<dll> ...]
Options:
  -v                         increase verbosity
  -q, --quiet                be quiet
  -h, -?, --help             show help
  -c, --continue             continue on errors
  -O, --outputdir=VALUE      set output directory
  -o, --output=VALUE         set output file, for single file only
  -r, --refasm               make reference assembly, default action
  -w, --overwrite            overwrite source files
  -p, --public               drop non-public types even with InternalsVisibleTo
  -i, --internals            import public and internal types
      --all                  ignore visibility and import all
  -m, --mock                 make mock assembly instead of reference assembly
  -n, --noattr               omit reference assembly attribute
  -l, --list                 make file list xml
  -a, --attr=VALUE           add FileList tag attribute

(note the executable is called RefasmerExe.exe if built locally; refasmer is a name of an executable installed by dotnet tool install)

Mock assembly throws System.NotImplementedException in each imported method. Reference assembly contains only type definition and method signatures with no method bodies.

Examples:

refasmer -v -O ref -c a.dll b.dll c.dll

will handle all passed DLL files continuing on errors. Output dlls will be placed to ./ref directory

refasmer -l -a Redist="Microsoft-Windows-CLRCoreComp.3.5" -a Name=".NET Framework 3.5" -a RuntimeVersion="3.5" -a ShortName="Full" a.dll b.dll c.dll > FrameworkList.xml

will generate FrameworkList for all passed DLL files with root tag

<FileList Redist="Microsoft-Windows-CLRCoreComp.3.5" Name=".NET Framework 3.5" RuntimeVersion="3.5" ShortName="Full">
Product Versions
.NET net5.0 net5.0-windows net6.0 net6.0-android net6.0-ios net6.0-maccatalyst net6.0-macos net6.0-tvos net6.0-windows net7.0 net7.0-android net7.0-ios net7.0-maccatalyst net7.0-macos net7.0-tvos net7.0-windows
.NET Core netcoreapp3.1
Compatible target framework(s)
Additional computed target framework(s)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

Version Downloads Last updated
1.0.32 716 2/2/2023
1.0.31 177 1/30/2023
1.0.30 2,901 5/26/2022
1.0.27 1,077 1/19/2022
1.0.26 301 1/19/2022
1.0.25 307 1/19/2022
1.0.24 609 12/9/2021
1.0.18 773 8/13/2021
1.0.12 1,041 9/24/2020