Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JustAssembly.CommandLineTool.Exe gives wrong XML output when detecting decreased class visibility #39

Open
kriewall opened this issue Apr 3, 2018 · 0 comments

Comments

@kriewall
Copy link

kriewall commented Apr 3, 2018

What are you seeing?

JustAssembly.CommandLineTool.exe XML output indicates member is more visible instead of less when class visibility is changed from public to internal.

<Assembly Name="Test, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" DiffType="Modified">
  <Module Name="Test.dll" DiffType="Modified">
    <Type Name="Test.Calculator2" DiffType="Modified">
      <DeclarationDiffs>
        <DiffItem DiffType="Modified">Member is more visible.</DiffItem>
      </DeclarationDiffs>
    </Type>
  </Module>
</Assembly>

What is expected?

  <Assembly Name="Test, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" DiffType="Modified">
    <Module Name="Test.dll" DiffType="Modified">
      <Type Name="Test.Calculator" DiffType="Modified">
        <DeclarationDiffs>
          <DiffItem DiffType="Modified">Member is ***less*** visible.</DiffItem>
        </DeclarationDiffs>
      </Type>
    </Module>
  </Assembly>

How did you get this to happen?

  • Create simple public class
    public class Calculator2
    {
        public int Subtract(int a, int b)
        {
            return a - b;
        }
    }
  • Compile and create a local copy of the dll ("previous" version)
  • Change the class visibility to internal
    internal class Calculator2
    {
        public int Subtract(int a, int b)
        {
            return a - b;
        }
    }
  • Compile again and create a local copy of the dll ("current" version)
  • Run JustAssembly.CommandLineTool.exe against the previous and current versions.

"C:\Users\xxx\.nuget\tools\JustAssembly\Justassembly.commandlinetool.exe" "C:\TEMP\Previous\test.dll" "C:\TEMP\Current\test.dll" "output.xml"

@kriewall kriewall changed the title JustAssembly gives wrong XML output when detecting decreased class visibility JustAssembly.CommandLineTool.Exe gives wrong XML output when detecting decreased class visibility Apr 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants