Skip to content
This repository was archived by the owner on Jul 15, 2023. It is now read-only.
This repository was archived by the owner on Jul 15, 2023. It is now read-only.

ILMerge does not generate body of methods with delegates/lambda compiled by roslyn. #53

@hubuk

Description

@hubuk

ccrewriter compiled under VS2015 fails on startup with the following error:
Unhandled Exception: System.TypeLoadException: Could not load type 'Microsoft.Contracts.Foxtrot.Driver.Program' from assembly 'ccrewrite, Version=1.8.10107.11, Culture=neutral, PublicKeyToken=188286aac86319f9' because the method 'InternalMain' has no implementation (no RVA).

It turns out that this is the case for all the method with delegate/lambda in body and only for assemblies produced by roslyn. Much worse scnario is for void returning methods as the loader do not raise an exception for them.

There are few ways we can go:

  1. Get an updated version of ILMerge from Mr. @mike-barnett.
  2. Locate and replace all the delegate/lambda code in libraries used with ILMerge.
  3. Drop ILMerge usage.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions