RoozSoft.SolutionDependencyAnalyzer-nodep 1.1.21

dotnet add package RoozSoft.SolutionDependencyAnalyzer-nodep --version 1.1.21                
NuGet\Install-Package RoozSoft.SolutionDependencyAnalyzer-nodep -Version 1.1.21                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="RoozSoft.SolutionDependencyAnalyzer-nodep" Version="1.1.21" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add RoozSoft.SolutionDependencyAnalyzer-nodep --version 1.1.21                
#r "nuget: RoozSoft.SolutionDependencyAnalyzer-nodep, 1.1.21"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install RoozSoft.SolutionDependencyAnalyzer-nodep as a Cake Addin
#addin nuget:?package=RoozSoft.SolutionDependencyAnalyzer-nodep&version=1.1.21

// Install RoozSoft.SolutionDependencyAnalyzer-nodep as a Cake Tool
#tool nuget:?package=RoozSoft.SolutionDependencyAnalyzer-nodep&version=1.1.21                

SolutionDependencyAnalyzer

SolutionDependencyAnalyzer is a .NET 8.0/.NET 6.0 library designed for monorepo environments or any large repository setup where analyzing solution dependencies efficiently is essential. This tool can parse Visual Studio solution (.sln) files, identify all dependencies across projects within the solution, and output a complete list of required folders. This list can be used to enable selective checkouts, optimize sparse checkouts, or manage build dependencies.

Features

  • Visual Studio Solution Parsing: Automatically processes a .sln file, traversing all associated projects to map out dependencies.
  • Folder-Level Dependency Analysis: Returns a list of all folders that a solution requires, streamlining sparse checkouts and focused dependency management.
  • Multiple Git Access Options:
    • External Git Executable: Uses your Git setup for dependency analysis.
    • File Access Mode: Directly accesses files for simpler, lightweight dependency management.
    • Internal LibGit: Uses a built-in library for Git interactions, ideal for environments without a Git executable.

Installation

Install SolutionDependencyAnalyzer from NuGet.

dotnet add package RoozSoft.SolutionDependencyAnalyzer

Usage

This library can be used either as part of a larger GitHub Action workflow (see SolutionChangeDetector-Action) or as a standalone library in any .NET project.

Example: Analyzing Solution Dependencies

using RoozSoft.SolutionDependencyAnalyzer;

// Initialize analyzer for your .sln file
var analyzer = new SolutionAnalyzer("path/to/your/solution.sln");
var repo =  new ExternalGitRepository("path\\to\\repository"),
var repo =  new InternalGitRepository("path/to/repository", "path/to/id_path_filename"),
var repo =  new FileSystemRepository("path/to/repository"),

var depFinder = new SolutionDependencyAnalyzer(repo);
var result = depFinder.GetDependencyList("relative/path/to/solution/file");

Repository Modes of operation

The library provides three options for accessing files and dependencies, suited to different environments:

  • ExternalGitRepository: This relies on running git as external process and parsing its results. It requires git accessible in your path and ensures maximum compatibility.
  • FileAccess: This just uses OS file access, which makes sense if you have everything checked out or you dont want this specific feature of library.
  • InternalGitRepository: This uses our bundled library of LibGit to discover files and read contents of files.

Use Cases

  • Sparse Checkouts: Identify only the folders necessary for your solution, making monorepo checkouts faster and more efficient.
  • Build Dependency Verification: Verify which files have changed to determine if a rebuild of the solution is required.
  • Optimized Solution Builds: Quickly retrieve top-level dependencies, allowing faster dependency analysis and solution builds.

Future Enhancements

License

This project is licensed under the MIT License.

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.1.21 102 11/7/2024
1.1.19 131 11/6/2024
1.1.18 93 11/5/2024