Skip to content

Releases: icsharpcode/CodeConverter

VB resources

30 Mar 23:06
ab57b55
Compare
Choose a tag to compare

VB -> C#

  • All resx files now moved to project root #551
  • Register event handlers for DesignerGenerated #550
  • Improve qualification with arguments of unknown type #481
  • Omit conversion in string concatenation where possible #508
  • Use ToString for numeric types rather than Conversions.ToString
  • Convert optional ref parameters - fixes #91
  • Always convert Call statement to method call #445
  • Avoid compilation errors when converting const Dates #213
  • Evaluate simple compile time conversions within const declarations

VB -> C# resource fixes

20 Mar 09:43
Compare
Choose a tag to compare

VB -> C#

  • Avoid extra newlines in doc comments #334
  • Avoid duplicate generated constructors #543
  • Comparisons of value/generic types to Nothing now convert to the correct corresponding C# 8 operator
  • Resources are now correctly namespaced after conversion #540
  • LangVersion is now set to "Latest" in csproj e87fef11
  • Improve Winforms designer event experience after conversion #547
  • Don't output solution conversion for in-memory solution file
  • Empty files are no longer skipped #423
  • Specify type suffix for decimal and float literals containing decimal point #548

VS2017 hotfix

19 Mar 23:06
ef5e167
Compare
Choose a tag to compare

Vsix

  • Fixes conversion in VS2017

Faster project conversion, better feedback

11 Mar 10:32
d696ef5
Compare
Choose a tag to compare
  • Known issue: Breaks VS2017 support - please use 8.0.1
  • Improve performance and feedback for large projects containing large files

API

  • IEnumerable<Task> becomes IAsyncEnumerable
  • Upgraded target framework from netstandard 1.3 to netstandard 2.0
  • Introduced cancellation token

VB -> C#

  • Convert "Handles" in some previously missed cases #530
  • Wrap event handlers in lambda where needed #474
  • Streamline trailing else if 810de96
  • Use less error-prone, more performant null/default comparisons 4de1978
  • Convert "{}" to "Array.Empty()" #495
  • Convert inferred anonymous member names without duplicating name #480
  • Convert "!" operator to element access #479
  • Fix async method default return statements #478
  • Convert multi-dimensional array initializers correctly #539

C# -> VB

  • Convert PrefixUnaryExpression (Not, minus, etc.) #533
  • Rename more members with case conflicts (e.g. interface members) #533
  • String equality conversion now calls "Equals" to match the C# logic #533
  • Deduplicate imports #533
  • Converts "default" keyword to "Nothing" keyword #428

7.9.0 Avoid more VS crashes

02 Mar 09:13
dde4f25
Compare
Choose a tag to compare

Vsix

  • Exclude project file from conversion result if it hasn't changed
  • Further efforts to stop the roslyn library crashing Visual Studio
  • Conversion tasks are now cancellable

VB -> C#

  • More consistently add constructor for DesignerGenerated attribute

C# -> VB

  • Avoid incorrectly renaming symbols
  • Prevent "SyntaxTree is not part of the compilation" error #527
  • Avoid incorrectly renaming symbols #524

Avoid VS crash

16 Feb 09:34
27cdc5c
Compare
Choose a tag to compare

Vsix

  • Stop Roslyn from silently crashing Visual Studio during conversion #521

VB -> C#

  • Performance improvement on big solutions

C# -> VB

  • Partial class/method improvements
  • Avoid ambiguity in some generated method calls

Comment conversion

15 Feb 16:26
Compare
Choose a tag to compare

VB -> C#

  • Cast foreach collection to IEnumerable if needed or unknown
  • Fix ordering bug converting redim bounds without preserve for 2d arrays
  • Exit Property should become return #497
  • First effort converting some Xml Member Access
  • Avoid adding new keyword when not allowed/required #504
  • Avoid evaluating Select Case expression multiple times in some cases where it may be non-deterministic or have side effects #323
  • Avoid repeated redundant break statement caused by explicit Exit Select #433
  • Convert return expression to match return type #496
  • Fix conversion for hex values ending in "C" #483
  • Converted multi line if blocks now always contain braces #466
  • Add conversions to allow arithmetic on enums
  • Add omitted argument lists on conditional expressions
  • Winforms initialization improvements
  • Convert VbMyResourcesResXFileCodeGenerator resource generator type in project file
  • Improved comment conversion #518

C# -> VB

  • Rename local symbols differing only in case #80
  • Remove erroneous event modifier from delegates
  • Add Implements clause for event fields
  • Add Overloads modifier where needed in VB
  • Add ReadOnly/WriteOnly modifier for interface properties that need it
  • Fix bug which led to nested modules
  • Fix accessibility of converted public static classes
  • Fix overqualifying with "Global" in some cases
  • Fix parenthesized TryCast which caused compile error
  • Fix erroneous rename of value argument in events' accessors and properties' setter
  • Add call AscW method to convert Char to numeric types
  • Remove erroneous backing fields' generation in root classes
  • Add TryCast expression for convering to generic types
  • Comments are now converted
  • Some preprocessor directives are partially converted #517

VS Crash fix & better name resolution

11 Jan 18:16
Compare
Choose a tag to compare
  • Improve ambiguous name resolution

Vsix

  • Fix Visual Studio crash when converting some structures

VB -> C#

  • Simplify compound assignment conversion
  • Avoid some case conflicts

C# -> VB

  • Remove extra parentheses around CType expression
  • Convert var declaration patterns with binary operators in switch statements (part of #222)
  • Keep empty argument lists

Api changes and bug fixes

19 Dec 09:00
Compare
Choose a tag to compare
  • Several C# API tweaks wrapping conversion options into a type

Vsix

  • Fixed error caused when converting with "Copy to clipboard" option enabled

VB -> C#

  • Add modifier for nested types
  • Remove body for converted extern methods
  • Convert Call with missing argument list and semantic information

C# -> VB

  • Convert "is" expression (#427)
  • Convert "*=" operator

Bug fixes

25 Nov 19:39
Compare
Choose a tag to compare
  • Fixes for nullrefs

Vsix

  • Load extension only when menu item clicked (multi-project conversion menu not present until project loaded)

VB -> C#

  • Convert implicit object->string cast correctly (#365)
  • Convert trivia (e.g. comments) at start of file (#333)
  • Improvements to redim conversion (#403, #393)
  • Convert array of arrays initializer (#364)
  • Improvements to implicit enum -> int conversion (#361)
  • Convert expressions in constants (#329)
  • Convert implicit ElementAtOrDefault (#362)
  • Convert types in ternary expressions (#363)
  • Support for converting dot net standard VB projects (#398)
  • Avoid compilation error for duplicate cases (#374)
  • Correctly handle type promoted module symbols (#375)
  • Prefer renamed imports for name resolution (#401)
  • Correctly convert ambiguous names (#332)
  • Ensure correct visibility for constructors (#422)
  • Ensure casing is correct for namespaces (#421)
  • Convert CType from a non numeric type to an enum
  • Convert Exit Function
  • Convert object initializers requiring type casts
  • Convert async keyword on lambdas
  • Convert nullable if statement conditions

C# -> VB

  • Convert property accessors with visiblity modifiers (#92)
  • For loop with decrement (i--) results in missing 'Step -1' (#411)
  • Improve escaping for variables of predefined types
  • Add Implements keyword for explicitly implemented members
  • Property/indexer conversion improvements
  • Convert private default members
  • Convert property accessors with visiblity modifiers (#92)
  • For loop with decrement (i--) results in missing 'Step -1' (#411)
  • Improve custom event conversion (#442)