ProjectParserExtensions.

HasDotNetCliToolReference(CustomProjectParserResult, string) Method

Summary

Checks for a DotNet Cli Tool Reference by name

Syntax

public static bool HasDotNetCliToolReference(this CustomProjectParserResult projectParserResult, string cliToolReferenceName)

Examples

Checks for a dotnet-xunit cli tool reference
CustomParseProjectResult project 
        = ParseProject(new FilePath("test.csproj"), configuration: "Release", platform: "x86");
bool hasConfig = project.HasDotNetCliToolReference("dotnet-xunit");

Parameters

Name Type Description
projectParserResult CustomProjectParserResult the parsed project
cliToolReferenceName string the cli tool reference name

Return Value

Type Description
bool True if reference exists in project, otherwise false