среда, 25 ноября 2020 г.

CIL Tools update 2.1

The CIL Tools version 2.1 added a new library CilTools.Metadata, as well as some new features and bug fixes for existing projects.

Download CIL Tools 2.1 on Github releases

CIL View ClickOnce installer

Documentation

CilTools.BytecodeAnalysis changes:

  • Add .NET Standard 2.0+ support
  • Add support for method implementation flags when outputting method signatures
  • Add support for function pointer types. The standard reflection APIs don't support function pointers, so this only works with custom implementations; but CilTools.Metadata does implement this functionality.
  • Add support for module-level ("global") functions and fields
  • Add syntax API support for calli instruction's operand
  • Add full custom modifiers support (they were previously only supported in standalone signatures). Only works with CilTools.Metadata or custom implementations.
  • Add syntax API support for custom modifiers
  • Add pinvokeimpl support (only CilTools.Metadata or custom implementations)
  • Add support for newslot and final keywords
  • Add support for generic types in signature parser
  • The TypeSpec class now inherits from System.Type, so it can be used in many contexts where reflection type construct is needed. The "Type" property of TypeSpec is now deprecated.
  • Format char default values as hex
  • Improve custom attribute support (raw attribute data now can be fetched - only CilTools.Metadata or custom implementations)
  • Improve empty method body handling. Now empty body is ignored only when method is is abstract, P/Invoke or implemented by runtime. In other cases the exception is generated.
  • Improve generic methods support. The CustomMethod class now has the GetDefinition method that inheritors can implement to enable fetching of method definition (and therefore parameter names)
  • Place custom attributes before default parameter values in disassembled method code
  • Fix ldloc.s/stloc.s instruction handling
  • Fix ldtoken instruction handling with field operand
  • Fix possible null reference when converting array/pointer of generic args to syntax
  • Fix return type output for CustomMethod implementations

CilTools.Runtime changes

  • Add exception block support for dynamic methods
  • Add method token resolution for dynamic methods

CIL View changes

  • Update assembly reading mechanism to use CilTools.Metadata instead of loading assemblies directly into the current process. This enables inspecting assemblies for another target framework (such as .NET Standard) or when some dependencies could not be resolved. This also means assemblies can be unloaded from memory when they are no longer needed.
  • Add syntax highlighting for calli instruction's operand
  • Support auto-completion in assembly and type combo boxes
  • Improve performance for type combo box when assembly has a lot of types
  • Rework search. Search results are now displayed in context menu. Method search is added.

вторник, 21 июля 2020 г.

CIL Tools release

CIL tools is a set of software to work with Common Intermediate Language in .NET. It's an expansion of previously released CilBytecodeParser library. Besides the bytecode analysis library, it now also contains CilTools.Runtime library to load CIL bytecode of methods in external process's CLR instance and CIL View windows application to visualize CIL code.

Download CIL Tools 2.0 on Github releases

CIL View ClickOnce installer

Documentation

CilTools.BytecodeAnalysis changes:

  • Rename CilBytecodeParser to CilTools.BytecodeAnalysis
  • Add dynamic method parsing support
  • Add syntax API
  • Rework CilInstruction with generics
  • Change the behaviour of CilGraph.ToString method to include only signature instead of full method code
  • Add CilGraph.ToText method to return full code
  • Add CilGraph.PrintSignature to output signature into target TextWriter
  • Fix bug that prevented correct decoding of TypeDef or TypeSpec tokens during signature parsing
  • Fix possible null refs in signature parser
  • Avoid first-chance ArgumentException when resolving tokens
  • Fix bug in MetadataReader.ReadCompressed
  • Fix ldflda/ldsflda instructions handling

суббота, 16 мая 2020 г.

WinForms Excel Library v1.2 update

Download WinForms Excel library 1.2 on Github releases

  • Fix null reference when trying to access active workbook
  • Fix exceptions when trying to delete temp file
  • Disable code that accesses Worksheet.ProtectContents in Excel 2016+
  • Disable APIs that add, remove or rename worksheets and open files in Excel 2016+ due to UI freezes (DisplayStatusBar, DisplayFormulaBar properties - can't be set after Excel is initialized; DeleteSheet, AddSheet, SetSheetName, MoveSheet, NewEmptyWorkbook, OpenFile, AddChart methods now throw NotSupportedException)
  • Fix SetActiveSheet and SaveIntoFile in Excel 2016+
  • Add new properties InitialSheetCount and SourceFile that can be set only before Excel is initialized
  • Add new method AddEmbeddedChart

WinForms Excel Library now works with Excel 2016, but with limited functionality:

  • You cannot add or remove sheets after InitializeExcel is called, but you can set InitialSheetCount before initialization to control sheet count.
  • You cannot open workbook files after InitializeExcel is called, but you can set SourceFile property before initialization to select workbook to open. If this property is empty string, control will be created with new empty workbook
  • You cannot add charts to new sheets, but you can add charts embedded to existing sheet with AddEmbeddedChart method
  • You cannot modify content of protected sheets (on older Excel versions library attempts to unprotect sheet)