Entries:
Comments:
Discussions:

Loading user information from Channel 9

Something went wrong getting user information from Channel 9

Latest Achievement:

Loading user information from MSDN

Something went wrong getting user information from MSDN

Visual Studio Achievements

Latest Achievement:

Loading Visual Studio Achievements

Something went wrong getting the Visual Studio Achievements

Refactoring Essentials now with a Roslyn Code Converter

Refactoring Essentials, one of our favorite projects, continues rolling on with the release of v4 with a raft of new features and a new C# to VB Roslyn powered converter.

What's really cool is that that converter, and the rest of it, is all open source, RefactoringEssentials. :)

Refactoring Essentials 4.0 Comes With Roslyn Code Converter

On Wednesday at //build/ 2016 Microsoft released Update 2 for Visual Studio 2015. Today, our @roslyn 1.2 compatible version 4.0 of Refactoring Essentials follows suit (I totally like doing useful stuff on April 1st).

We are proud that we now have crossed the line of 250 refactorings/analyzers and fixes for C# and VB, and we expect to extend our VB support via cross-language analyzers using the new IOperation API. However, before getting ahead of ourselves with futures, one more feature stands out in the 4.0 release: our Roslyn Code Converter.

It has soft-launched on the Web with a REST API (background information), and is now available in the Refactoring Essentials extension, where it runs locally:

image

Details of what else is new can be found - as is now customary - in the release notes in our GH wiki. ...

Version 4.0

What's New in C#

New: C# to VB Converter
New refactorings:
  • "Convert instance method to static"
New analyzers:
    • "Comparing equal expression for equality is usually useless"
    • "Issue in format string"
    • "Function never returns"
    • "Local variable hides member"
    • "Parameter hides member"
    • "Redundant .ToString() call"
    • "Redundant 'unsafe' statement"
    • "Member hides static member from outer class"
    • "Initializing field with default value is redundant"
    • "Redundant empty finally block"
    • "Static field in generic type"
    • "Type parameter is never used"
    • "Method with optional parameter is hidden by overload"
    • "Parameter name differs in partial method definition"
    • "'for' loop control variable is never modified"

Check out the main page, http://vsrefactoringessentials.com/



Tags:

Follow the discussion

  • Oops, something didn't work.

    Getting subscription
    Subscribe to this conversation
    Unsubscribing
    Subscribing
  • We're inching closer and closer to that fateful day... the day I can open/edit/save a *.vb file in the C# editor in Visual Studio.

    ...or vice-versa if that's your thing.  ;)

  • Kelps Leite de SousaKelps Kelps Leite de Sousa

    Looking forward for the VB to C# converter. I need this to convince my bosses to change our current code base to C#. I'll take a look at the source code as soon as I find the time to see if I can contribute in the effort to code that converter....

  • This is a great project to prove out the Roslyn tools. I just can't imagine a use case in the business world.

  • @Kelps: FYI - http://www.icsharpcode.net/OpenSource/SD/Download/  v4.4 has a convert VB PROJECT to C#  (98% accurate).

  • MasoudMasoud

    Hello,

    it seems that your converter cannot correctly convert the following code to a true VB.NET code. In C# we can explicitly make the set function private but see the result of pasting the following code. it's wrong.

    public class Test {
    public string Name {get; private set;}
    }

    The wrong conversion is : ( the following is wrong because the name is now public and any body can set the value of it even outside of the Test class. but the c# code does not allow this property to be set outside of the Test class).

    Public Class Test
    Public Property Name As String
    End Class

  • MasoudMasoud

    The correct VB.NET code of the my previous comment must be :

    Public Class Test
    Public Property Name() As String
    Get
    Return m_Name
    End Get
    Private Set
    m_Name = Value
    End Set
    End Property
    Private m_Name As String
    End Class

  • Greg Duncangduncan411 It's amazing what a professional photographer can do...

    @Masoud: Thanks for checking it out. The best way to raise this with the team is to post the issue in the repo here, https://github.com/icsharpcode/RefactoringEssentials/issues

  • Excellent,

    I was testing the c #  to visual basic (V.S) converter and I can say that it is excellent.

    A step in the right direction. Simply, powerful and useful!

    Thank you

    ;)

Remove this comment

Remove this thread

Close

Comments closed

Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation, please create a new thread in our Forums, or Contact Us and let us know.