ProjectParserExtensions.

HasReference(CustomProjectParserResult, string) Method

Summary

Checks for a project assembly reference by name or alias

Syntax

public static bool HasReference(this CustomProjectParserResult projectParserResult, string referenceAssemblyName)

Examples

Checks for a System.Configuration assembly reference
CustomParseProjectResult project 
        = ParseProject(new FilePath("test.csproj"), configuration: "Release", platform: "x86");
bool hasConfig = project.HasReference("System.Configuration");

Parameters

Name Type Description
projectParserResult CustomProjectParserResult the parsed project
referenceAssemblyName string the assembly name

Return Value

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