Steven Cinquegrana

error on any vb to c# conversion

Error is:

CONVERSION ERROR: Code could not be converted. Details:

----- Exception 1 of 1 -----
System.NotImplementedException: Microsoft.CodeAnalysis.CSharp.Syntax.IncompleteMemberSyntax not implemented!
at RefactoringEssentials.VB.Converter.CSharpConverter.NodesVisitor.DefaultVisit(SyntaxNode node)
at Microsoft.CodeAnalysis.CSharp.CSharpSyntaxVisitor`1.VisitIncompleteMember(IncompleteMemberSyntax node)
at Microsoft.CodeAnalysis.CSharp.Syntax.IncompleteMemberSyntax.Accept[TResult](CSharpSyntaxVisitor`1 visitor)
at RefactoringEssentials.VB.Converter.CSharpConverter.NodesVisitor.<VisitCompilationUnit>b__14_1(MemberDeclarationSyntax m)
at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
at Microsoft.CodeAnalysis.VisualBasic.SyntaxFactory.List[TNode](IEnumerable`1 nodes)
at RefactoringEssentials.VB.Converter.CSharpConverter.NodesVisitor.VisitCompilationUnit(CompilationUnitSyntax node)
at Microsoft.CodeAnalysis.CSharp.Syntax.CompilationUnitSyntax.Accept[TResult](CSharpSyntaxVisitor`1 visitor)
at RefactoringEssentials.VB.Converter.CSharpConverter.Convert(CSharpSyntaxNode input, SemanticModel semanticModel, Document targetDocument)
at RefactoringEssentials.VB.Converter.CSharpConverter.ConvertText(String text, MetadataReference[] references)

Please check for any errors in the original code and try again.

A conversion of the most basic code, eg:

Private Class Test
Property Test1 As String = Nothing
End Class

is sufficient to blow it up.
Problem by Steven Cinquegrana Status: Not Done Comments: 2 Last update: 2018-01-24T14:28:17 by Veselina Raykova
0
Ian Elsinga

code converter completely broken

Code converter does not work at all. We are a Telerik customer and have been using it for years without issue - a number of other people are experiencing the same thing. Would you be able to fix it or in the interim revert it back to the way it was?

Thanks for your immediate attention.

CONVERSION ERROR: Code could not be converted. Details:

----- Exception 1 of 1 -----
System.NotImplementedException: Microsoft.CodeAnalysis.VisualBasic.Syntax.MethodStatementSyntax not implemented!
at RefactoringEssentials.CSharp.Converter.VisualBasicConverter.NodesVisitor.DefaultVisit(SyntaxNode node)
at Microsoft.CodeAnalysis.VisualBasic.VisualBasicSyntaxVisitor`1.VisitMethodStatement(MethodStatementSyntax node)
at Microsoft.CodeAnalysis.VisualBasic.Syntax.MethodStatementSyntax.Accept[TResult](VisualBasicSyntaxVisitor`1 visitor)
at RefactoringEssentials.CSharp.Converter.VisualBasicConverter.NodesVisitor.<ConvertMembers>b__11_0(StatementSyntax m)
at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
at RefactoringEssentials.CSharp.Converter.VisualBasicConverter.NodesVisitor.<ConvertMembers>d__11.MoveNext()
at Microsoft.CodeAnalysis.CSharp.SyntaxFactory.List[TNode](IEnumerable`1 nodes)
at RefactoringEssentials.CSharp.Converter.VisualBasicConverter.NodesVisitor.VisitInterfaceBlock(InterfaceBlockSyntax node)
at Microsoft.CodeAnalysis.VisualBasic.Syntax.InterfaceBlockSyntax.Accept[TResult](VisualBasicSyntaxVisitor`1 visitor)
at RefactoringEssentials.CSharp.Converter.VisualBasicConverter.NodesVisitor.<VisitCompilationUnit>b__8_1(StatementSyntax m)
at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
at Microsoft.CodeAnalysis.CSharp.SyntaxFactory.List[TNode](IEnumerable`1 nodes)
at RefactoringEssentials.CSharp.Converter.VisualBasicConverter.NodesVisitor.VisitCompilationUnit(CompilationUnitSyntax node)
at Microsoft.CodeAnalysis.VisualBasic.Syntax.CompilationUnitSyntax.Accept[TResult](VisualBasicSyntaxVisitor`1 visitor)
at RefactoringEssentials.CSharp.Converter.VisualBasicConverter.Convert(VisualBasicSyntaxNode input, SemanticModel semanticModel, Document targetDocument)
at RefactoringEssentials.CSharp.Converter.VisualBasicConverter.ConvertText(String text, MetadataReference[] references)

Please check for any errors in the original code and try again.

Problem by Ian Elsinga Status: Not Done Comments: 0 Last update: 2018-01-08T20:02:01 by Ian Elsinga
0
Mike Albert

from NRefactory to Refactoring Essentials - Bad Move

I have been using the Telerik online code converter for years. You recently switched from NRefactory to Refactoring Essentials, rendering this beloved tool practically useless. Just about anything I throw at it throws an error in the results window.

