0

I moved development of a project from Visual Studio to Rider. When I was working in Visual Studio, when pasting my input within the launch arguments, these would retain formatting. This was important because I was merging the block of text into a single string, then separating it using \r and \n which was embedded within the argument.

I just noticed that Rider doesn't retain the formatting of the original argument.

Is there a way to retain formatting in Rider, or should I move away from parsing using individual lines?

4
  • 5
    Some example of what/where you trying to do that may help... Note that command line arguments are generally one line... so having new line in those are unusual at least. Commented Oct 28 at 20:47
  • ^^ This and that: "should I move away from parsing using individual lines?" - yes. Commented Oct 29 at 10:26
  • In that case I'll just move away from parsing using line breaks. It was convenient because Visual Studio was retaining formatting with launch arguments. Not sure why Rider is not. Commented Oct 29 at 20:13
  • If you start an application from the cmd line, you ususally won't have parameters entered with line breaks. That would be highly unusual. But be advised: there are some helpers you can use to make cmd line parameter parsing much more convenient. Like this: Parse the Command Line with System.CommandLine to begin with. You can also have something similar with Spectre.Console ... Commented Oct 30 at 10:08

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.