Skip to content
forked from wgnf/SlnParser

🛠️ Easy (to use) Parser for your .NET Solution (.sln) Files.

License

Notifications You must be signed in to change notification settings

icnocop/SlnParser

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🛠️ 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!

About

🛠️ Easy (to use) Parser for your .NET Solution (.sln) Files.

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 96.0%
  • PowerShell 4.0%