ByteDev.DotNet 3.1.0

Set of classes for reading .NET solution and project files.

Install-Package ByteDev.DotNet -Version 3.1.0
dotnet add package ByteDev.DotNet --version 3.1.0
<PackageReference Include="ByteDev.DotNet" Version="3.1.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add ByteDev.DotNet --version 3.1.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

ByteDev.DotNet

Set of classes for reading .NET solution and project files.

Installation

ByteDev.DotNet has been written as a .NET Standard 2.0 library, so you can consume it from a .NET Core or .NET Framework 4.6.1 (or greater) application.

ByteDev.DotNet is hosted as a package on nuget.org. To install from the Package Manager Console in Visual Studio run:

Install-Package ByteDev.DotNet

Further details can be found on the nuget page.

Code

The repo can be cloned from git bash:

git clone https://github.com/ByteDev/ByteDev.DotNet

Usage

There are two main classes in the project: DotNetSolution and DotNetProject.

DotNetSolution

Load a .NET solution file:

var dotNetSolution = DotNetSolution.Load(@"C:\mysolution.sln");

Console.WriteLine(dotNetSolution.VisualStudioVersion);
Console.WriteLine(dotNetSolution.Projects.Count);

DotNetProject

Load a .NET project file:

var dotNetProject = DotNetProject.Load(@"C:\myproj.csproj");

Console.WriteLine(dotNetProject.ProjectTargets.Single());
Console.WriteLine(dotNetProject.Format);

ByteDev.DotNet

Set of classes for reading .NET solution and project files.

Installation

ByteDev.DotNet has been written as a .NET Standard 2.0 library, so you can consume it from a .NET Core or .NET Framework 4.6.1 (or greater) application.

ByteDev.DotNet is hosted as a package on nuget.org. To install from the Package Manager Console in Visual Studio run:

Install-Package ByteDev.DotNet

Further details can be found on the nuget page.

Code

The repo can be cloned from git bash:

git clone https://github.com/ByteDev/ByteDev.DotNet

Usage

There are two main classes in the project: DotNetSolution and DotNetProject.

DotNetSolution

Load a .NET solution file:

var dotNetSolution = DotNetSolution.Load(@"C:\mysolution.sln");

Console.WriteLine(dotNetSolution.VisualStudioVersion);
Console.WriteLine(dotNetSolution.Projects.Count);

DotNetProject

Load a .NET project file:

var dotNetProject = DotNetProject.Load(@"C:\myproj.csproj");

Console.WriteLine(dotNetProject.ProjectTargets.Single());
Console.WriteLine(dotNetProject.Format);

  • .NETStandard 2.0

    • No dependencies.

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
3.1.0 132 2/27/2019
3.0.0 97 2/26/2019
2.0.0 93 2/22/2019
1.3.0 152 1/18/2019
1.2.0 157 10/1/2018
1.1.1 152 9/12/2018
1.1.0 131 9/11/2018
1.0.0 170 9/6/2018