Skip to content

Latest commit

 

History

History
60 lines (37 loc) · 2.8 KB

README.md

File metadata and controls

60 lines (37 loc) · 2.8 KB

🛠️ SlnParser

GitHub license Uses SemVer 2.0.0 Latest Release Downloads
GitHub stars GitHub forks GitHub watchers

🛠️ .NET: Easy (to use) Parser for your .NET Solution (.sln) Files. This project targets netstandard2.0 so it can basically be used anywhere you want. I've not yet run any performance tests.

💻 Usage

Parsing

var parser = new SolutionParser();
var parsedSolution = parser.Parse("path/to/your/solution.sln");

Accessing the projects

// gives you a flat list of all the Projects/Solution-Folders in your Solution
var flat = parsedSolution.AllProjects;

// gives you a structured (Solution-Folders containing projects) of all the Projects/Solution-Folders in your solution
var structured = parsedSolution.Projects;

// this'll give you all the projects that are not a Solution-Folder
var noFolders = parsedSolution
  .AllProjects
  .OfType<SolutionProject>();

// this'll give you all the projects of the desired type (C# class libs in this case)
var csharpProjects = parsedSolution
  .AllProjects
  .Where(project => project.Type == ProjectType.CSharpClassLibrary);

⌨️ Developing

To develop and work with SlnParser you just need to clone this Repo somewhere on your PC and then open the Solution or the complete Source-Folder (under src) with your favorite IDE. No additional tools required.

Before you can start, you should restore all NuGet-Packages using dotnet restore if that's not done for you by your IDE.

👋 Want to Contribute?

Cool! We're always welcoming anyone that wants to contribute to this project! Take a look at the Contributing Guidelines, which helps you get started. You can also look at the Open Issues for getting more info about current or upcoming tasks.

💬 Want to discuss?

If you have any questions, doubts, ideas, problems or you simply want to present your opinions and views, feel free to hop into Discussions and write about what you care about. We'd love to hear from you!