question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

VB -> C#: conversion of individual file runs well but same file on project conversion produced bad C# code

See original GitHub issue

Input code

RuleFor(Function(x) x.Expedidor).Length(0, LEN_EXPEDIDOR)
RuleFor(Function(x) x.ExpedidorNome).NotEmpty.Length(1, LEN_EXPEDIDOR_NOME)
RuleFor(Function(x) x.ExpedidorMorada).NotEmpty.Length(1, LEN_EXPEDIDOR_MORADA)
RuleFor(Function(x) x.ExpedidorLocalidade).NotEmpty.Length(1, LEN_EXPEDIDOR_LOCALIDADE)

Erroneous output

RuleFor[x => x.Expedidor].Length(0, LEN_EXPEDIDOR);
RuleFor[x => x.ExpedidorNome].NotEmpty.Length(1, LEN_EXPEDIDOR_NOME);
RuleFor[x => x.ExpedidorMorada].NotEmpty.Length(1, LEN_EXPEDIDOR_MORADA);
RuleFor[x => x.ExpedidorLocalidade].NotEmpty.Length(1, LEN_EXPEDIDOR_LOCALIDADE);### Expected output
RuleFor(x => x.Expedidor).Length(0, LEN_EXPEDIDOR);
RuleFor(x => x.ExpedidorNome).NotEmpty().Length(1, LEN_EXPEDIDOR_NOME);
RuleFor(x => x.ExpedidorMorada).NotEmpty().Length(1, LEN_EXPEDIDOR_MORADA);
RuleFor(x => x.ExpedidorLocalidade).NotEmpty().Length(1, LEN_EXPEDIDOR_LOCALIDADE);

Details

VS extension (web converter produces the error also) version 8.1.5.0

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
desbaratizadorcommented, Jul 21, 2020

Last time i used the converter, a really good tool, this issue disappeared, so i will close him.

P.S.: issue #592 remains (at same conversion of above), but i will need to convert more projects, wait for the feedback

Thanks

0reactions
GrahamTheCodercommented, Jul 25, 2020

I believe this is also related to dotnet/roslyn#6615

Read more comments on GitHub >

github_iconTop Results From Across the Web

Mixing C# & VB In The Same Project
This will produce two .dll files. It works, but code is compiled in the same order as listed in "codeSubDirectories" and therefore i.e ......
Read more >
Fix program errors and improve code - Visual Studio ...
This article describes some basic ways Visual Studio can help you find and fix problems in your code, including build errors, code analysis, ......
Read more >
Cannot debug net6.0-macos Apps - Developer Community
When I hit debug, the following error is shown in the Terminal: Possible reasons for this include: * You misspelled a built-in dotnet...
Read more >
The 10 Most Common Mistakes in C# Programming
This tutorial describes 10 of the most common C# programming mistakes made, or problems to be avoided, by C# programmers and provide them...
Read more >
Java code corrector. IntelliCode. Copy-paste the code. text. The
Inspections can scan your code in all project files or only in specific scopes (for example, only in production code or in modified...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found