Please bring back the old engine.
Feedback by Mike Albert Status: Not Done Comments: 2 Last update: 2017-12-28T19:52:07 by Riaan Pretorius
0
David Aschliman

ObjectMemberInitializerSyntax

ObjectMemberInitializerSyntax is not implemented when converting VB.NET to C#. This makes it difficult to use this tool, since my source uses this technique.

For example...
New ItemAttribute() With {
.ItemID = 51,
.AttributeName = "Attr1",
.AttributeValue = 4,
.SortOrder = 1}
Feedback by David Aschliman Status: Not Done Comments: 1 Last update: 2017-11-30T06:44:51 by Muhammad Tariq
0
Cok King

vb to c# : backcolor is not converted to Background

Problem by Cok King Status: Not Done Comments: 0 Last update: 2017-11-23T12:24:19 by Cok King
0
Steven Cinquegrana

Server Error in '/' Application

Your site is now throwing the follwoing error on submitting a very basicVB function that would have worked fine previously:

"Server Error in '/' Application.
Runtime Error
Description: An exception occurred while processing your request. Additionally, another exception occurred while executing the custom error page for the first exception. The request has been terminated."

Conversion code is:

Private Sub CopyText(
ByVal s As Object,
ByVal e As EventArgs) Handles cmsMain.ItemClicked

Try
Clipboard.SetDataObject(TryCast(s, ContextMenuStrip).SourceControl.Text, False)
Catch x As Exception
MessageBox.Show(x.Message, "Error")
Finally

End Try
End Sub
Problem by Steven Cinquegrana Status: Not Done Comments: 0 Last update: 2017-11-22T06:48:40 by Steven Cinquegrana
0
Filippo Bottega

Module instead static class

The C# code:

public static partial class TableExtensions
{
public static File Find(this ITable<File> table, int ID)
{
return table.FirstOrDefault(t =>
t.ID == ID);
}

public static FileHash Find(this ITable<FileHash> table, int IDFile, int Hash)
{
return table.FirstOrDefault(t =>
t.IDFile == IDFile &&
t.Hash == Hash);
}

public static Group Find(this ITable<Group> table, int ID)
{
return table.FirstOrDefault(t =>
t.ID == ID);
}
}

should be converted to:

Partial Public Module TableExtensions
<System.Runtime.CompilerServices.Extension>
Public Function Find(table As ITable(Of File), ID As Integer) As File
Return table.FirstOrDefault(Function(t) t.ID = ID)
End Function

<System.Runtime.CompilerServices.Extension>
Public Function Find(table As ITable(Of FileHash), IDFile As Integer, Hash As Integer) As FileHash
Return table.FirstOrDefault(Function(t) t.IDFile = IDFile AndAlso t.Hash = Hash)
End Function

<System.Runtime.CompilerServices.Extension>
Public Function Find(table As ITable(Of Group), ID As Integer) As Group
Return table.FirstOrDefault(Function(t) t.ID = ID)
End Function
End Module

instead of:

Public NotInheritable Partial Class TableExtensions
Private Sub New()
End Sub
<System.Runtime.CompilerServices.Extension> _
Public Shared Function Find(table As ITable(Of File), ID As Integer) As File
Return table.FirstOrDefault(Function(t) t.ID = ID)
End Function

<System.Runtime.CompilerServices.Extension> _
Public Shared Function Find(table As ITable(Of FileHash), IDFile As Integer, Hash As Integer) As FileHash
Return table.FirstOrDefault(Function(t) t.IDFile = IDFile AndAlso t.Hash = Hash)
End Function

<System.Runtime.CompilerServices.Extension> _
Public Shared Function Find(table As ITable(Of Group), ID As Integer) As Group
Return table.FirstOrDefault(Function(t) t.ID = ID)
End Function
End Class

Best regards,
Filippo.
Problem by Filippo Bottega Status: Not Done Comments: 0 Last update: 2017-10-25T13:51:27 by Filippo Bottega
0
Seznam cz

Support VB.NET 15.0

Right now the converter does not support newer language features like the ?. operator and is practically useless for any modern VB code. See this file as an example:
https://github.com/ljw1004/platform-specific-analyzer/blob/master/PlatformSpecificAnalyzer/PlatformSpecificAnalyzer.vb

My request is please support the latest VB.NET 15.0 language, thanks.
https://en.wikipedia.org/wiki/Visual_Basic_.NET#2017_.28VB_15.0.29
Feature Request by Seznam cz Status: Not Done Comments: 0 Last update: 2017-09-15T10:53:30 by Seznam cz
0
Victor Richerson

convert to remove linq

I hate linq and lamda expression code so I would like to be able to take something with those and convert it to regular code. I really don't like that you create one off methods with lambda expressions and think it is likely to lead to bad code.
Feature Request by Victor Richerson Status: Not Done Comments: 0 Last update: 2017-09-12T19:35:22 by Victor Richerson
0
Mario Cesar Simão Junior

VB Constants conversion

Need to convert the Constants, like {{Constants.vbCrLf}} to {{Environment.NewLine}}, and many others.
Problem by Mario Cesar Simão Junior Status: Not Done Comments: 0 Last update: 2017-07-27T12:12:30 by Mario Cesar Simão Junior
0
Displaying items 11 - 20 of 93