Skip to content

Get info from .net sdk based msbuild projects ( https://github.com/dotnet/sdk ) or old sdk based projects (verbose fsproj)

License

Notifications You must be signed in to change notification settings

sacereda/dotnet-proj-info

 
 

Repository files navigation

Build status Build Status

dotnet-proj-info

  • as library: Dotnet.ProjInfo NuGet
  • dotnet cli tool: dotnet proj-info NuGet

Features

  • get properties
  • get project to project references
  • get fsc command line arguments
  • list installed .NET Framework versions
  • get references path of .NET asseblies like System, System.Data

Support both project sdk:

  • dotnet/sdk style projects (slim proj, usually .net core)
  • old sdk projects (verbose proj, usually .NET)

Works on mono and windows, and allow to specify the dotnet or msbuild to use

as Library

Used by:

as .NET Cli tool

Add

<DotNetCliToolReference Include="dotnet-proj-info" Version="*" />

restore, and it use as dotnet proj-info

Support args of .NET cli (dotnet), like:

  • -c or --configuration
  • -f or --framework
  • -r or --runtime

See examples directory for a quick tutorial

USAGE: proj-info [--help] [--fsc-args] [--project-refs] [--get-property [<string>...]]
                 [--net-fw-references-path [<string>...]] [--installed-net-frameworks] [--framework <string>]
                 [--runtime <string>] [--configuration <string>] [--verbose] [--msbuild <string>]
                 [--dotnetcli <string>] [--msbuild-host <auto|msbuild|dotnetmsbuild>] [<string>]

PROJECT:

    <string>              the MSBuild project file

OPTIONS:

    --fsc-args            get fsc arguments
    --project-refs        get project references
    --get-property, -gp [<string>...]
                          msbuild property to get (allow multiple)
    --net-fw-references-path [<string>...]
                          list the .NET Framework references
    --installed-net-frameworks
                          list of the installed .NET Frameworks
    --framework, -f <string>
                          target framework, the TargetFramework msbuild property
    --runtime, -r <string>
                          target runtime, the RuntimeIdentifier msbuild property
    --configuration, -c <string>
                          configuration to use (like Debug), the Configuration msbuild property
    --verbose, -v         verbose log
    --msbuild <string>    MSBuild path (default "msbuild")
    --dotnetcli <string>  Dotnet CLI path (default "dotnet")
    --msbuild-host <auto|msbuild|dotnetmsbuild>
                          the Msbuild host, if auto then oldsdk=MSBuild dotnetSdk=DotnetCLI
    --help                display this list of options.

Build

Clone repo.

Run:

dotnet build

To run tests:

dotnet test -v n

To create packages:

dotnet pack

will create packages in artifacts\nupkgs

pass /p:Version=1.2.3 to create a package with version 1.2.3

About

Get info from .net sdk based msbuild projects ( https://github.com/dotnet/sdk ) or old sdk based projects (verbose fsproj)

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • F# 100.0%