Giter Site home page Giter Site logo

justassembly's Introduction

JustAssembly

JustAssembly is a lightweight .NET assembly diff and analysis tool built on top of the Telerik JustDecompile Engine. As opposed to just comparing signatures, it produces a diff on all assembly contents including the code of the methods.

alt text

Command line usage

It is possible to use JustAssembly with command line interface, in order to generate an XML file with assembly public API differences.

That effectively makes it possible to use JustAssembly in an automated build pipeline to analyse differences between the output of the previous and the latest build (Semantic Versioning in future release, see issue #14 for details).

Commandlinetool.exe accepts three arguments

  1. First assembly path
  2. Second assembly path
  3. XML output path
justassembly.commandlinetool.exe Path\To\Assembly1 Path\To\Assembly2 Path\To\XMLOutput.xml

License

Copyright (c) 2011 - 2018 Telerik EAD

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

 http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Download Binaries

You can download the latest binary version from the Telerik website.

How to Contribute

Before starting work on a feature or a fix, please:

  • Add a new issue in the Issues section or find an existing issue describing the problem.
  • Let us know thru the issue comments that you are working on a particular issue so that we can change its status to "In Progress," alert the rest of the community and avoid duplicating efforts.
  • If choosing between more than one issues, please, start working on the one with the higher priority.

Before submitting a pull request:

Read and sign the Contributors License Agreement

Merging pull requests

We'll do our best to merge pull requests within a day or two, especially if they are major. Once the merge is done, it takes 1-3 days to create a new binary and post it on the Telerik website.

How to Get Started

JustAssembly uses JustDecompileEngine as a submodule. In order to get the submodule's code together with the main repo you need to pass --recursive to the git clone command. If you already cloned the repo in the traditional way, don't worry. First you need to initialize your local configuration file using git submodule init. Then use git submodule update to fetch all the data from JustDecompileEngine and check out the appropriate commit.

Roadmap for JustAssembly

For roadmap and milestones, check the Issues section.

Feedback and Suggestions about JustAssembly

If you find a bug, want to suggest a feature or discuss existing ones, please use the Issues section.

justassembly's People

Contributors

adrianbozhankov avatar atdimitrov avatar dmstoykov avatar kvelikov avatar salem84 avatar stefanov-stefan avatar sugoidev avatar tsviatko avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

justassembly's Issues

Allow ignoring of non-public members

Hi,

It would be great if there was an option to allow different visibilities to be ignored in the comparison (for example, public and internal only, no private). Ideally this option would appear after assemblies are chosen, thus allowing the user to turn it on and off for the current comparison without any need to re-select assemblies.

Accept file names on the command line of JustAssembly.exe to bypass the opening dialog.

We use Surround for source control. It has the ability to do comparisons between versions of binary files. It allows you to configure the tool used to do the comparison. I would like to be able to configure it such that SCM can supply the names of files it creates as command line params. Something like this: "C:\Program Files (x86)\Telerik\JustAssembly\Libraries\JustAssembly.exe" "%1" "%2"

Red code on a red background

The class, enum, interface, etc. keywords are typed in red by the code viewer, and when the background is red too, the only way to read them is to select this text.

Get the files for compare from #3.

redbackgroundredcode

Bad performance of assembly selection on some Windows 10 machines

There is a big (~5 sec) delay between selecting given dll from the "Open File" dialog and the actual loading of the assembly and displaying its path in the "New Comparison Session" window. This is reproducible on Win 10 Pro (10.0.10586 Build 10586) with .NET Framework 4.6.1.

Steps:

  1. Open JA
  2. Click on either of the 2 "Browse" buttons
  3. Select an assembly (the size doesn't matter)
  4. Observe the delay. During the delay the whole app is not responsive.

JustAssembly crashes when clicking "Show Unmodified" checkbox

Steps to reproduce:

  • Download dotnet core runtime version 1.0.4 and 1.0.5
  • Open JustAssembly and load both runtime shared folder contents in "Compare Folders" mode
  • Double click any of the loaded assemblies ( in my case I clicked "System.Console.dll" ) ( you will be navigated to another tab )
  • Close the newly opened tab
  • Click the "Show Unmodified" checkbox located under the main tab

Stack trace:

System.Windows.Data Error: 8 : Cannot save value from target back to source. BindingExpression:Path=Data.ShowAllUnmodified; DataItem='BindingProxy' (HashCode=24807479); target element is 'CheckBox' (Name=''); target property is 'IsChecked' (type 'Nullable1') ArgumentOutOfRangeException:'System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index at System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource) at ICSharpCode.TreeView.SharpTreeNode.get_IsLast() at ICSharpCode.TreeView.LinesRenderer.OnRender(DrawingContext dc) at System.Windows.UIElement.Arrange(Rect finalRect) at System.Windows.Controls.Grid.ArrangeOverride(Size arrangeSize) at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect) at System.Windows.UIElement.Arrange(Rect finalRect) at System.Windows.Controls.Control.ArrangeOverride(Size arrangeBounds) at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect) at System.Windows.UIElement.Arrange(Rect finalRect) at System.Windows.Controls.StackPanel.StackArrangeHelper(IStackMeasure arrangeElement, IStackMeasureScrollData scrollData, Size arrangeSize) at System.Windows.Controls.StackPanel.ArrangeOverride(Size arrangeSize) at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect) at System.Windows.UIElement.Arrange(Rect finalRect) at System.Windows.Controls.Border.ArrangeOverride(Size finalSize) at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect) at System.Windows.UIElement.Arrange(Rect finalRect) at MS.Internal.Helper.ArrangeElementWithSingleChild(UIElement element, Size arrangeSize) at System.Windows.Controls.ContentPresenter.ArrangeOverride(Size arrangeSize) at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect) at System.Windows.UIElement.Arrange(Rect finalRect) at System.Windows.Controls.GridViewRowPresenter.ArrangeOverride(Size arrangeSize) at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect) at System.Windows.UIElement.Arrange(Rect finalRect) at System.Windows.Controls.Border.ArrangeOverride(Size finalSize) at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect) at System.Windows.UIElement.Arrange(Rect finalRect) at System.Windows.Controls.Control.ArrangeOverride(Size arrangeBounds) at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect) at System.Windows.UIElement.Arrange(Rect finalRect) at System.Windows.Controls.VirtualizingStackPanel.ArrangeOtherItemsInExtendedViewport(Boolean isHorizontal, UIElement child, Size childDesiredSize, Double arrangeLength, Int32 index, Rect& rcChild, Size& previousChildSize, Point& previousChildOffset, Int32& previousChildItemIndex) at System.Windows.Controls.VirtualizingStackPanel.ArrangeOverride(Size arrangeSize) at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect) at System.Windows.UIElement.Arrange(Rect finalRect) at System.Windows.ContextLayoutManager.UpdateLayout() at System.Windows.Controls.ItemsControl.OnBringItemIntoView(ItemInfo info) at ICSharpCode.TreeView.SharpTreeView.FocusNode(SharpTreeNode node) at ICSharpCode.TreeView.SharpTreeView.flattener_CollectionChanged(Object sender, NotifyCollectionChangedEventArgs e) at System.Collections.Specialized.NotifyCollectionChangedEventHandler.Invoke(Object sender, NotifyCollectionChangedEventArgs e) at ICSharpCode.TreeView.TreeFlattener.RaiseCollectionChanged(NotifyCollectionChangedEventArgs e) at ICSharpCode.TreeView.TreeFlattener.NodesRemoved(Int32 index, IEnumerable1 nodes)
at ICSharpCode.TreeView.SharpTreeNode.OnChildrenChanged(NotifyCollectionChangedEventArgs e)
at ICSharpCode.TreeView.SharpTreeNodeCollection.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
at JustAssembly.Nodes.ItemNodeBase.ReloadChildren() in c:\Jenkins\ReleaseFullWithUploadBuild\workspace\UI\JustAssembly\Nodes\ItemNodeBase.cs:line 88
at JustAssembly.Interfaces.BrowserTabSourceItemBase.set_ShowAllUnmodified(Boolean value) in c:\Jenkins\ReleaseFullWithUploadBuild\workspace\UI\JustAssembly\Interfaces\BrowserTabSourceItemBase.cs:line 71'
An unhandled exception of type 'System.ArgumentOutOfRangeException' occurred in mscorlib.dll
Index was out of range. Must be non-negative and less than the size of the collection.

The program '[16592] JustAssembly.exe' has exited with code 0 (0x0).

Crash upon launch

When I attempt to launch JustAssembly it crashes. I am running Windows 10 Enterprise CBB (Current Business Branch), with .NET 4.7 isntalled.
The eventlog reads as follows:

Application: JustAssembly.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.ArgumentOutOfRangeException
at Dragablz.DragablzColors.BlendColor(System.Windows.Media.Color, System.Windows.Media.Color, Double)
at Dragablz.DragablzColors.GetBalancedWindowGlassBrush()
at Dragablz.DragablzColors..cctor()

Exception Info: System.TypeInitializationException

Exception Info: System.Reflection.TargetInvocationException
at System.RuntimeFieldHandle.GetValue(System.Reflection.RtFieldInfo, System.Object, System.RuntimeType, System.RuntimeType, Boolean ByRef)
at System.Reflection.RtFieldInfo.UnsafeGetValue(System.Object)
at System.Reflection.RtFieldInfo.GetValue(System.Object)
at System.Windows.Markup.StaticExtension.GetFieldOrPropertyValue(System.Type, System.String, System.Object ByRef)
at System.Windows.Markup.StaticExtension.ProvideValue(System.IServiceProvider)
at MS.Internal.Xaml.Runtime.ClrObjectRuntime.CallProvideValue(System.Windows.Markup.MarkupExtension, System.IServiceProvider)

Exception Info: System.Windows.Markup.XamlParseException
at System.Windows.Markup.XamlReader.RewrapException(System.Exception, System.Xaml.IXamlLineInfo, System.Uri)
at System.Windows.FrameworkTemplate.LoadTemplateXaml(System.Xaml.XamlReader, System.Xaml.XamlObjectWriter)
at System.Windows.FrameworkTemplate.LoadTemplateXaml(System.Xaml.XamlObjectWriter)
at System.Windows.FrameworkTemplate.LoadOptimizedTemplateContent(System.Windows.DependencyObject, System.Windows.Markup.IComponentConnector, System.Windows.Markup.IStyleConnector, System.Collections.Generic.List1<System.Windows.DependencyObject>, System.Windows.UncommonField1<System.Collections.Hashtable>)
at System.Windows.FrameworkTemplate.LoadContent(System.Windows.DependencyObject, System.Collections.Generic.List1<System.Windows.DependencyObject>) at System.Windows.StyleHelper.ApplyTemplateContent(System.Windows.UncommonField1<System.Collections.Specialized.HybridDictionary[]>, System.Windows.DependencyObject, System.Windows.FrameworkElementFactory, Int32, System.Collections.Specialized.HybridDictionary, System.Windows.FrameworkTemplate)
at System.Windows.FrameworkTemplate.ApplyTemplateContent(System.Windows.UncommonField`1<System.Collections.Specialized.HybridDictionary[]>, System.Windows.FrameworkElement)
at System.Windows.FrameworkElement.ApplyTemplate()
at System.Windows.FrameworkElement.MeasureCore(System.Windows.Size)
at System.Windows.UIElement.Measure(System.Windows.Size)
at System.Windows.Controls.Grid.MeasureCell(Int32, Boolean)
at System.Windows.Controls.Grid.MeasureCellsGroup(Int32, System.Windows.Size, Boolean, Boolean, Boolean ByRef)
at System.Windows.Controls.Grid.MeasureOverride(System.Windows.Size)
at System.Windows.FrameworkElement.MeasureCore(System.Windows.Size)
at System.Windows.UIElement.Measure(System.Windows.Size)
at System.Windows.Controls.Grid.MeasureOverride(System.Windows.Size)
at System.Windows.FrameworkElement.MeasureCore(System.Windows.Size)
at System.Windows.UIElement.Measure(System.Windows.Size)
at MS.Internal.Helper.MeasureElementWithSingleChild(System.Windows.UIElement, System.Windows.Size)
at System.Windows.Controls.ContentPresenter.MeasureOverride(System.Windows.Size)
at System.Windows.FrameworkElement.MeasureCore(System.Windows.Size)
at System.Windows.UIElement.Measure(System.Windows.Size)
at System.Windows.Controls.Decorator.MeasureOverride(System.Windows.Size)
at System.Windows.Documents.AdornerDecorator.MeasureOverride(System.Windows.Size)
at System.Windows.FrameworkElement.MeasureCore(System.Windows.Size)
at System.Windows.UIElement.Measure(System.Windows.Size)
at System.Windows.Controls.Border.MeasureOverride(System.Windows.Size)
at System.Windows.FrameworkElement.MeasureCore(System.Windows.Size)
at System.Windows.UIElement.Measure(System.Windows.Size)
at System.Windows.Window.MeasureOverrideHelper(System.Windows.Size)
at System.Windows.Window.MeasureOverride(System.Windows.Size)
at System.Windows.FrameworkElement.MeasureCore(System.Windows.Size)
at System.Windows.UIElement.Measure(System.Windows.Size)
at System.Windows.Interop.HwndSource.SetLayoutSize()
at System.Windows.Interop.HwndSource.set_RootVisualInternal(System.Windows.Media.Visual)
at System.Windows.Window.SetRootVisual()
at System.Windows.Window.SetRootVisualAndUpdateSTC()
at System.Windows.Window.SetupInitialState(Double, Double, Double, Double)
at System.Windows.Window.CreateSourceWindow(Boolean)
at System.Windows.Window.ShowHelper(System.Object)
at Microsoft.Practices.Prism.MefExtensions.MefBootstrapper.Run(Boolean)
at JustAssembly.App.OnStartup(System.Windows.StartupEventArgs)
at System.Windows.Application.<.ctor>b__1_0(System.Object)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)
at System.Windows.Threading.DispatcherOperation.InvokeImpl()
at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
at MS.Internal.CulturePreservingExecutionContext.Run(MS.Internal.CulturePreservingExecutionContext, System.Threading.ContextCallback, System.Object)
at System.Windows.Threading.DispatcherOperation.Invoke()
at System.Windows.Threading.Dispatcher.ProcessQueue()
at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
at MS.Win32.HwndWrapper.WndProc(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
at MS.Win32.HwndSubclass.DispatcherCallbackOperation(System.Object)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)
at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(System.Windows.Threading.DispatcherPriority, System.TimeSpan, System.Delegate, System.Object, Int32)
at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr, Int32, IntPtr, IntPtr)
at MS.Win32.UnsafeNativeMethods.DispatchMessage(System.Windows.Interop.MSG ByRef)
at System.Windows.Threading.Dispatcher.PushFrameImpl(System.Windows.Threading.DispatcherFrame)
at System.Windows.Application.RunDispatcher(System.Object)
at System.Windows.Application.RunInternal(System.Windows.Window)
at JustAssembly.App.Main()

Allow ignoring of implementation

Hi,

It would be great if there was an option to allow implementation to be ignored in the comparison. Ideally this option would appear after assemblies are chosen, thus allowing the user to turn it on and off for the current comparison without any need to re-select assemblies.

The idea here would be to make it quick and easy to see what signatures have changed, ignoring the implementation thereof.

[Bug] Crash during loading of assemblies (w/o error)

After choosing 2 DLLs to be compared, application starts loading them but in the middle it freezes and then closes itself without any error message

File is rather big (9 MB), idk if that matters


OS: Win 10 21H2 LTSC 19044
dotNet: 6.0.1
DL from official site https://www.telerik.com/justassembly

Allow ignoring of XML doc

Hi,

It would be great if there was an option to allow XML doc to be ignored in the comparison. Ideally this option would appear after assemblies are chosen, thus allowing the user to turn it on and off for the current comparison without any need to re-select assemblies.

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

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"

Trying to open a file for which the user does not have read permission throws with non-helpful message

Using JustAssembly 2018.1.323.2 on win10 x64, if you paste the path of a file the user doesn't have read permissions, the following exception will be thrown

Object reference not set to an instance of an object.
   at Mono.Cecil.Extensions.ModuleDefinitionExtensions.BuildNamespaceHierarchyTree(AssemblyDefinition self) in c:\Jenkins\ReleaseFullWithUploadBuild\workspace\JustDecompileEngine\Cecil.Decompiler\Mono.Cecil.Extensions\ModuleDefinitionExtensions.cs:line 16
   at JustDecompile.Tools.MSBuildProjectBuilder.BaseProjectBuilder..ctor(String assemblyPath, String targetPath, ILanguage language, IFrameworkResolver frameworkResolver, IDecompilationPreferences preferences, IFileGenerationNotifier notifier, IAssemblyInfoService assemblyInfoService, VisualStudioVersion visualStudioVersion, ProjectGenerationSettings projectGenerationSettings, IProjectGenerationNotifier projectNotifier) in c:\Jenkins\ReleaseFullWithUploadBuild\workspace\JustDecompileEngine\MSBuildProjectCreator\BaseProjectBuilder.cs:line 150
   at JustDecompile.External.JustAssembly.JustAssemblyProjectBuilder..ctor(String assemblyPath, String targetPath, ILanguage language, IFileGenerationNotifier notifier) in c:\Jenkins\ReleaseFullWithUploadBuild\workspace\JustDecompileEngine\JustDecompile.External.JustAssembly\JustAssemblyProjectBuilder.cs:line 23
   at JustDecompile.External.JustAssembly.Decompiler.GenerateFiles(String assemblyFilePath, String targetPath, SupportedLanguage language, CancellationToken cancellationToken, IFileGenerationNotifier notifier) in c:\Jenkins\ReleaseFullWithUploadBuild\workspace\JustDecompileEngine\JustDecompile.External.JustAssembly\Decompiler.cs:line 319
   at JustAssembly.Nodes.AssemblyNode.<>c__DisplayClass6.<LoadItemsAsync>b__3() in c:\Jenkins\ReleaseFullWithUploadBuild\workspace\UI\JustAssembly\Nodes\AssemblyNode.cs:line 151

Continuing, the following message will be shown (not very helpful): Not supported file(s):, and a file list will be shown.


I think the security exception should be shown to to the user instead.

CommandLine application gives no output

When I'm using JustAssembly.CommandLineTool.exe , I get a file with 0 kB size.

Here is an example of what I type and the output:

C:\Program Files (x86)\Progress\JustAssembly\Libraries>JustAssembly.CommandLineTool.exe "C:\temp\old\FC.NamingServices.dll" "c:\temp\new\FC.NamingServices.dll" "c:\temp\output.xml"

API differences calculated successfully.

output.xml is created, however when I check the xml file, there is no output, just a empty file.

Can't install without administrator rights

It looks like a very cool tool, very useful for some border cases.

I wanted to try this tool, but it needs admin rights.
I fail to see the reason for this, maybe you can loose the restriction from the installer?

Chocolatey package for JustAssembly

Chocolatey is a popular package manager for Windows applications.

Telerik already provides an official package for Fiddler.

Would it be possible to add a package for JustAssembly as well?

The use case is setup of development/testing VMs where this helps to automatically install JustAssembly.

Command line mode with XML output

In relation to #14 it would be great to offer a general purpose command line option for the tool, to be used with CI systems, etc. The result could be an XML . This XML could then be piped into various tools, e.g. check that two builds are identical, get semver-differences in the API, etc.

Exception "format not supported" when opening any DLL or EXE

Hi, I have installed JustAssembly latest version from the website on Microsoft Windows 10 Pro 10.0.18362 build 18362 in Italian.

I have tried opening several files (dll as well as exe), all of which trigger the following exception:

Formato dell'eseguibile (exe) o della libreria (dll) non valido.
   in Mono.Cecil.PE.ImageReader.ReadOptionalHeaders(UInt16& subsystem, UInt16& dll_characteristics) in C:\Jenkins\ReleaseFullWithUploadBuild\workspace\JustDecompileEngine\Mono.Cecil\Mono.Cecil.PE\ImageReader.cs:riga 202
   in Mono.Cecil.PE.ImageReader.ReadImage() in C:\Jenkins\ReleaseFullWithUploadBuild\workspace\JustDecompileEngine\Mono.Cecil\Mono.Cecil.PE\ImageReader.cs:riga 88
   in Mono.Cecil.PE.ImageReader.ReadImageFrom(Stream stream) in C:\Jenkins\ReleaseFullWithUploadBuild\workspace\JustDecompileEngine\Mono.Cecil\Mono.Cecil.PE\ImageReader.cs:riga 663
   in Mono.Cecil.ModuleDefinition.ReadModule(Stream stream, ReaderParameters parameters) in C:\Jenkins\ReleaseFullWithUploadBuild\workspace\JustDecompileEngine\Mono.Cecil\Mono.Cecil\ModuleDefinition.cs:riga 1049
   in Mono.Cecil.ModuleDefinition.ReadModule(String fileName, ReaderParameters parameters) in C:\Jenkins\ReleaseFullWithUploadBuild\workspace\JustDecompileEngine\Mono.Cecil\Mono.Cecil\ModuleDefinition.cs:riga 1033
   in JustAssembly.Nodes.AssemblyNode.<>c__DisplayClass29_0.<LoadItemsAsync>b__1() in C:\Jenkins\ReleaseFullWithUploadBuild\workspace\UI\JustAssembly\Nodes\AssemblyNode.cs:riga 153

[bug]Application Error

error detail:

错误应用程序名称: JustAssembly.exe,版本: 2017.2.713.1,时间戳: 0x59673112
错误模块名称: KERNELBASE.dll,版本: 10.0.15063.502,时间戳: 0x005405b5
异常代码: 0xe0434352
错误偏移量: 0x0000000000069e08
错误进程 ID: 0xca8
错误应用程序启动时间: 0x01d31cd5d7c4ffae
错误应用程序路径: C:\Program Files (x86)\Telerik\JustAssembly\Libraries\JustAssembly.exe
错误模块路径: C:\WINDOWS\System32\KERNELBASE.dll
报告 ID: f5a68108-6b31-4717-86d9-1fbaff1b495c
错误程序包全名:
错误程序包相对应用程序 ID:

应用程序: JustAssembly.exe
Framework 版本: v4.0.30319
说明: 由于未经处理的异常,进程终止。
异常信息: System.ArgumentOutOfRangeException
在 Dragablz.DragablzColors.BlendColor(System.Windows.Media.Color, System.Windows.Media.Color, Double)
在 Dragablz.DragablzColors.GetBalancedWindowGlassBrush()
在 Dragablz.DragablzColors..cctor()

异常信息: System.TypeInitializationException

异常信息: System.Reflection.TargetInvocationException
在 System.RuntimeFieldHandle.GetValue(System.Reflection.RtFieldInfo, System.Object, System.RuntimeType, System.RuntimeType, Boolean ByRef)
在 System.Reflection.RtFieldInfo.UnsafeGetValue(System.Object)
在 System.Reflection.RtFieldInfo.GetValue(System.Object)
在 System.Windows.Markup.StaticExtension.GetFieldOrPropertyValue(System.Type, System.String, System.Object ByRef)
在 System.Windows.Markup.StaticExtension.ProvideValue(System.IServiceProvider)
在 MS.Internal.Xaml.Runtime.ClrObjectRuntime.CallProvideValue(System.Windows.Markup.MarkupExtension, System.IServiceProvider)

异常信息: System.Windows.Markup.XamlParseException
在 System.Windows.Markup.XamlReader.RewrapException(System.Exception, System.Xaml.IXamlLineInfo, System.Uri)
在 System.Windows.FrameworkTemplate.LoadTemplateXaml(System.Xaml.XamlReader, System.Xaml.XamlObjectWriter)
在 System.Windows.FrameworkTemplate.LoadTemplateXaml(System.Xaml.XamlObjectWriter)
在 System.Windows.FrameworkTemplate.LoadOptimizedTemplateContent(System.Windows.DependencyObject, System.Windows.Markup.IComponentConnector, System.Windows.Markup.IStyleConnector, System.Collections.Generic.List1<System.Windows.DependencyObject>, System.Windows.UncommonField1<System.Collections.Hashtable>)
在 System.Windows.FrameworkTemplate.LoadContent(System.Windows.DependencyObject, System.Collections.Generic.List1<System.Windows.DependencyObject>) 在 System.Windows.StyleHelper.ApplyTemplateContent(System.Windows.UncommonField1<System.Collections.Specialized.HybridDictionary[]>, System.Windows.DependencyObject, System.Windows.FrameworkElementFactory, Int32, System.Collections.Specialized.HybridDictionary, System.Windows.FrameworkTemplate)
在 System.Windows.FrameworkTemplate.ApplyTemplateContent(System.Windows.UncommonField`1<System.Collections.Specialized.HybridDictionary[]>, System.Windows.FrameworkElement)
在 System.Windows.FrameworkElement.ApplyTemplate()
在 System.Windows.FrameworkElement.MeasureCore(System.Windows.Size)
在 System.Windows.UIElement.Measure(System.Windows.Size)
在 System.Windows.Controls.Grid.MeasureCell(Int32, Boolean)
在 System.Windows.Controls.Grid.MeasureCellsGroup(Int32, System.Windows.Size, Boolean, Boolean, Boolean ByRef)
在 System.Windows.Controls.Grid.MeasureOverride(System.Windows.Size)
在 System.Windows.FrameworkElement.MeasureCore(System.Windows.Size)
在 System.Windows.UIElement.Measure(System.Windows.Size)
在 System.Windows.Controls.Grid.MeasureOverride(System.Windows.Size)
在 System.Windows.FrameworkElement.MeasureCore(System.Windows.Size)
在 System.Windows.UIElement.Measure(System.Windows.Size)
在 MS.Internal.Helper.MeasureElementWithSingleChild(System.Windows.UIElement, System.Windows.Size)
在 System.Windows.Controls.ContentPresenter.MeasureOverride(System.Windows.Size)
在 System.Windows.FrameworkElement.MeasureCore(System.Windows.Size)
在 System.Windows.UIElement.Measure(System.Windows.Size)
在 System.Windows.Controls.Decorator.MeasureOverride(System.Windows.Size)
在 System.Windows.Documents.AdornerDecorator.MeasureOverride(System.Windows.Size)
在 System.Windows.FrameworkElement.MeasureCore(System.Windows.Size)
在 System.Windows.UIElement.Measure(System.Windows.Size)
在 System.Windows.Controls.Border.MeasureOverride(System.Windows.Size)
在 System.Windows.FrameworkElement.MeasureCore(System.Windows.Size)
在 System.Windows.UIElement.Measure(System.Windows.Size)
在 System.Windows.Window.MeasureOverrideHelper(System.Windows.Size)
在 System.Windows.Window.MeasureOverride(System.Windows.Size)
在 System.Windows.FrameworkElement.MeasureCore(System.Windows.Size)
在 System.Windows.UIElement.Measure(System.Windows.Size)
在 System.Windows.Interop.HwndSource.SetLayoutSize()
在 System.Windows.Interop.HwndSource.set_RootVisualInternal(System.Windows.Media.Visual)
在 System.Windows.Window.SetRootVisual()
在 System.Windows.Window.SetRootVisualAndUpdateSTC()
在 System.Windows.Window.SetupInitialState(Double, Double, Double, Double)
在 System.Windows.Window.CreateSourceWindow(Boolean)
在 System.Windows.Window.ShowHelper(System.Object)
在 Microsoft.Practices.Prism.MefExtensions.MefBootstrapper.Run(Boolean)
在 JustAssembly.App.OnStartup(System.Windows.StartupEventArgs)
在 System.Windows.Application.<.ctor>b__1_0(System.Object)
在 System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)
在 System.Windows.Threading.ExceptionWrapper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)
在 System.Windows.Threading.DispatcherOperation.InvokeImpl()
在 System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
在 System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
在 System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
在 MS.Internal.CulturePreservingExecutionContext.Run(MS.Internal.CulturePreservingExecutionContext, System.Threading.ContextCallback, System.Object)
在 System.Windows.Threading.DispatcherOperation.Invoke()
在 System.Windows.Threading.Dispatcher.ProcessQueue()
在 System.Windows.Threading.Dispatcher.WndProcHook(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
在 MS.Win32.HwndWrapper.WndProc(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
在 MS.Win32.HwndSubclass.DispatcherCallbackOperation(System.Object)
在 System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)
在 System.Windows.Threading.ExceptionWrapper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)
在 System.Windows.Threading.Dispatcher.LegacyInvokeImpl(System.Windows.Threading.DispatcherPriority, System.TimeSpan, System.Delegate, System.Object, Int32)
在 MS.Win32.HwndSubclass.SubclassWndProc(IntPtr, Int32, IntPtr, IntPtr)
在 MS.Win32.UnsafeNativeMethods.DispatchMessage(System.Windows.Interop.MSG ByRef)
在 System.Windows.Threading.Dispatcher.PushFrameImpl(System.Windows.Threading.DispatcherFrame)
在 System.Windows.Application.RunDispatcher(System.Object)
在 System.Windows.Application.RunInternal(System.Windows.Window)
在 JustAssembly.App.Main()

