Skip to content

Field with same name is removed #423

Description

@ricaun

I have an specific issue the class below.

public class Test
{
	private string A;
	private int A;
}

After using ILRepack the class became with a single field like:

public class Test
{
	private string A;
}

This is basically the issue the private int A is removed and if I have a reference of that field I have a System.InvalidProgramException: 'Common Language Runtime detected an invalid program.'

I'm only able to have that class with two fields with the same name after using obfuscar with the default configuration, that basically force all the private field to be renamed, and in that case the two fields have the same name because is a different type.

If I figure out how to fix the issue I open a PR.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions