protected override ProjectFileReference CreateProjectFileReference(MSB.Execution.ProjectItemInstance reference)
            {
                var filePath = reference.EvaluatedInclude;
                var aliases  = GetAliases(reference);

                return(new ProjectFileReference(filePath, aliases));
            }
Пример #2
0
        /// <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;
        }
Пример #3
0
        /// <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;
        }
Пример #4
0
 /// <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());
Пример #5
0
 public static string GetEvaluatedInclude(Microsoft.Build.Execution.ProjectItemInstance item)
 {
     return(item.EvaluatedInclude);
 }
Пример #6
0
 public static string GetMetadataValue(Microsoft.Build.Execution.ProjectItemInstance item, string name)
 {
     return(item.GetMetadataValue(name));
 }
Пример #7
0
 protected string GetReferenceFilePath(MSB.Execution.ProjectItemInstance projectItem)
 {
     return(GetAbsolutePath(projectItem.EvaluatedInclude));
 }
Пример #8
0
 /// <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));
 }