protected override ProjectFileReference CreateProjectFileReference(MSB.Execution.ProjectItemInstance reference) { var filePath = reference.EvaluatedInclude; var aliases = GetAliases(reference); return(new ProjectFileReference(filePath, aliases)); }
/// <summary> /// Constructor for IVSOutput2 implementation /// </summary> /// <param name="projectManager">Project that produce this output</param> /// <param name="outputAssembly">MSBuild generated item corresponding to the output assembly (by default, these would be of type MainAssembly</param> public Output(ProjectNode projectManager, Microsoft.Build.Execution.ProjectItemInstance outputAssembly) { if (projectManager == null) throw new ArgumentNullException("projectManager"); if (outputAssembly == null) throw new ArgumentNullException("outputAssembly"); project = projectManager; output = outputAssembly; }
/// <summary> /// Constructor for IVSOutput2 implementation /// </summary> /// <param name="projectManager">Project that produce this output</param> /// <param name="outputAssembly">MSBuild generated item corresponding to the output assembly (by default, these would be of type MainAssembly</param> public Output(ProjectNode projectManager, Microsoft.Build.Execution.ProjectItemInstance outputAssembly) { if (projectManager == null) { throw new ArgumentNullException("projectManager"); } if (outputAssembly == null) { throw new ArgumentNullException("outputAssembly"); } project = projectManager; output = outputAssembly; }
/// <summary> /// Create a <see cref="ProjectFileReference"/> from a ProjectReference node in the MSBuild file. /// </summary> private static ProjectFileReference CreateProjectFileReference( MSB.Execution.ProjectItemInstance reference ) => new(reference.EvaluatedInclude, reference.GetAliases());
public static string GetEvaluatedInclude(Microsoft.Build.Execution.ProjectItemInstance item) { return(item.EvaluatedInclude); }
public static string GetMetadataValue(Microsoft.Build.Execution.ProjectItemInstance item, string name) { return(item.GetMetadataValue(name)); }
protected string GetReferenceFilePath(MSB.Execution.ProjectItemInstance projectItem) { return(GetAbsolutePath(projectItem.EvaluatedInclude)); }
/// <summary> /// Create a <see cref="ProjectFileReference"/> from a ProjectReference node in the MSBuild file. /// </summary> protected virtual ProjectFileReference CreateProjectFileReference(MSB.Execution.ProjectItemInstance reference) { return(new ProjectFileReference( path: reference.EvaluatedInclude, aliases: ImmutableArray <string> .Empty)); }