ProjectParserExtensions.

GetReference(CustomProjectParserResult, string) Method

Summary

Gets a project assembly reference by name or alias

Syntax

public static ProjectAssemblyReference GetReference(this CustomProjectParserResult projectParserResult, string referenceAssemblyName)

Examples

Get the System.Configuration assembly reference
CustomParseProjectResult project 
        = ParseProject(new FilePath("test.csproj"), configuration: "Release", platform: "x86");
ProjectAssemblyReference ref = project.GetReference("System.Configuration");
string HintPath = ref.HintPath;

Parameters

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

Return Value

Type Description
ProjectAssemblyReference the project assembly reference if found