Crates.io | dotnet-lens |
lib.rs | dotnet-lens |
version | 0.1.0 |
source | src |
created_at | 2024-08-04 22:17:07.802011 |
updated_at | 2024-08-04 22:17:07.802011 |
description | dotnet-lens is a library for listing dependencies between .NET projects and packages. |
homepage | |
repository | https://github.com/filipesilva-l/dotnet-lens |
max_upload_size | |
id | 1325328 |
size | 31,346 |
dotnet-lens is a library for listing dependencies between .NET projects and packages.
This library provides functionality to parse .NET project files (.csproj
, .fsproj
, .vbproj
)
and extract information about project dependencies, including project references and package references.
The main components of this library include:
Project
: A struct representing a .NET project, including its language, name, path, target framework,
project references, and package references.ProjectLanguage
: An enum representing the language of the project based on the file extension.ProjectReference
: A struct representing a reference to another project.PackageReference
: A struct representing a reference to a NuGet package.parser
: A module for parsing .NET project files and extracting dependency information.search
: A module for searching .NET project files in a directory.serde
: Adds support for serde serialization and deserialization for the Project struct and
adjacent typesHere is a brief example demonstrating how to use the Project
struct and its methods:
use dotnet_lens::{Project, search};
let projects_paths = search::search_projects(&"path/to/repository")?;
for path in projects_paths {
let project = Project::new(path)?;
for package_reference in project.package_references() {
println!("{}: {}", package_reference.name(), package_reference.version());
}
}