Skip to content

Releases: icsharpcode/CodeConverter

Api changes and bug fixes

19 Dec 09:00

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

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)

7.2

13 Oct 18:46
de7704f

Choose a tag to compare

7.2
  • Parallelize multi-file conversion
  • Make snippet conversion (ConvertText method) make classes partial by default since context isn't known (#379)
  • Web converter requires .NET Core 3.0
  • Visual Studio built-in simplification applied post-conversion (#386)

Vsix

  • Improve UI responsiveness and output window details while converting

VB -> C#

  • Implicitly typed local multi-variable declarations type converted correctly (#373)
  • "My" namespace - first attempt at conversion (#169)

C# -> VB

  • Converts extern functions correctly (#352)
  • Converts invoke on non-events correctly (#377)

VB implict casts

12 Sep 09:20
b149a25

Choose a tag to compare

No longer restricts converted files to solution directory

Vsix

  • Improve UI feedback during conversion

VB -> C#

  • Improve conversion for inline functions
  • Use visual basic "Conversions" functions to match VB logic
  • Simplify output code by shortening some names
  • Improve out parameter conversion
  • Improve iterator conversion
  • Improve with block conversion for value types
  • Improve for loop conversion initialization/bounds
  • No longer duplicates containing namespaces
  • Improve some enum handling
  • Avoid VB type appearing within default(...) expression

C# -> VB

  • Improve conversion of collection initializers

API

ProjectConversion methods now require an IProgress parameter, deprecated overloads without it:

  • ProjectConversion.ConvertProject
  • ProjectConversion.ConvertProjectContents
  • ProjectConversion.ConvertProjectFile

Deprecated overload of ProjectConversion.ConvertSingle in favour of one requiring a Document

Please instead use ConvertSingle(Document document, TextSpan selected, ILanguageConversion languageConversion)
See the implementation of the deprecated method for help in migrating.

7.0

01 Aug 08:43

Choose a tag to compare

7.0

Compatible with Visual Studio ~15.5+

VB -> C#

  • Improve conversion for WithEvents/Handles
  • Improve detection of enum related casts
  • Convert parameterized properties
  • Convert plain XML literals

C# -> VB

  • Convert more binary operators

Possible regressions

Winforms events beta

30 Jul 10:00

Choose a tag to compare

Winforms events beta Pre-release
Pre-release

Improvements to handling form events

6.9

09 Jun 20:54

Choose a tag to compare

6.9

VB -> C#

  • String comparison conversion now often avoids referencing VB library in output (when TextCompare is set to Binary)
  • Convert WithEvents/Handles correctly for partial classes
  • Convert Like operator
  • Convert VB indexer to ElementAtOrDefault to make behaviour consistent
  • Improve accuracy of choosing square brackets or parentheses
  • Avoid nullref when converting for loop

C# -> VB

  • Enable OptionInfer on converted projects
  • Convert global namespace correctly

VB -> C# improvements

12 May 09:49

Choose a tag to compare

VB -> C#

  • Assignment return now converted
  • Enum implicit casts now converted
  • Access to shared variables through instance now converted
  • MyClass references now converted
  • Variables explicitly initialised to their default (as is implicit in VB)
  • Adds project reference to Microsoft.VisualBasic
    • Uses Operators.CompareString for string equality comparison to match VB logic
    • Uses DateAndTime for built-in date functions
    • CDate() now converted to "Conversions.ToDate"
  • Improvements to parenthesization
  • Select Case with non-constant strings now converted correctly
  • Interface readonly properties now converted correctly

Special thanks to @mrmonday for the huge number of contributions towards this release

VS 2017 15.3 to VS 2019 support

08 Apr 23:36
e1386ea

Choose a tag to compare

  • Downgrade Roslyn requirement in attempt to work with VS2017 15.3+

VB -> C#

  • Ensure "new()" generic constraint is last
  • Do not convert MyBase.Finalize, it's implicit
  • Standardize case of identifiers

Minor bug fixes

08 Apr 22:23

Choose a tag to compare

  • Ask people to upgrade VS if missing languageservices

C# -> VB

  • Improve event identifier conversion

VB -> C#

  • Improve conversion of interpolated strings (format, alignment, escaping)