Skip to main content
.NETFramework4.5.2.NETStandard1.1.NETStandard2.0

Inject arbitrary IL code at compile time.

Published
May 16, 2021
5y ago
Total Downloads
2.5M
2,475,626

Install

dotnet add package InlineIL.Fody --version 1.7.0-pre1
ProductVersions
.NET Standard
netstandard1.1netstandard2.0
Other
.NETFramework4.5.2

README

InlineIL.Fody

This is an add-in for Fody which lets you inject arbitrary IL into your assembly at compile time.

Installation

  • Install the NuGet packages Fody and InlineIL.Fody. Installing Fody explicitly is needed to enable weaving.

    PM> Install-Package Fody
    PM> Install-Package InlineIL.Fody
    
  • Add the PrivateAssets="all" metadata attribute to the <PackageReference /> items of Fody and InlineIL.Fody in your project file, so they won't be listed as dependencies.

  • If you already have a FodyWeavers.xml file in the root directory of your project, add the <InlineIL /> tag there. This file will be created on the first build if it doesn't exist:

    <?xml version="1.0" encoding="utf-8" ?>
    <Weavers>
      <InlineIL />
    </Weavers>
    

See Fody usage for general guidelines, and Fody Configuration for additional options.

Usage

Call static methods of the InlineIL.IL.Emit class to emit IL instructions.

See the GitHub repository for more information.

Changes from Previous Version

No structural changes between v1.6.0 and v1.7.0-pre1.

Adoption Assessment

Assess this package against its supported frameworks, license, maintenance signals and dependency graph before making it a project standard.

This version is marked prerelease. Validate its API and upgrade path before production use.Compatibility metadata lists 3 target frameworks; confirm the exact target used by your application.

Related Guides & Workflows

Learn how to evaluate, integrate, or audit this package in your .NET project.