ByteDev.DotNet 1.1.0

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

There is a newer version of this package available.
See the version list below for details.
Install-Package ByteDev.DotNet -Version 1.1.0
dotnet add package ByteDev.DotNet --version 1.1.0
<PackageReference Include="ByteDev.DotNet" Version="1.1.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add ByteDev.DotNet --version 1.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

Read in a .NET solution file and pass it into a DotNetSolution object:

string slnText = File.ReadAllText(@"C:\mysolution.sln");

var dotNetSolution = new DotNetSolution(slnText);

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

DotNetProject

Read in a .NET project file and pass it into a DotNetProject object:

string projXml = XDocument.Load(@"C:\myproj.csproj");

var dotNetProject = new DotNetProject(projXml);

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

Read in a .NET solution file and pass it into a DotNetSolution object:

string slnText = File.ReadAllText(@"C:\mysolution.sln");

var dotNetSolution = new DotNetSolution(slnText);

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

DotNetProject

Read in a .NET project file and pass it into a DotNetProject object:

string projXml = XDocument.Load(@"C:\myproj.csproj");

var dotNetProject = new DotNetProject(projXml);

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
5.0.4 40 4/30/2020
5.0.3 83 3/19/2020
5.0.2 65 3/2/2020
5.0.1 181 10/8/2019
4.1.0 115 9/7/2019
4.0.0 100 8/22/2019
3.2.0 113 8/10/2019
3.1.0 311 2/27/2019
3.0.0 150 2/26/2019
2.0.0 160 2/22/2019
1.3.0 223 1/18/2019
1.2.0 220 10/1/2018
1.1.1 221 9/12/2018
1.1.0 195 9/11/2018
1.0.0 244 9/6/2018
Show less