Charles Cherry

Cannot convert ExpressionStatementSyntax

Cannot convert ExpressionStatementSyntax, System.InvalidOperationException: Sequence contains more than one element
at System.Linq.Enumerable.Single[TSource](IEnumerable`1 source)
at ICSharpCode.CodeConverter.CSharp.VisualBasicConverter.NodesVisitor.VisitQueryExpression(QueryExpressionSyntax node)
at Microsoft.CodeAnalysis.VisualBasic.Syntax.QueryExpressionSyntax.Accept[TResult](VisualBasicSyntaxVisitor`1 visitor)
at Microsoft.CodeAnalysis.VisualBasic.VisualBasicSyntaxVisitor`1.Visit(SyntaxNode node)
at ICSharpCode.CodeConverter.CSharp.CommentConvertingNodesVisitor.DefaultVisit(SyntaxNode node)
at Microsoft.CodeAnalysis.VisualBasic.VisualBasicSyntaxVisitor`1.VisitQueryExpression(QueryExpressionSyntax node)
at Microsoft.CodeAnalysis.VisualBasic.Syntax.QueryExpressionSyntax.Accept[TResult](VisualBasicSyntaxVisitor`1 visitor)
at ICSharpCode.CodeConverter.CSharp.VisualBasicConverter.NodesVisitor.VisitInvocationExpression(InvocationExpressionSyntax node)
at Microsoft.CodeAnalysis.VisualBasic.Syntax.InvocationExpressionSyntax.Accept[TResult](VisualBasicSyntaxVisitor`1 visitor)
at Microsoft.CodeAnalysis.VisualBasic.VisualBasicSyntaxVisitor`1.Visit(SyntaxNode node)
at ICSharpCode.CodeConverter.CSharp.CommentConvertingNodesVisitor.DefaultVisit(SyntaxNode node)
at Microsoft.CodeAnalysis.VisualBasic.VisualBasicSyntaxVisitor`1.VisitInvocationExpression(InvocationExpressionSyntax node)
at Microsoft.CodeAnalysis.VisualBasic.Syntax.InvocationExpressionSyntax.Accept[TResult](VisualBasicSyntaxVisitor`1 visitor)
at ICSharpCode.CodeConverter.CSharp.VisualBasicConverter.MethodBodyVisitor.VisitExpressionStatement(ExpressionStatementSyntax node)
at Microsoft.CodeAnalysis.VisualBasic.Syntax.ExpressionStatementSyntax.Accept[TResult](VisualBasicSyntaxVisitor`1 visitor)
at Microsoft.CodeAnalysis.VisualBasic.VisualBasicSyntaxVisitor`1.Visit(SyntaxNode node)
at ICSharpCode.CodeConverter.CSharp.CommentConvertingMethodBodyVisitor.ConvertWithTrivia(SyntaxNode node)
at ICSharpCode.CodeConverter.CSharp.CommentConvertingMethodBodyVisitor.DefaultVisit(SyntaxNode node)

Input:

From _sponsorClaim In Claim.SponsorClaim.Sponsor.SponsorClaims
Where _sponsorClaim.ClaimDate < ClaimCriteria.ClaimDate
Let _sponsorClaimRevision = _sponsorClaim.SponsorClaimRevision
From _claim In _sponsorClaimRevision.Claims
Where _claim.Site IsNot Nothing _
AndAlso _claim.Site.Id = Site.Id
Order By _sponsorClaim.ClaimDate Descending
Select _claim
Problem by Charles Cherry Status: Not Done Comments: 0 Last update: 2018-06-19T18:03:20 by Charles Cherry
0
Charles Cherry

If Statement not implemented

CONVERSION ERROR: Conversion for IfStatement not implemented, please report this issue in 'If accountReceivableId <= 0...' at character 0

This seems like a very basic use case... converting an If statement. When can this be implemented?

Error message:
CONVERSION ERROR: Conversion for IfStatement not implemented, please report this issue in 'If accountReceivableId <= 0...' at character 0
at ICSharpCode.CodeConverter.CSharp.VisualBasicConverter.NodesVisitor.DefaultVisit(SyntaxNode node)
at Microsoft.CodeAnalysis.VisualBasic.VisualBasicSyntaxVisitor`1.VisitIfStatement(IfStatementSyntax node)
at Microsoft.CodeAnalysis.VisualBasic.Syntax.IfStatementSyntax.Accept[TResult](VisualBasicSyntaxVisitor`1 visitor)
at Microsoft.CodeAnalysis.VisualBasic.VisualBasicSyntaxVisitor`1.Visit(SyntaxNode node)
at ICSharpCode.CodeConverter.CSharp.CommentConvertingNodesVisitor.DefaultVisit(SyntaxNode node)
at Microsoft.CodeAnalysis.VisualBasic.VisualBasicSyntaxVisitor`1.VisitIfStatement(IfStatementSyntax node)
at Microsoft.CodeAnalysis.VisualBasic.Syntax.IfStatementSyntax.Accept[TResult](VisualBasicSyntaxVisitor`1 visitor)
at ICSharpCode.CodeConverter.CSharp.VisualBasicConverter.NodesVisitor.<VisitCompilationUnit>b__24_3(StatementSyntax m)
at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
at Microsoft.CodeAnalysis.SyntaxList`1.CreateNode(IEnumerable`1 nodes)
at Microsoft.CodeAnalysis.SyntaxList`1..ctor(IEnumerable`1 nodes)
at Microsoft.CodeAnalysis.CSharp.SyntaxFactory.List[TNode](IEnumerable`1 nodes)
at ICSharpCode.CodeConverter.CSharp.VisualBasicConverter.NodesVisitor.VisitCompilationUnit(CompilationUnitSyntax node)
at Microsoft.CodeAnalysis.VisualBasic.Syntax.CompilationUnitSyntax.Accept[TResult](VisualBasicSyntaxVisitor`1 visitor)
at Microsoft.CodeAnalysis.VisualBasic.VisualBasicSyntaxVisitor`1.Visit(SyntaxNode node)
at ICSharpCode.CodeConverter.CSharp.CommentConvertingNodesVisitor.DefaultVisit(SyntaxNode node)
at ICSharpCode.CodeConverter.CSharp.CommentConvertingNodesVisitor.VisitCompilationUnit(CompilationUnitSyntax node)
at Microsoft.CodeAnalysis.VisualBasic.Syntax.CompilationUnitSyntax.Accept[TResult](VisualBasicSyntaxVisitor`1 visitor)
at ICSharpCode.CodeConverter.CSharp.VisualBasicConverter.ConvertCompilationTree(VisualBasicCompilation compilation, VisualBasicSyntaxTree tree)
at ICSharpCode.CodeConverter.CSharp.VBToCSConversion.SingleFirstPass(Compilation sourceCompilation, SyntaxTree tree)
at ICSharpCode.CodeConverter.Shared.ProjectConversion.SingleFirstPass(SyntaxTree tree, String treeFilePath)
at ICSharpCode.CodeConverter.Shared.ProjectConversion.FirstPass()
Problem by Charles Cherry Status: Not Done Comments: 0 Last update: 2018-05-23T17:35:53 by Charles Cherry
0
Andy W