NullReferenceException in TypeNode.CleanExceptionSource when trying to compare assemblies

Hi,

I just wanted to test it on a "real world case" by comparing two assemblies, and get the following exception just before the end of the "Loading assembly 2 of 2" phase:

Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt.
   bei JustAssembly.Nodes.TypeNode.CleanExceptionSource(IDecompilationResults decompilationResult, String sourceCode) in c:\Jenkins\ReleaseFullWithUploadBuild\workspace\UI\JustAssembly\Nodes\TypeNode.cs:Zeile 99.
   bei JustAssembly.Nodes.TypeNode.GetDifferenceDecoration() in c:\Jenkins\ReleaseFullWithUploadBuild\workspace\UI\JustAssembly\Nodes\TypeNode.cs:Zeile 168.
   bei JustAssembly.Nodes.TypeNode..ctor(IOldToNewTupleMap`1 typesMap, ItemNodeBase parent, APIDiffInfo apiDiffInfo, FilterSettings filterSettings) in c:\Jenkins\ReleaseFullWithUploadBuild\workspace\UI\JustAssembly\Nodes\TypeNode.cs:Zeile 39.
   bei JustAssembly.Nodes.NamespaceNode.GenerateTypeNode(IOldToNewTupleMap`1 metadataTuple, LoadAPIItemsContext context) in c:\Jenkins\ReleaseFullWithUploadBuild\workspace\UI\JustAssembly\Nodes\NamespaceNode.cs:Zeile 65.
   bei System.Linq.Enumerable.WhereSelectListIterator`2.MoveNext()
   bei System.Collections.ObjectModel.ObservableCollection`1.CopyFrom(IEnumerable`1 collection)
   bei JustAssembly.Nodes.NamespaceNode.LoadChildren() in c:\Jenkins\ReleaseFullWithUploadBuild\workspace\UI\JustAssembly\Nodes\NamespaceNode.cs:Zeile 47.
   bei ICSharpCode.TreeView.SharpTreeNode.EnsureLazyChildren()
   bei ICSharpCode.TreeView.SharpTreeNode.set_IsExpanded(Boolean value)
   bei JustAssembly.Nodes.ModuleNode.<>c__DisplayClass4.<LoadChildren>b__1(IGrouping`2 g) in c:\Jenkins\ReleaseFullWithUploadBuild\workspace\UI\JustAssembly\Nodes\ModuleNode.cs:Zeile 53.
   bei System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
   bei System.Collections.ObjectModel.ObservableCollection`1.CopyFrom(IEnumerable`1 collection)
   bei JustAssembly.Nodes.ModuleNode.LoadChildren() in c:\Jenkins\ReleaseFullWithUploadBuild\workspace\UI\JustAssembly\Nodes\ModuleNode.cs:Zeile 50.
   bei ICSharpCode.TreeView.SharpTreeNode.EnsureLazyChildren()
   bei ICSharpCode.TreeView.SharpTreeNode.set_IsExpanded(Boolean value)
   bei JustAssembly.Nodes.AssemblyNode.GenerateModuleNode(IOldToNewTupleMap`1 metadataTuple, LoadAPIItemsContext context, Boolean shouldBeExpanded) in c:\Jenkins\ReleaseFullWithUploadBuild\workspace\UI\JustAssembly\Nodes\AssemblyNode.cs:Zeile 272.
   bei System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
   bei System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
   bei System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
   bei JustAssembly.Nodes.AssemblyNode.GetMergedModules(Boolean shouldBeExpanded) in c:\Jenkins\ReleaseFullWithUploadBuild\workspace\UI\JustAssembly\Nodes\AssemblyNode.cs:Zeile 260.
   bei JustAssembly.Nodes.AssemblyNode.<>c__DisplayClass6.<LoadItemsAsync>b__3() in c:\Jenkins\ReleaseFullWithUploadBuild\workspace\UI\JustAssembly\Nodes\AssemblyNode.cs:Zeile 181.

I attached a Zip archive containing the files in question.
LibCompare.zip

Thanks for your patience...

Compare assemblies with changed assemblyNames

I have two assseblies, one produced by c# compiler and one created by Reflection.Emit.
The code, type and member names do match but JustAssembly shows them as two different assemblies.

image

Is there an option to ignore assembly names?

Sample assemblies:
sample.zip

Use from command line for enforcement of SemanticVersioning

We use SemanticVersioning (http://semver.org) for all our software assets and I wonder if this utility could (or perhaps already allows) for it to be used as part of a process for sanity checking that.

Specifically it'd be useful to:

  • Submit a target and comparison assembly via the command line
  • Output whether to the command line whether there are:
    • Major (breaking signature) changes
    • Minor (additive signature/type) changes
    • Patch (only internal implementation) changes

Even better would be to be able to submit two sets/paths worth of assemblies and for the tool indicate the highest common denominator (i.e. eight 'patch' and one 'minor' result equals 'minor').

I understand this is almost certainly a feature request and quite possibly out of the scope of what you intend for the tool. Yet having this utility as a repeatable process would elevate it from something of a novelty/emergency utility to a concrete part of our pipeline. Love to hear your thoughts.

Any way to install JustAssembly without registering?

Two installers are offered. One EXE and one MSI (which requires a Telerik account).

While the EXE seems registration-free, it isn't.

image

Is there any way to install (not a portable zip) JustAssembly without registering? This practice is far too predatory, especially for an open-source product.

Bug: Unchecking (Show Unmodified) hides assemblies with modifications, and assemblies with modifications are not highlighted in blue at the highest level

I am submitting this bug because I am comparing two bin folders. At first glance all of the assemblies seem to be matching since none of the assemblies on either side panel are highlighted in blue or marked with a blue tilde character. If you drill down into the assemblies you will see that there are classes/method that have modifications because they are highlighted in blue. This is very misleading. When unchecking (Show Unmodified) assemblies with modifications are hidden. This is also misleading. If I didn't drill down into the assemblies I would not know that there are modifications.

From this picture you can see that at the highest level the assemble is not marked:
notmarkedcorrectly

From this picture you can see that when drilling deeper the class is marked as having modifications.
hasmodifications

Make it clearer which assembly is which

I realize there's a tool tip when you hover over the main tab, but I think it would be great if it was much clearer which assembly was which when you open a file comparison.

Exception error when parsing secondary EXE for diff

Files comparing are 4mb in size. Below is the error:

Object reference not set to an instance of an object.
at JustAssembly.Nodes.TypeNode.CleanExceptionSource(IDecompilationResults decompilationResult, String sourceCode) in C:\Jenkins\ReleaseFullWithUploadBuild\workspace\UI\JustAssembly\Nodes\TypeNode.cs:line 99
at JustAssembly.Nodes.TypeNode.GetDifferenceDecoration() in C:\Jenkins\ReleaseFullWithUploadBuild\workspace\UI\JustAssembly\Nodes\TypeNode.cs:line 166
at JustAssembly.Nodes.TypeNode..ctor(IOldToNewTupleMap1 typesMap, ItemNodeBase parent, APIDiffInfo apiDiffInfo, FilterSettings filterSettings) in C:\Jenkins\ReleaseFullWithUploadBuild\workspace\UI\JustAssembly\Nodes\TypeNode.cs:line 39 at JustAssembly.Nodes.NamespaceNode.GenerateTypeNode(IOldToNewTupleMap1 metadataTuple, LoadAPIItemsContext context) in C:\Jenkins\ReleaseFullWithUploadBuild\workspace\UI\JustAssembly\Nodes\NamespaceNode.cs:line 65
at System.Linq.Enumerable.WhereSelectListIterator2.MoveNext() at System.Collections.ObjectModel.ObservableCollection1.CopyFrom(IEnumerable1 collection) at JustAssembly.Nodes.NamespaceNode.LoadChildren() in C:\Jenkins\ReleaseFullWithUploadBuild\workspace\UI\JustAssembly\Nodes\NamespaceNode.cs:line 47 at ICSharpCode.TreeView.SharpTreeNode.EnsureLazyChildren() at ICSharpCode.TreeView.SharpTreeNode.set_IsExpanded(Boolean value) at JustAssembly.Nodes.ModuleNode.<>c__DisplayClass8_0.<LoadChildren>b__1(IGrouping2 g) in C:\Jenkins\ReleaseFullWithUploadBuild\workspace\UI\JustAssembly\Nodes\ModuleNode.cs:line 53
at System.Linq.Enumerable.WhereSelectEnumerableIterator2.MoveNext() at System.Collections.ObjectModel.ObservableCollection1.CopyFrom(IEnumerable1 collection) at JustAssembly.Nodes.ModuleNode.LoadChildren() in C:\Jenkins\ReleaseFullWithUploadBuild\workspace\UI\JustAssembly\Nodes\ModuleNode.cs:line 50 at ICSharpCode.TreeView.SharpTreeNode.EnsureLazyChildren() at ICSharpCode.TreeView.SharpTreeNode.set_IsExpanded(Boolean value) at JustAssembly.Nodes.AssemblyNode.GenerateModuleNode(IOldToNewTupleMap1 metadataTuple, LoadAPIItemsContext context, Boolean shouldBeExpanded) in C:\Jenkins\ReleaseFullWithUploadBuild\workspace\UI\JustAssembly\Nodes\AssemblyNode.cs:line 315
at System.Linq.Enumerable.WhereSelectEnumerableIterator2.MoveNext() at System.Collections.Generic.List1..ctor(IEnumerable1 collection) at System.Linq.Enumerable.ToList[TSource](IEnumerable1 source)
at JustAssembly.Nodes.AssemblyNode.GetMergedModules(Boolean shouldBeExpanded) in C:\Jenkins\ReleaseFullWithUploadBuild\workspace\UI\JustAssembly\Nodes\AssemblyNode.cs:line 303
at JustAssembly.Nodes.AssemblyNode.<>c__DisplayClass29_0.b__1() in C:\Jenkins\ReleaseFullWithUploadBuild\workspace\UI\JustAssembly\Nodes\AssemblyNode.cs:line 194

Suppress differences due to [CallerFilePath] and [CallerLineNumber]

C# has a feature, which is particularly useful in logging frameworks, but which renders the JustAssembly comparison functionality almost useless.

The C# feature works like this:
You define a method on your logger API:
public void LogMessage(string message, [CallerFilePath] string filePath = "")
{
}
And you call it just like this:
myLogger.LogMessage("thisisthemessage");
The C# compiler then automatically determines the file path your call is in, and hard-codes that in the IL code. Similarly for [CallerMemberName] and [CallerLineNumber].

If you use e.g. VS Team Services build, it will create a temporary folder and build your code in that. So two consecutive builds will have different paths.

When you then compare two assemblies with JustAssembly, it will show that
myLogger.LogMessage("thisisthemessage", @"c:\temp\randomfolder1\application\file.cs");
is different from
myLogger.LogMessage("thisisthemessage", @"c:\temp\randomfolder2\application\file.cs");
And it does this all over the place, because you emit logs all over the place.

It would be nice if JustAssembly would suppress such differences when it can see that the difference in the .dll is not due to a difference in the .cs, but rather due to the callee using the [CallerFilePath] feature.

Installer broken

I went to http://www.telerik.com/justassembly, clicked the Download button, and ran the installer: JustAssembly_2017_2_713_1_Free.exe.

It gave me a "old installer version" error:

image

That link for the new version downloads the same version.

Comand line Comparison not working if extension is not lowercase

Steps to reproduce it

Run the following powershell command

&"C:\Program Files (x86)\Telerik\JustAssembly\Libraries\JustAssembly.CommandLineTool.exe" "E:\git\compare\current\content\lib\ikvm\JVM.DLL" "E:\git\compare\server\content\lib\ikvm\JVM.DLL" "JVM.DLLJVM.DLL.xml"

Expected Result

Assembly comparison should execute and succeed

Actual Result

Error with message
First assembly path is in incorrect format or file not found.
Exit code: 1

workaround:

lower casing the file extensions for both inputs worked well

&"C:\Program Files (x86)\Telerik\JustAssembly\Libraries\JustAssembly.CommandLineTool.exe" "E:\git\compare\current\content\lib\ikvm\JVM.dll" "E:\git\compare\server\content\lib\ikvm\JVM.dll" "JVM.DLLJVM.DLL.xml"

Possible cause:

This class:
https://github.com/telerik/JustAssembly/blob/master/UI/JustAssembly.CommandLineTool/FilePathValidater.cs#L30

should be validating the input file extensions regardless their casing. at the moment, only lowercase "dll" or "exe" are valid inputs

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.