Add the ability to write comments in a solution (.sln) file
See original GitHub issueI think it would be beneficial to allow for comments in a solution file, since not all solution files are generated/managed by an IDE, but directly edited in a text editor. There are articles/comments online that say the #
character is used for comments, but that’s not quite how the solution file is processed by msbuild:
EDIT: Removed ambiguous references and other formatting.
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (2 by maintainers)
Top Results From Across the Web
Add the ability to write comments in a solution (.sln) file
I think it would be beneficial to allow for comments in a solution file, since not all solution files are generated/managed by an...
Read more >Comment lines in .sln file
1 Answer. I don't think there is an official definition of comments in the . sln file. It depends on the parser.
Read more >Project Solution (.sln) file - Visual Studio (Windows)
Learn about the .sln file, which is one of the files that maintains state information for a project in Visual Studio.
Read more >noob question: sln files : r/csharp
Why is it that in the folder containing my SLN file, I can see the same files that I would see when opening...
Read more >Cannot debug net6.0-macos Apps - Developer Community
This is a regression. I can no longer debug net6.0-macos apps. It also fails for net6.0-maccatalyst apps. When I hit debug, the following ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Another use case for this is to allow excluding parts of a .sln file in a dotnet new template. For example:
This is part of a solution file that’s packaged up into a template and processed when the package is newed up. The comments are processing instructions for dotnet new.
To verify the solution before packaging I tried to build it, but after adding these comments the solution no longer builds from the CLI (.NET Core 3.0 preview 6). I can load it in Visual Studio 2019 without problems though.
My main use case for this is to separate the
ProjectConfigurationPlatforms
in the global sections, so it’s easier to see what is what when you have numerous projects in a solution, so top-level comments don’t really help in that situation.EDIT: I don’t know if VS’s parser handles comments, but i agree that the implementations should parse two identical files the same, comments or not.