conversion error

I tried to convert some working C# code but it came back with a conversion error

Error message at the end of the file.
Problem by Andy W Status: Not Done Comments: 0 Attachments: 1 Last update: 2018-04-12T15:03:42 by Andy W
0
CodeDOM CodeDOM

convert custom event from c# to vb

When I convert folowing custom event I get it with out Custom keyword and without RaiseEvent Statement

public static readonly RoutedEvent HelpEvent = EventManager.RegisterRoutedEvent("Help", RoutingStrategy.Bubble, typeof(EventHandler), typeof(Wizard));
public event RoutedEventHandler Help
{
add
{
AddHandler(HelpEvent, value);
}
remove
{
RemoveHandler(HelpEvent, value);
}
}
Feedback by CodeDOM CodeDOM Status: Not Done Comments: 0 Last update: 2018-04-11T18:24:17 by CodeDOM CodeDOM
0
CodeDOM CodeDOM

CONVER

When I convert folowing code I get empty sub New without Mybase.New

public class CancelRoutedEventArgs : RoutedEventArgs
{
public CancelRoutedEventArgs()
: base()
{
}

public CancelRoutedEventArgs(RoutedEvent routedEvent)
: base(routedEvent)
{
}

public CancelRoutedEventArgs(RoutedEvent routedEvent, object source)
: base(routedEvent, source)
{
}
}
Feedback by CodeDOM CodeDOM Status: Not Done Comments: 0 Last update: 2018-04-11T18:19:17 by CodeDOM CodeDOM
0
Dave Owens

argumentoutofrangeexception C# to Vb.Net Conversion

The attached files contain 1) a C# program whose conversion blew up with an argumentoutofrangeexception 2) the error report
Problem by Dave Owens Status: Not Done Comments: 0 Attachments: 2 Last update: 2018-03-29T19:38:25 by Dave Owens
0
Umer Tariq

telerik converter is not working

Hi,
I am using Telerik(VB/C#) Converter since 5 months, It works Perfectly fine. But from yesterday It is not working fine. When I convert vb code to C#. It gives unknown exceptions even I want to convert simple line of code or (Hello World). You can see http://converter.telerik.com/ . Please fix it.
Thanks

Feedback by Umer Tariq Status: Not Done Comments: 13 Last update: 2018-03-12T23:26:42 by Graham Helliwell
0
Mark couvaras

Converter is totally broken now

Could you please fix this. It used to work so well, now it cannot even do a simple line of basic code.
Feedback by Mark couvaras Status: Not Done Comments: 3 Attachments: 1 Last update: 2018-02-21T12:10:41 by Ck Ry
0
Satbir Baidwan

cannot convert code from vb to c# with Date.Parse

cannot convert code from vb to c# with Date.Parse
Problem by Satbir Baidwan Status: Not Done Comments: 1 Last update: 2018-02-09T07:45:21 by Mark couvaras
0
Francesco Battaglia

Misplacement of <MarshalAs> attribute to return value

From C# to VB, if I declare a simple function with the "MarshalAs" attribute in the return value, the VB code will have the "MarshalAs" attribute misplaced, as before the function declaration instead of just before the return value type.

For example:
C# code

[return: MarshalAs(UnmanagedType.U4)]
int MyFunction(int myInt);

translate to this VB code

<MarshalAs(UnmanagedType.U4)>
Private Function MyFunction(ByVal myInt As Integer) As Integer

but the correct translation is:

Private Function MyFunction(ByVal myInt As Integer) As <MarshalAs(UnmanagedType.U4)> Integer
Problem by Francesco Battaglia Status: Not Done Comments: 0 Last update: 2018-02-06T09:25:12 by Francesco Battaglia
0
Displaying items 1 - 10 of 93