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.

Empty line at the top of solution files

See original GitHub issue

Is there a reason why there’s an empty line at the top of solution files?

I found this StackOverflow question, but it doesn’t really answer the question.

Is this some weird legacy issue, and if so, can’t it be put behind a flag like dotnet new sln --legacy-formatting?

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
vlada-shubinacommented, Jun 1, 2022

@glen-84 i agree with Sayed here. The template in .NET SDK is based on the Blank Solution that VS creates and it has an empty line. Please open Visual Studio feedback ticket if you want to know more on this. Thank you

1reaction
sayedihashimicommented, May 31, 2022

Best thing to do is to create a feedback item with Report a Problem https://docs.microsoft.com/en-us/visualstudio/ide/how-to-report-a-problem-with-visual-studio?view=vs-2022. The code that handles the .sln file is very old and brittle, so they may not be inclined to change this unless it’s blocking something.

Read more comments on GitHub >

github_iconTop Results From Across the Web

About the leading newline in Visual Studio solution files
All of my solutions have a blank line as the first line of the file and they all open fine when I double...
Read more >
Empty lines in hidden part
But here is a way to allow blank lines in your macro input and omit the solution while keeping it's space as a...
Read more >
How to remove empty lines from beginning and end of file?
Try this,. To remove blank lines from the begin of a file: sed -i '/./,$!d' filename. To remove blank lines from the end...
Read more >
Why does ReSharper remove the blank line from the end of ...
When I run a full Code Cleanup, ReSharper removes the blank line from the end of the file that Visual Studio inserts there...
Read more >
On save new line added to end of file. How stop this?
Hi there, Some tip first: If you do not know if some configuration option is available and where it located in Settings window,...
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