60 instantiations of ProjectInstance
Microsoft.Build (15)
BackEnd\BuildManager\BuildManager.cs (1)
1908return new ProjectInstance(
BackEnd\Shared\BuildRequestConfiguration.cs (1)
479return new ProjectInstance(
Construction\Solution\SolutionProjectGenerator.cs (2)
998var traversalInstance = new ProjectInstance( 1214ProjectInstance metaprojectInstance = new ProjectInstance(EscapingUtilities.UnescapeAll(GetMetaprojectName(project)), traversalProject, GetMetaprojectGlobalProperties(traversalProject));
Definition\Project.cs (1)
3707return new ProjectInstance(_data, DirectoryPath, FullPath, ProjectCollection.HostServices, ProjectCollection.EnvironmentProperties, settings);
Graph\ProjectGraph.cs (1)
855return new ProjectInstance(
Instance\ProjectInstance.cs (9)
192/// of another ProjectInstance. <seealso cref="ProjectInstance(ProjectInstance, bool, RequestedProjectState)"/> 861return new ProjectInstance( 880return new ProjectInstance( 900return new ProjectInstance(project, fastItemLookupNeeded); 1271/// of another ProjectInstance. <seealso cref="ProjectInstance(ProjectInstance, bool, RequestedProjectState)"/> 2065return new ProjectInstance(this, true, filter); 2081return new ProjectInstance(this, isImmutable); 2663return new ProjectInstance(translator); 3000ProjectInstance instance = new(projectRootElement, globalProperties, toolsVersion, buildParameters, loggingService, projectBuildEventContext, sdkResolverService, submissionId);
Microsoft.Build.Engine.OM.UnitTests (10)
Definition\Project_Tests.cs (4)
681ProjectInstance projectInstance = new ProjectInstance(xml); 719ProjectInstance projectInstance = new ProjectInstance(xml); 755ProjectInstance projectInstance = new ProjectInstance(xml); 793ProjectInstance projectInstance = new ProjectInstance(xml);
Instance\ProjectInstance_Tests.cs (5)
346ProjectInstance instance = new ProjectInstance(ProjectRootElement.Create()); 358ProjectInstance instance = new ProjectInstance(ProjectRootElement.Create()); 370ProjectInstance instance = new ProjectInstance(ProjectRootElement.Create()); 383ProjectInstance instance = new ProjectInstance(xml); 470var projBInstance = new ProjectInstance(projBEval, ProjectInstanceSettings.ImmutableWithFastItemLookup);
Instance\ProjectItemInstance_Tests.cs (1)
1172ProjectInstance project = new ProjectInstance(xml);
Microsoft.Build.Engine.UnitTests (35)
BackEnd\BuildManager_Tests.cs (1)
3660return new ProjectInstance(rootProject);
BackEnd\IntrinsicTask_Tests.cs (1)
3542ProjectInstance instance = new ProjectInstance(xml);
BackEnd\ResultsCache_Tests.cs (1)
314resultForRequestWithSubsetFlag1.ProjectStateAfterBuild = new ProjectInstance(ProjectRootElement.Create(xmlReader)).FilteredCopy(requestedProjectState1);
BackEnd\TaskHost_Tests.cs (1)
78configuration.Project = new ProjectInstance(ProjectRootElement.Create());
BackEnd\TaskHostFactory_Tests.cs (2)
45ProjectInstance projectInstance = new(project.Path); 173ProjectInstance projectInstance = new(project.ProjectFile);
Definition\ToolsVersion_Tests.cs (2)
793ProjectInstance pi = new ProjectInstance(projectFromString.Project.Xml, null /* no global properties */, null /* don't explicitly set the toolsversion */, p); 903ProjectInstance pi = new ProjectInstance(projectFromString.Project.Xml, null /* no global properties */, null /* don't explicitly set the toolsversion */, p);
Evaluation\Evaluator_Tests.cs (1)
449ProjectInstance project = new ProjectInstance(subdirProjPath);
Evaluation\Expander_Tests.cs (9)
4798ProjectInstance projectInstance = new ProjectInstance(projectFile.Path); 4842ProjectInstance projectInstance = new ProjectInstance(projectFile.Path); 4871ProjectInstance projectInstance = new ProjectInstance(projectFile.Path); 4918ProjectInstance projectInstance = new ProjectInstance(projectFile.Path); 4959ProjectInstance projectInstance = new ProjectInstance(projectFile.Path); 4993ProjectInstance projectInstance = new ProjectInstance(projectFile.Path); 5039new ProjectInstance(projectFile.Path); 5080new ProjectInstance(projectFile.Path); 5112new ProjectInstance(projectFile.Path);
ExpressionTree_Tests.cs (6)
183ProjectInstance parentProject = new ProjectInstance(ProjectRootElement.Create()); 213ProjectInstance parentProject = new ProjectInstance(ProjectRootElement.Create()); 248ProjectInstance parentProject = new ProjectInstance(ProjectRootElement.Create()); 280ProjectInstance parentProject = new ProjectInstance(ProjectRootElement.Create()); 297ProjectInstance parentProject = new ProjectInstance(ProjectRootElement.Create()); 326ProjectInstance parentProject = new ProjectInstance(ProjectRootElement.Create());
ExpressionTreeExpression_Tests.cs (1)
374ProjectInstance parentProject = new ProjectInstance(xml);
Instance\ProjectInstance_Internal_Tests.cs (10)
289var projectInstance = new ProjectInstance( 426ProjectInstance p = new ProjectInstance(xml, globalProperties, ObjectModelHelpers.MSBuildDefaultToolsVersion, "ABCDEF", collection); 692var original = new ProjectInstance(rootElement); 709(f, xml, c) => new ProjectInstance(f, null, null, c) 727(f, xml, c) => new ProjectInstance(f, null, null, c).DeepCopy() 733(f, xml, c) => new ProjectInstance(xml, null, null, c) 747var pi = new ProjectInstance(f, null, null, c); 785ProjectInstance projectInstance = new ProjectInstance(rootElement); 821ProjectInstance projectInstance = new ProjectInstance(rootElement); 866? new ProjectInstance(rootElement, globalProperties: null, toolsVersion: null, buildParameters, projectCollection.LoggingService, buildEventContext, sdkResolverService: null, 0)
673 references to ProjectInstance
Microsoft.Build (174)
BackEnd\BuildManager\BuildManager.cs (6)
189private readonly Dictionary<ProjectInstance, string> _unnamedProjectInstanceToNames; 298_unnamedProjectInstanceToNames = new Dictionary<ProjectInstance, string>(); 849public ProjectInstance GetProjectInstanceForBuild(Project project) 1245ProjectInstance? projectInstance = submission.BuildRequestData.ProjectInstance; 1476var instances = ProjectInstance.LoadSolutionForBuild( 1521ProjectInstance newInstance = project.CreateProjectInstance();
BackEnd\BuildManager\BuildRequestData.cs (6)
28public BuildRequestData(ProjectInstance projectInstance, string[] targetsToBuild) 39public BuildRequestData(ProjectInstance projectInstance, string[] targetsToBuild, HostServices hostServices) 51public BuildRequestData(ProjectInstance projectInstance, string[] targetsToBuild, HostServices? hostServices, BuildRequestDataFlags flags) 64public BuildRequestData(ProjectInstance projectInstance, string[] targetsToBuild, HostServices? hostServices, BuildRequestDataFlags flags, IEnumerable<string>? propertiesToTransfer) 93public BuildRequestData(ProjectInstance projectInstance, string[] targetsToBuild, HostServices? hostServices, BuildRequestDataFlags flags, IEnumerable<string>? propertiesToTransfer, RequestedProjectState requestedProjectState) 173public ProjectInstance? ProjectInstance
BackEnd\Components\ProjectCache\ProjectCacheService.cs (1)
171private IEnumerable<ProjectCacheDescriptor> GetProjectCacheDescriptors(ProjectInstance projectInstance)
BackEnd\Components\RequestBuilder\IntrinsicTask.cs (3)
26protected IntrinsicTask(TargetLoggingContext loggingContext, ProjectInstance projectInstance, bool logTaskInputs) 45internal ProjectInstance Project 68internal static IntrinsicTask InstantiateTask(ProjectTargetInstanceChild taskInstance, TargetLoggingContext loggingContext, ProjectInstance projectInstance, bool logTaskInputs)
BackEnd\Components\RequestBuilder\IntrinsicTasks\ItemGroupIntrinsicTask.cs (1)
42public ItemGroupIntrinsicTask(ProjectItemGroupTaskInstance taskInstance, TargetLoggingContext loggingContext, ProjectInstance projectInstance, bool logTaskInputs)
BackEnd\Components\RequestBuilder\IntrinsicTasks\PropertyGroupIntrinsicTask.cs (1)
35public PropertyGroupIntrinsicTask(ProjectPropertyGroupTaskInstance taskInstance, TargetLoggingContext loggingContext, ProjectInstance projectInstance, bool logTaskInputs)
BackEnd\Components\RequestBuilder\RequestBuilder.cs (2)
1386ProjectInstance project = _requestEntry?.RequestConfiguration?.Project; 1426ProjectInstance project = _requestEntry?.RequestConfiguration?.Project;
BackEnd\Components\RequestBuilder\TargetBuilder.cs (1)
86private ProjectInstance _projectInstance;
BackEnd\Components\RequestBuilder\TargetUpToDateChecker.cs (2)
55internal TargetUpToDateChecker(ProjectInstance project, ProjectTargetInstance targetToAnalyze, ILoggingService loggingServices, BuildEventContext buildEventContext) 1237private ProjectInstance _project;
BackEnd\Shared\BuildRequestConfiguration.cs (8)
87private ProjectInstance _project; 92private ProjectInstance _transferredState; 210internal BuildRequestConfiguration(int configId, ProjectInstance instance) 370public ProjectInstance Project 405private void SetProjectBasedState(ProjectInstance project) 499private void InitializeProject(BuildParameters buildParameters, Func<ProjectInstance> loadProjectFromFile) 928translator.Translate(ref _transferredState, ProjectInstance.FactoryForDeserialization); 969internal void ApplyTransferredState(ProjectInstance instance)
BackEnd\Shared\BuildResult.cs (11)
128/// <see cref="ProjectInstance"/> state after the build. This is only provided if <see cref="BuildRequest.BuildRequestDataFlags"/> 132/// be used to retrieve <see cref="ProjectInstance.Properties"/>, <see cref="ProjectInstance.GlobalProperties"/> and 133/// <see cref="ProjectInstance.Items"/> from it. No other operation is guaranteed to be supported. 135private ProjectInstance? _projectStateAfterBuild; 407/// <see cref="ProjectInstance"/> state after the build. In general, it may be a non buildable-dummy object, and should only 408/// be used to retrieve <see cref="ProjectInstance.Properties"/>, <see cref="ProjectInstance.GlobalProperties"/> and 409/// <see cref="ProjectInstance.Items"/> from it. Any other operation is not guaranteed to be supported. 411public ProjectInstance? ProjectStateAfterBuild 623translator.Translate(ref _projectStateAfterBuild, ProjectInstance.FactoryForDeserialization);
BackEnd\TaskExecutionHost\TaskExecutionHost.cs (3)
86private ProjectInstance _projectInstance; 203public ProjectInstance ProjectInstance => _projectInstance; 245public void InitializeForTask(IBuildEngine2 buildEngine, TargetLoggingContext loggingContext, ProjectInstance projectInstance, string taskName, ElementLocation taskLocation, ITaskHost taskHost, bool continueOnError,
Construction\Solution\SolutionProjectGenerator.cs (42)
209internal static ProjectInstance[] Generate( 692private ProjectInstance[] Generate() 719private ProjectInstance[] CreateSolutionProject(string wrapperProjectToolsVersion, bool explicitToolsVersionSpecified) 747var projectInstances = new List<ProjectInstance>(projectsInOrder.Count + 1); 750ProjectInstance traversalInstance = CreateTraversalInstance(wrapperProjectToolsVersion, explicitToolsVersionSpecified, projectsInOrder); 779foreach (ProjectInstance instance in projectInstances) 790private void EvaluateAndAddProjects(List<ProjectInSolution> projectsInOrder, List<ProjectInstance> projectInstances, ProjectInstance traversalInstance, string selectedSolutionConfiguration) 825ProjectInstance metaproject = CreateMetaproject(traversalInstance, project, projectConfiguration); 840private void AddStandardTraversalTargets(ProjectInstance traversalInstance, List<ProjectInSolution> projectsInOrder) 855private ProjectInstance CreateTraversalInstance(string wrapperProjectToolsVersion, bool explicitToolsVersionSpecified, List<ProjectInSolution> projectsInOrder) 998var traversalInstance = new ProjectInstance( 1055private void AddProjectReference(ProjectInstance traversalProject, ProjectInstance projectInstance, ProjectInSolution projectToAdd, ProjectConfigurationInSolution projectConfiguration, bool direct) 1088private static string GetToolsVersionMetadataForDirectMSBuildTask(ProjectInstance traversalProject) 1105private static string GetPropertiesMetadataForProjectReference(ProjectInstance traversalProject, string configurationAndPlatformProperties) 1144private bool CanBuildDirectly(ProjectInstance traversalProject, ProjectInSolution projectToAdd, ProjectConfigurationInSolution projectConfiguration) 1211private ProjectInstance CreateMetaproject(ProjectInstance traversalProject, ProjectInSolution project, ProjectConfigurationInSolution projectConfiguration) 1214ProjectInstance metaprojectInstance = new ProjectInstance(EscapingUtilities.UnescapeAll(GetMetaprojectName(project)), traversalProject, GetMetaprojectGlobalProperties(traversalProject)); 1306private void AddMetaprojectReferenceItems(ProjectInstance traversalProject, ProjectInstance metaprojectInstance, ProjectInSolution project) 1334private static void AddMetaprojectTargetForManagedProject(ProjectInstance traversalProject, ProjectInstance metaprojectInstance, ProjectInSolution project, ProjectConfigurationInSolution projectConfiguration, string targetName, string outputItem) 1353private static void AddProjectBuildTask(ProjectInstance traversalProject, ProjectConfigurationInSolution projectConfiguration, ProjectTargetInstance target, string targetToBuild, string sourceItems, string condition, string outputItem) 1409private void AddMetaprojectTargetForWebProject(ProjectInstance traversalProject, ProjectInstance metaprojectInstance, ProjectInSolution project, string targetName) 1601ProjectInstance traversalProject, 1670ProjectInstance traversalProject, 1671ProjectInstance metaprojectInstance, 1739outDirValue = ProjectInstance.GetPropertyValueEscaped(outdir); 1801private static void AddTargetForGetFrameworkPathAndRedistList(ProjectInstance metaprojectInstance) 1852private void AddMetaprojectTargetForUnknownProjectType(ProjectInstance traversalProject, ProjectInstance metaprojectInstance, ProjectInSolution project, string targetName, string unknownProjectTypeErrorMessage) 1922private void AddValidateProjectsTarget(ProjectInstance traversalProject, List<ProjectInSolution> projects) 1964private static void AddTraversalReferencesTarget(ProjectInstance traversalProject, string targetName, string outputItem, bool batchBuildTargets) 2016private void AddTraversalTargetForProject(ProjectInstance traversalProject, ProjectInSolution project, ProjectConfigurationInSolution projectConfiguration, string targetToBuild, string outputItem, bool canBuildDirectly) 2061private IDictionary<string, string> GetMetaprojectGlobalProperties(ProjectInstance traversalProject) 2334private void AddInitialTargets(ProjectInstance traversalProject, List<ProjectInSolution> projects) 2345private void AddValidateSolutionConfigurationTarget(ProjectInstance traversalProject) 2380private static void AddValidateToolsVersionsTarget(ProjectInstance traversalProject) 2393private static void AddGetSolutionConfigurationContentsTarget(ProjectInstance traversalProject)
Definition\Project.cs (6)
1361public ProjectInstance CreateProjectInstance() 1375public ProjectInstance CreateProjectInstance(ProjectInstanceSettings settings) 1386public ProjectInstance CreateProjectInstance(ProjectInstanceSettings settings, EvaluationContext evaluationContext) 3273public override ProjectInstance CreateProjectInstance(ProjectInstanceSettings settings, EvaluationContext evaluationContext) 3341ProjectInstance instance = CreateProjectInstance(LoggingService, ProjectInstanceSettings.None, evaluationContext); 3700private ProjectInstance CreateProjectInstance(
Graph\GraphBuilder.cs (4)
53private ConcurrentDictionary<ConfigurationMetadata, Lazy<ProjectInstance>> _platformNegotiationInstancesCache = new(); 530var projectInstance = _projectInstanceFactory( 595private ProjectInstance GetInstanceForPlatformNegotiationWithCaching( 602new Lazy<ProjectInstance>(() => _projectInstanceFactory(projectPath, globalProperties, projectCollection))).Value;
Graph\ProjectGraph.cs (9)
33/// A callback used for constructing a <see cref="ProjectInstance" /> for a specific 39/// <returns>A <see cref="ProjectInstance" /> instance. This value must not be null.</returns> 55public delegate ProjectInstance ProjectInstanceFactoryFunc( 177/// A delegate used for constructing a <see cref="ProjectInstance" />, called for each 318/// A delegate used for constructing a <see cref="ProjectInstance" />, called for each 355/// A delegate used for constructing a <see cref="ProjectInstance" />, called for each 396/// A delegate used for constructing a <see cref="ProjectInstance" />, called for each 835internal ProjectInstance DefaultProjectInstanceFactory( 849internal static ProjectInstance StaticProjectInstanceFactory(
Graph\ProjectGraphNode.cs (2)
28internal ProjectGraphNode(ProjectInstance projectInstance) 49public ProjectInstance ProjectInstance { get; }
Graph\ProjectInterpretation.cs (9)
82ProjectInstance requesterInstance = projectGraphNode.ProjectInstance; 180var projectInstance = projectInstanceFactory( 211internal static string GetInnerBuildPropertyValue(ProjectInstance project) 216internal static string GetInnerBuildPropertyName(ProjectInstance project) 221internal static string GetInnerBuildPropertyValues(ProjectInstance project) 226internal static ProjectType GetProjectType(ProjectInstance project) 283private static IEnumerable<ProjectItemInstance> ConstructInnerBuildReferences(ProjectInstance outerBuild) 492public static TargetsToPropagate FromProjectAndEntryTargets(ProjectInstance project, ImmutableList<string> entryTargets) 554ProjectInstance projectInstance = projectGraphNode.ProjectInstance;
Instance\ProjectInstance.cs (28)
192/// of another ProjectInstance. <seealso cref="ProjectInstance(ProjectInstance, bool, RequestedProjectState)"/> 420/// The resulting <see cref="ProjectInstance"/> object wraps the <see cref="Project"/> 532internal ProjectInstance(string projectFile, ProjectInstance projectToInheritFrom, IDictionary<string, string> globalProperties) 594/// Initializes a new instance of the <see cref="ProjectInstance"/> class directly. 696private ProjectInstance(ProjectInstance that, bool isImmutable, RequestedProjectState filter = null) 859public static ProjectInstance FromFile(string file, ProjectOptions options) 878public static ProjectInstance FromProjectRootElement(ProjectRootElement rootElement, ProjectOptions options) 897public static ProjectInstance FromImmutableProjectSource(Project project, ProjectInstanceSettings settings) 921ProjectInstance owningProjectInstance) 943ProjectInstance owningProjectInstance, 1271/// of another ProjectInstance. <seealso cref="ProjectInstance(ProjectInstance, bool, RequestedProjectState)"/> 2048public ProjectInstance DeepCopy() 2063public ProjectInstance FilteredCopy(RequestedProjectState filter) 2073public ProjectInstance DeepCopy(bool isImmutable) 2328/// from the <see cref="ProjectInstance"/> provided. 2330/// <param name="projectState"><see cref="ProjectInstance"/> with the state to use.</param> 2331public void UpdateStateFrom(ProjectInstance projectState) 2348ErrorUtilities.VerifyThrow(TaskRegistry != null, $"{nameof(TaskRegistry)} Cannot be null after {nameof(ProjectInstance)} object creation."); 2528internal static ProjectInstance[] LoadSolutionForBuild( 2546ProjectInstance[] projectInstances = null; 2592private static ProjectInstance[] CalculateToolsVersionAndGenerateSolutionWrapper( 2618ProjectInstance[] projectInstances = null; 2661internal static ProjectInstance FactoryForDeserialization(ITranslator translator) 2873private static ProjectInstance[] GenerateSolutionWrapper( 2899ProjectInstance[] instances = SolutionProjectGenerator.Generate(sp, globalProperties, toolsVersion, projectBuildEventContext, loggingService, targetNames, sdkResolverService, submissionId); 2926private static ProjectInstance[] GenerateSolutionWrapperUsingOldOM( 3000ProjectInstance instance = new(projectRootElement, globalProperties, toolsVersion, buildParameters, loggingService, projectBuildEventContext, sdkResolverService, submissionId); 3380ProjectInstance projectInstance,
Instance\ProjectItemInstance.cs (27)
47private ProjectInstance _project; 68internal ProjectItemInstance(ProjectInstance project, string itemType, string includeEscaped, string definingFileEscaped) 80internal ProjectItemInstance(ProjectInstance project, string itemType, string includeEscaped, string includeBeforeWildcardExpansionEscaped, string definingFileEscaped) 99ProjectInstance project, 122internal ProjectItemInstance(ProjectInstance project, string itemType, string includeEscaped, IEnumerable<KeyValuePair<string, string>> directMetadata, string definingFileEscaped) 147private ProjectItemInstance(ProjectItemInstance that, ProjectInstance newProject) 157private ProjectItemInstance(ProjectInstance projectInstance) 168public ProjectInstance Project 620internal static ProjectItemInstance FactoryForDeserialization(ITranslator translator, ProjectInstance projectInstance) 667internal ProjectItemInstance DeepClone(ProjectInstance newProject) 699ProjectInstance projectToUse, 903ProjectInstance.VerifyThrowNotImmutable(_isImmutable); 929ProjectInstance.VerifyThrowNotImmutable(_isImmutable); 1021ProjectInstance.VerifyThrowNotImmutable(_isImmutable); 1082ProjectInstance.VerifyThrowNotImmutable(_isImmutable); 1360ProjectInstance.VerifyThrowNotImmutable(_isImmutable); 1371ProjectInstance.VerifyThrowNotImmutable(_isImmutable); 1382ProjectInstance.VerifyThrowNotImmutable(_isImmutable); 1427ProjectInstance.VerifyThrowNotImmutable(destinationAsTaskItem._isImmutable); 1710ProjectInstance.VerifyThrowNotImmutable(_isImmutable); 1834ProjectInstance.VerifyThrowNotImmutable(_isImmutable); 1858ProjectInstance.VerifyThrowNotImmutable(_isImmutable); 1878ProjectInstance.VerifyThrowNotImmutable(_isImmutable); 1890ProjectInstance.VerifyThrowNotImmutable(_isImmutable); 1970private ProjectInstance _project; 1977internal ProjectItemInstanceFactory(ProjectInstance project) 1985internal ProjectItemInstanceFactory(ProjectInstance project, string itemType)
Instance\ProjectPropertyInstance.cs (1)
76ProjectInstance.VerifyThrowNotImmutable(IsImmutable);
ObjectModelRemoting\DefinitionObjectsLinks\ProjectLink.cs (1)
236public abstract ProjectInstance CreateProjectInstance(ProjectInstanceSettings settings, EvaluationContext evaluationContext);
Microsoft.Build.Engine.OM.UnitTests (91)
Definition\DefinitionEditing_Tests.cs (1)
1831ProjectInstance instance = project.CreateProjectInstance();
Definition\Project_Tests.cs (7)
681ProjectInstance projectInstance = new ProjectInstance(xml); 719ProjectInstance projectInstance = new ProjectInstance(xml); 755ProjectInstance projectInstance = new ProjectInstance(xml); 793ProjectInstance projectInstance = new ProjectInstance(xml); 1765ProjectInstance projectInstance = project.CreateProjectInstance(); 3867var projectInstance = project.CreateProjectInstance(); 3879var newProjectInstance = project.CreateProjectInstance();
Definition\ProjectItem_Tests.cs (3)
954Should.Throw<InvalidProjectFileException>(() => { ProjectInstance.FromFile(testProjectFile, new ProjectOptions()); }); 965ProjectInstance.FromFile(testProjectFile, options); 3758var projectInstance = buildManager.GetProjectInstanceForBuild(project);
Definition\ProjectItemDefinition_Tests.cs (1)
454ProjectInstance instance = project.CreateProjectInstance();
Instance\ProjectInstance_Tests.cs (63)
41ProjectInstance i = p.CreateProjectInstance(); 52ProjectInstance p = GetSampleProjectInstance(); 64ProjectInstance p = GetSampleProjectInstance(); 84ProjectInstance p = GetEmptyProjectInstance(); 105ProjectInstance p = GetEmptyProjectInstance(); 126ProjectInstance p = GetEmptyProjectInstance(); 157ProjectInstance p = GetEmptyProjectInstance(); 169ProjectInstance p = GetEmptyProjectInstance(); 181ProjectInstance p = GetEmptyProjectInstance(); 191ProjectInstance p = GetEmptyProjectInstance(); 205ProjectInstance instance = p.CreateProjectInstance(); 223ProjectInstance first = GetSampleProjectInstance(); 224ProjectInstance second = first.DeepCopy(); 235ProjectInstance first = GetSampleProjectInstance(); 236ProjectInstance second = first.DeepCopy(); 263ProjectInstance project = GetProjectInstance(content); 306ProjectInstance projectInstance = GetProjectInstance(content); 328ProjectInstance first = GetSampleProjectInstance(); 329ProjectInstance second = first.DeepCopy(); 346ProjectInstance instance = new ProjectInstance(ProjectRootElement.Create()); 358ProjectInstance instance = new ProjectInstance(ProjectRootElement.Create()); 370ProjectInstance instance = new ProjectInstance(ProjectRootElement.Create()); 383ProjectInstance instance = new ProjectInstance(xml); 398ProjectInstance instance1 = new Project().CreateProjectInstance(); 428var projBInstance = projBEval.CreateProjectInstance(); 470var projBInstance = new ProjectInstance(projBEval, ProjectInstanceSettings.ImmutableWithFastItemLookup); 512var projBInstance = projBEval.CreateProjectInstance(); 669var instance = GetSampleProjectInstance(true /* immutable */); 680var instance = GetSampleProjectInstance(true /* immutable */); 691var instance = GetSampleProjectInstance(true /* immutable */); 702var instance = GetSampleProjectInstance(true /* immutable */); 713var instance = GetSampleProjectInstance(true /* immutable */); 724var instance = GetSampleProjectInstance(true /* immutable */); 735var instance = GetSampleProjectInstance(true /* immutable */); 746var instance = GetSampleProjectInstance(true /* immutable */); 757var instance = GetSampleProjectInstance(true /* immutable */); 768var instance = GetSampleProjectInstance(true /* immutable */); 779var instance = GetSampleProjectInstance(true /* immutable */); 790var instance = GetSampleProjectInstance(true /* immutable */); 801var instance = GetSampleProjectInstance(true /* immutable */); 812var instance = GetSampleProjectInstance(true /* immutable */); 823var instance = GetSampleProjectInstance(true /* immutable */); 834var instance = GetSampleProjectInstance(true /* immutable */); 846var instance = GetSampleProjectInstance(true /* immutable */); 858var instance = GetSampleProjectInstance(true /* immutable */); 869var protoInstance = GetSampleProjectInstance(true /* immutable */); 870var instance = protoInstance.DeepCopy(false /* mutable */); 888var protoInstance = GetSampleProjectInstance(false /* mutable */); 889var instance = protoInstance.DeepCopy(true /* immutable */); 910var protoInstance = GetSampleProjectInstance(true /* immutable */); 911var instance = protoInstance.DeepCopy(/* inherit */); 935var protoInstance = GetSampleProjectInstance(true /* immutable */); 936var instance = protoInstance.DeepCopy(true /* immutable */); 957var protoInstance = GetSampleProjectInstance(false /* mutable */); 958var instance = protoInstance.DeepCopy(/* inherit */); 974var protoInstance = GetSampleProjectInstance(false /* mutable */); 975var instance = protoInstance.DeepCopy(false /* mutable */); 988private static ProjectInstance GetSampleProjectInstance(bool isImmutable = false) 1017ProjectInstance p = GetProjectInstance(content, isImmutable); 1025private static ProjectInstance GetProjectInstance(string content, bool immutable = false) 1032ProjectInstance instance = immutable ? project.CreateProjectInstance(ProjectInstanceSettings.Immutable) : project.CreateProjectInstance(); 1040private static ProjectInstance GetEmptyProjectInstance() 1044ProjectInstance instance = project.CreateProjectInstance();
Instance\ProjectItemInstance_Tests.cs (4)
252ProjectInstance projectInstance = project.CreateProjectInstance(); 347ProjectInstance projectInstance = project.CreateProjectInstance(); 1172ProjectInstance project = new ProjectInstance(xml); 1194ProjectInstance projectInstance = project.CreateProjectInstance();
Instance\ProjectMetadataInstance_Tests.cs (1)
35ProjectInstance projectInstance = project.CreateProjectInstance();
Instance\ProjectOnErrorInstance_Tests.cs (1)
48ProjectInstance instance = project.CreateProjectInstance();
Instance\ProjectPropertyInstance_Tests.cs (2)
93var snapshot = project.CreateProjectInstance(ProjectInstanceSettings.Immutable); 104ProjectInstance projectInstance = project.CreateProjectInstance();
Instance\ProjectTargetInstance_Tests.cs (4)
57ProjectInstance instance = project.CreateProjectInstance(); 77ProjectInstance instance = project.CreateProjectInstance(); 97ProjectInstance instance = project.CreateProjectInstance(); 148ProjectInstance instance = project.CreateProjectInstance();
Instance\ProjectTaskInstance_Tests.cs (1)
78ProjectInstance instance = project.CreateProjectInstance();
Instance\ProjectTaskOutputItemInstance_Tests.cs (1)
51ProjectInstance instance = project.CreateProjectInstance();
Instance\ProjectTaskOutputPropertyInstance_Tests.cs (1)
51ProjectInstance instance = project.CreateProjectInstance();
ObjectModelRemoting\RemoteProjectsProviderMock\EvaluationLinkMocks\MockProjectLink.cs (1)
185public override ProjectInstance CreateProjectInstance(ProjectInstanceSettings settings, EvaluationContext evaluationContext) => throw new NotImplementedException();
Microsoft.Build.Engine.UnitTests (325)
BackEnd\BatchingEngine_Tests.cs (4)
28ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 126ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 163ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 225ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance();
BackEnd\BuildManager_Tests.cs (29)
355ProjectInstance rootProject = GenerateDummyProjects(shutdownProjectDirectory, numberOfParallelProjectsToBuild, projectCollection); 1776ProjectInstance instance = _buildManager.GetProjectInstanceForBuild(project); 1807ProjectInstance instance = _buildManager.GetProjectInstanceForBuild(project); 1842ProjectInstance instance = _buildManager.GetProjectInstanceForBuild(project); 1899ProjectInstance instance = _buildManager.GetProjectInstanceForBuild(project); 1900ProjectInstance instance2 = _buildManager.GetProjectInstanceForBuild(project); 1927ProjectInstance instance = _buildManager.GetProjectInstanceForBuild(project); 1953ProjectInstance instance = _buildManager.GetProjectInstanceForBuild(project); 1985ProjectInstance instance = _buildManager.GetProjectInstanceForBuild(project); 1998ProjectInstance instance2 = _buildManager.GetProjectInstanceForBuild(project); 2035ProjectInstance projectInstance = CreateProjectInstance(contents1, null, _projectCollection, false); 2062ProjectInstance projectInstance2 = CreateProjectInstance(contents1, null, _projectCollection, false); 2266ProjectInstance instance = project.CreateProjectInstance(); 2317ProjectInstance instance = project.CreateProjectInstance(); 3140ProjectInstance pi = BuildManager.DefaultBuildManager.GetProjectInstanceForBuild(project1); 3151ProjectInstance pi = BuildManager.DefaultBuildManager.GetProjectInstanceForBuild(project2); 3219ProjectInstance pi = BuildManager.DefaultBuildManager.GetProjectInstanceForBuild(project2); 3231ProjectInstance pi = BuildManager.DefaultBuildManager.GetProjectInstanceForBuild(project1); 3306ProjectInstance pi = BuildManager.DefaultBuildManager.GetProjectInstanceForBuild(project2); 3318ProjectInstance pi = BuildManager.DefaultBuildManager.GetProjectInstanceForBuild(project1); 3409ProjectInstance instance = _buildManager.GetProjectInstanceForBuild(project); 3439ProjectInstance instance = _buildManager.GetProjectInstanceForBuild(project); 3470ProjectInstance instance = _buildManager.GetProjectInstanceForBuild(project); 3576private ProjectInstance CreateProjectInstance(string contents, string toolsVersion, ProjectCollection projectCollection, bool deleteTempProject) 3618private static ProjectInstance GenerateDummyProjects(string shutdownProjectDirectory, int parallelProjectCount, ProjectCollection projectCollection) 3707var mainInstance = mainProject.CreateProjectInstance(ProjectInstanceSettings.Immutable).DeepCopy(isImmutable: false); 3734var p2pInstance = p2pProject.CreateProjectInstance(ProjectInstanceSettings.Immutable).DeepCopy(isImmutable: false); 3859ProjectInstance instance = project.CreateProjectInstance(ProjectInstanceSettings.Immutable).DeepCopy(false); 4412ProjectInstance instance = _buildManager.GetProjectInstanceForBuild(project);
BackEnd\BuildRequestConfiguration_Tests.cs (5)
188ProjectInstance projectInstance = project.CreateProjectInstance(); 286ProjectInstance instance = project.CreateProjectInstance(); 363ProjectInstance instance = project.CreateProjectInstance(); 465ProjectInstance instance = project.CreateProjectInstance(); 568var projectInstance = project.CreateProjectInstance();
BackEnd\BuildRequestEngine_Tests.cs (1)
238private ProjectInstance CreateStandinProject()
BackEnd\IntrinsicTask_Tests.cs (17)
1279ProjectInstance p = project.CreateProjectInstance(); 1312ProjectInstance p = project.CreateProjectInstance(); 2299ProjectInstance p = project.CreateProjectInstance(); 2333ProjectInstance p = project.CreateProjectInstance(); 2370ProjectInstance p = project.CreateProjectInstance(); 2407ProjectInstance p = project.CreateProjectInstance(); 2444ProjectInstance p = project.CreateProjectInstance(); 2482ProjectInstance p = project.CreateProjectInstance(); 2513ProjectInstance p = project.CreateProjectInstance(); 3200ProjectInstance p = project.CreateProjectInstance(); 3246ProjectInstance p = project.CreateProjectInstance(); 3542ProjectInstance instance = new ProjectInstance(xml); 3909private static Lookup GenerateLookupWithItemsAndProperties(ProjectInstance project) 3918private static Lookup GenerateLookup(ProjectInstance project) 3923private static Lookup GenerateLookup(ProjectInstance project, PropertyDictionary<ProjectPropertyInstance> properties) 3954ProjectInstance projectInstance = project.CreateProjectInstance(); 3989var projectInstance = project.CreateProjectInstance();
BackEnd\Lookup_Tests.cs (24)
27ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 49ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 81ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 151ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 201ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 252ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 303ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 358ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 400ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 464ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 524ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 595ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 662ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 717ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 765ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 821ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 862ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 897ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 968ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 1014ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 1025ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 1076ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 1129ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 1166ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance();
BackEnd\MSBuild_Tests.cs (8)
142ProjectInstance pi = p.CreateProjectInstance(); 555ProjectInstance pi = p.CreateProjectInstance(); 624ProjectInstance pi = p.CreateProjectInstance(); 931ProjectInstance pi = p.CreateProjectInstance(); 1051ProjectInstance pi = p.CreateProjectInstance(); 1120ProjectInstance pi = p.CreateProjectInstance(); 1187ProjectInstance pi = p.CreateProjectInstance(); 1802ProjectInstance pi = p.CreateProjectInstance();
BackEnd\SdkResultOutOfProc_Tests.cs (3)
123ProjectInstance projectInstance = CreateProjectInstance(projectPath, MSBuildDefaultToolsVersion, _projectCollection); 168ProjectInstance projectInstance = CreateProjectInstance(entryProjectPath, MSBuildDefaultToolsVersion, _projectCollection); 211private ProjectInstance CreateProjectInstance(string projectPath, string toolsVersion, ProjectCollection projectCollection)
BackEnd\TargetBuilder_Tests.cs (36)
99ProjectInstance project = CreateTestProject(); 119ProjectInstance project = CreateTestProject(); 146ProjectInstance project = CreateTestProject(); 169ProjectInstance project = CreateTestProject(); 361ProjectInstance project = CreateTestProject(projectBody); 501ProjectInstance project = CreateTestProject(projectBody); 527ProjectInstance project = CreateTestProject(projectBody); 553ProjectInstance project = CreateTestProject(projectBody); 583ProjectInstance project = CreateTestProject(projectBody); 618ProjectInstance project = CreateTestProject(projectBody); 650ProjectInstance project = CreateTestProject(projectBody); 681ProjectInstance project = CreateTestProject(projectBody); 707ProjectInstance project = CreateTestProject(projectBody); 743ProjectInstance project = CreateTestProject(projectBody); 769ProjectInstance project = CreateTestProject(projectBody); 796ProjectInstance project = CreateTestProject(projectBody); 826ProjectInstance project = CreateTestProject(projectBody); 870ProjectInstance project = CreateTestProject(projectBody); 897ProjectInstance project = CreateTestProject(projectBody); 924ProjectInstance project = CreateTestProject(projectBody); 956ProjectInstance project = CreateTestProject(projectBody); 1054ProjectInstance project = CreateTestProject(projectBody); 1089ProjectInstance project = CreateTestProject(projectBody); 1140ProjectInstance project = CreateTestProject(projectBody); 1200ProjectInstance project = CreateTestProject(projectBody); 1242ProjectInstance project = CreateTestProject(projectBody); 1288ProjectInstance project = CreateTestProject(projectBody); 1319ProjectInstance project = CreateTestProject(projectBody); 1393ProjectInstance project = CreateTestProject(projectBody); 1423var project = CreateTestProject(projectContents, string.Empty, "Build"); 1451var project = CreateTestProject(projectContents, string.Empty, "Build"); 1570private Lookup CreateStandardLookup(ProjectInstance project) 1580private ProjectInstance CreateTestProject() 1648private ProjectInstance CreateTestProject(string projectBodyContents) 1656private ProjectInstance CreateTestProject(string projectBodyContents, string initialTargets, string defaultTargets) 1705ProjectInstance project = CreateTestProject(projectBody);
BackEnd\TargetEntry_Tests.cs (23)
82ProjectInstance project = CreateTestProject(true /* Returns enabled */); 97ProjectInstance project = CreateTestProject(true /* Returns enabled */); 111ProjectInstance project = CreateTestProject(true /* Returns enabled */); 125ProjectInstance project = CreateTestProject(true /* Returns enabled */); 138ProjectInstance project = CreateTestProject(true /* Returns enabled */); 152ProjectInstance project = CreateTestProject(true /* Returns enabled */); 168ProjectInstance project = CreateTestProject(returnsEnabledForThisProject); 208ProjectInstance project = CreateTestProject(returnsEnabledForThisProject); 253ProjectInstance project = CreateTestProject(returnsEnabledForThisProject); 321ProjectInstance project = CreateTestProject(returnsEnabledForThisProject); 353ProjectInstance project = CreateTestProject(returnsEnabledForThisProject); 462ProjectInstance project = CreateTestProject(returnsEnabledForThisProject); 489ProjectInstance project = CreateTestProject(true /* returns are enabled */); 507ProjectInstance project = CreateTestProject(true /* returns are enabled */); 528ProjectInstance project = CreateTestProject(returnsEnabledForThisProject); 549ProjectInstance project = CreateTestProject(returnsEnabledForThisProject); 570ProjectInstance project = CreateTestProject(returnsEnabledForThisProject); 591ProjectInstance project = CreateTestProject(returnsEnabledForThisProject); 612ProjectInstance project = CreateTestProject(returnsEnabledForThisProject); 1001private void ExecuteEntry(ProjectInstance project, TargetEntry entry) 1024private TargetEntry CreateStandardTargetEntry(ProjectInstance project, string targetName) 1042private TargetEntry CreateStandardTargetEntry(ProjectInstance project, string target, TargetEntry baseEntry) 1055private ProjectInstance CreateTestProject(bool returnsAttributeEnabled)
BackEnd\TargetUpToDateChecker_Tests.cs (4)
170ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 207ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 251ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 609ProjectInstance p = project.CreateProjectInstance();
BackEnd\TaskBuilder_Tests.cs (2)
46private ProjectInstance _testProject; 1181private ProjectInstance CreateTestProject()
BackEnd\TaskExecutionHost_Tests.cs (4)
986ProjectInstance project = CreateTestProject(); 1014ProjectInstance project = CreateTestProject(); 1240ProjectInstance project = CreateTestProject(); 1503private ProjectInstance CreateTestProject()
BackEnd\TaskHostFactory_Tests.cs (2)
45ProjectInstance projectInstance = new(project.Path); 173ProjectInstance projectInstance = new(project.ProjectFile);
BackEnd\TaskRegistry_Tests.cs (1)
2203ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance();
Collections\OMcollections_tests.cs (2)
312ProjectInstance projectInstance = project.CreateProjectInstance(); 324ProjectInstance projectInstance = project.CreateProjectInstance();
Construction\SolutionFilter_Tests.cs (1)
141ProjectInstance[] instances = SolutionProjectGenerator.Generate(solution, null, null, _buildEventContext, mockLogger);
Construction\SolutionProjectGenerator_Tests.cs (41)
78ProjectInstance[] instances = SolutionProjectGenerator.Generate(SolutionFile.Parse(sln.Path), null, null, _buildEventContext, CreateMockLoggingService()); 372ProjectInstance[] instances = SolutionProjectGenerator.Generate(solution, null, "3.5", _buildEventContext, CreateMockLoggingService()); 409ProjectInstance[] instances = SolutionProjectGenerator.Generate(solution, null, "3.5", _buildEventContext, CreateMockLoggingService()); 438ProjectInstance[] instances = SolutionProjectGenerator.Generate(solution, null, null, _buildEventContext, CreateMockLoggingService()); 482ProjectInstance[] instances = SolutionProjectGenerator.Generate(solution, null, null, _buildEventContext, CreateMockLoggingService()); 519ProjectInstance[] instances = SolutionProjectGenerator.Generate(solution, null, null, _buildEventContext, CreateMockLoggingService()); 631ProjectInstance[] instances = SolutionProjectGenerator.Generate(sp, null, null, _buildEventContext, CreateMockLoggingService()); 653ProjectInstance[] instances1 = SolutionProjectGenerator.Generate(sp1, null, null, _buildEventContext, CreateMockLoggingService()); 717ProjectInstance[] instances = SolutionProjectGenerator.Generate(sp, null, null, _buildEventContext, CreateMockLoggingService()); 779ProjectInstance[] instances = SolutionProjectGenerator.Generate(sp, null, null, _buildEventContext, CreateMockLoggingService()); 1053var projectBravoMetaProject = instances[1]; 1274var instance = SolutionProjectGenerator.Generate(solution, null, ObjectModelHelpers.MSBuildDefaultToolsVersion, _buildEventContext, CreateMockLoggingService())[0]; 1342ProjectInstance[] instances = SolutionProjectGenerator.Generate(solution, null, ObjectModelHelpers.MSBuildDefaultToolsVersion, _buildEventContext, CreateMockLoggingService()); 1345foreach (ProjectInstance instance in instances) 1484ProjectInstance[] instances = SolutionProjectGenerator.Generate(solution, null, "invalid", _buildEventContext, CreateMockLoggingService()); 1527ProjectInstance[] instances = SolutionProjectGenerator.Generate(solution, null, null, BuildEventContext.Invalid, CreateMockLoggingService()); 1607ProjectInstance[] instances = SolutionProjectGenerator.Generate(solution, null, null, BuildEventContext.Invalid, CreateMockLoggingService()); 1639ProjectInstance[] instances = SolutionProjectGenerator.Generate(solution, null, null, BuildEventContext.Invalid, CreateMockLoggingService()); 1666ProjectInstance msbuildProject = CreateVenusSolutionProject(globalProperties, useNewParser); 1697ProjectInstance msbuildProject = CreateVenusSolutionProject(useNewParser); 1736ProjectInstance msbuildProject = CreateVenusSolutionProject("2.0", useNewParser); 1764ProjectInstance msbuildProject = CreateVenusSolutionProject(useNewParser); 1792ProjectInstance msbuildProject = CreateVenusSolutionProject(useNewParser); 1900ProjectInstance[] instances = SolutionProjectGenerator.Generate(solution, null, null, BuildEventContext.Invalid, CreateMockLoggingService()); 1957ProjectInstance[] instances = SolutionProjectGenerator.Generate(solution, null, null, BuildEventContext.Invalid, CreateMockLoggingService()); 2038ProjectInstance[] instances = SolutionProjectGenerator.Generate(solution, globalProperties, null, BuildEventContext.Invalid, CreateMockLoggingService()); 2039ProjectInstance msbuildProject = instances[0]; 2307ProjectInstance[] instances = SolutionProjectGenerator.Generate(solution, globalProperties, null, BuildEventContext.Invalid, collection.LoggingService); 2353ProjectInstance[] instances = SolutionProjectGenerator.Generate(solution, null, null, BuildEventContext.Invalid, CreateMockLoggingService(), new List<string> { "One" }); 2408ProjectInstance[] instances = SolutionProjectGenerator.Generate(solution, null, null, BuildEventContext.Invalid, CreateMockLoggingService(), null); 2457ProjectInstance[] instances; 2543ProjectInstance projectInstance = SolutionProjectGenerator.Generate(solutionFile, null, null, BuildEventContext.Invalid, CreateMockLoggingService(), new[] { "MyTarget" }).FirstOrDefault(); 2604ProjectInstance projectInstance = SolutionProjectGenerator.Generate(solutionFile, null, null, BuildEventContext.Invalid, CreateMockLoggingService(), targetsToBuild).FirstOrDefault(); 2721ProjectInstance projectInstance = SolutionProjectGenerator.Generate(solutionFile, globalProperties, null, BuildEventContext.Invalid, CreateMockLoggingService(), new[] { "Build" }).FirstOrDefault(); 2765private ProjectInstance CreateVenusSolutionProject(bool useNewParser) 2773private ProjectInstance CreateVenusSolutionProject(IDictionary<string, string> globalProperties, bool useNewParser) 2781private ProjectInstance CreateVenusSolutionProject(string toolsVersion, bool useNewParser) 2792private ProjectInstance CreateVenusSolutionProject(IDictionary<string, string> globalProperties, string toolsVersion, bool useNewParser) 2831ProjectInstance[] instances = SolutionProjectGenerator.Generate(solution, globalProperties, toolsVersion, BuildEventContext.Invalid, CreateMockLoggingService()); 2849private void AssertProjectContainsItem(ProjectInstance msbuildProject, string itemType, string include) 2869private void AssertProjectItemNameCount(ProjectInstance msbuildProject, string itemType, int count)
Definition\ItemDefinitionGroup_Tests.cs (3)
596ProjectInstance pi = p.CreateProjectInstance(); 632ProjectInstance pi = p.CreateProjectInstance(); 674ProjectInstance pi = p.CreateProjectInstance();
Definition\ProjectEvaluationContext_Tests.cs (3)
152var projectInstance = ProjectInstance.FromFile( 248ProjectInstance.FromProjectRootElement(
Definition\ProjectHelpers.cs (2)
22internal static ProjectInstance CreateEmptyProjectInstance() 28ProjectInstance instance = project.CreateProjectInstance();
Definition\ToolsVersion_Tests.cs (4)
637ProjectInstance pi = projectFromString.Project.CreateProjectInstance(); 708ProjectInstance pi = projectFromString.Project.CreateProjectInstance(); 793ProjectInstance pi = new ProjectInstance(projectFromString.Project.Xml, null /* no global properties */, null /* don't explicitly set the toolsversion */, p); 903ProjectInstance pi = new ProjectInstance(projectFromString.Project.Xml, null /* no global properties */, null /* don't explicitly set the toolsversion */, p);
EscapingInProjects_Tests.cs (1)
651ProjectInstance projectInstance = project.CreateProjectInstance();
Evaluation\Evaluator_Tests.cs (5)
449ProjectInstance project = new ProjectInstance(subdirProjPath); 1427ProjectInstance instance = project.CreateProjectInstance(); 2314ProjectInstance instance = project.CreateProjectInstance(); 2339ProjectInstance instance = project.CreateProjectInstance(); 2363ProjectInstance instance = project.CreateProjectInstance();
Evaluation\Expander_Tests.cs (23)
82ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 139ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 174ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 194ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 214ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 235ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 252ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 278ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 651ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 689ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 709ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 729ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 747ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 796ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 1357ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 1570ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 3909ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 4798ProjectInstance projectInstance = new ProjectInstance(projectFile.Path); 4842ProjectInstance projectInstance = new ProjectInstance(projectFile.Path); 4871ProjectInstance projectInstance = new ProjectInstance(projectFile.Path); 4918ProjectInstance projectInstance = new ProjectInstance(projectFile.Path); 4959ProjectInstance projectInstance = new ProjectInstance(projectFile.Path); 4993ProjectInstance projectInstance = new ProjectInstance(projectFile.Path);
Evaluation\ItemSpec_Tests.cs (1)
103var dummyProject = ProjectHelpers.CreateEmptyProjectInstance();
EvaluationProfiler_Tests.cs (1)
282var projectInstance = _buildManager.GetProjectInstanceForBuild(project);
ExpressionTree_Tests.cs (6)
183ProjectInstance parentProject = new ProjectInstance(ProjectRootElement.Create()); 213ProjectInstance parentProject = new ProjectInstance(ProjectRootElement.Create()); 248ProjectInstance parentProject = new ProjectInstance(ProjectRootElement.Create()); 280ProjectInstance parentProject = new ProjectInstance(ProjectRootElement.Create()); 297ProjectInstance parentProject = new ProjectInstance(ProjectRootElement.Create()); 326ProjectInstance parentProject = new ProjectInstance(ProjectRootElement.Create());
ExpressionTreeExpression_Tests.cs (1)
374ProjectInstance parentProject = new ProjectInstance(xml);
Graph\ProjectGraph_Tests.cs (2)
134var projectInstance = new Project().CreateProjectInstance(); 181var projectInstance = new Project().CreateProjectInstance();
Instance\HostServices_Tests.cs (3)
391ProjectInstance project = CreateDummyProject("foo.proj"); 475public ProjectInstance CreateDummyProject(string fileName) 486ProjectInstance instance = project.CreateProjectInstance();
Instance\ProjectInstance_Internal_Tests.cs (57)
71ProjectInstance project = new Project(projectRootElementFromString.Project).CreateProjectInstance(); 119ProjectInstance project = new Project(projectRootElementFromString.Project).CreateProjectInstance(); 145ProjectInstance project = projectFromString.Project.CreateProjectInstance(); 173ProjectInstance p = GetProjectInstance(content); 211ProjectInstance p = GetProjectInstance(content); 257ProjectInstance p = GetSampleProjectInstance(); 268ProjectInstance p = GetSampleProjectInstance(); 280ProjectInstance p = GetSampleProjectInstance(); 289var projectInstance = new ProjectInstance( 303ProjectInstance first = GetSampleProjectInstance(null, null, projectCollection, toolsVersion: "TESTTV"); 304ProjectInstance second = first.DeepCopy(); 323ProjectInstance p = GetSampleProjectInstance(null, null, collection); 357ProjectInstance p = GetSampleProjectInstance(null, null, collection); 385ProjectInstance p = GetSampleProjectInstance(null, globalProperties, collection); 426ProjectInstance p = new ProjectInstance(xml, globalProperties, ObjectModelHelpers.MSBuildDefaultToolsVersion, "ABCDEF", collection); 444ProjectInstance p = GetSampleProjectInstance(); 455ProjectInstance p = GetSampleProjectInstance(); 468ProjectInstance first = GetSampleProjectInstance(hostServices); 469ProjectInstance second = first.DeepCopy(); 488ProjectInstance first = GetSampleProjectInstance(); 489ProjectInstance second = first.DeepCopy(); 501ProjectInstance first = GetSampleProjectInstance(); 502ProjectInstance second = first.DeepCopy(); 514ProjectInstance first = GetSampleProjectInstance(); 515ProjectInstance second = first.DeepCopy(); 526ProjectInstance first = GetSampleProjectInstance(); 527ProjectInstance second = first.DeepCopy(); 538ProjectInstance first = GetSampleProjectInstance(); 539ProjectInstance second = first.DeepCopy(); 550ProjectInstance first = GetSampleProjectInstance(); 553ProjectInstance second = first.DeepCopy(); 581ProjectInstance projectInstance = GetProjectInstance(projectFileContent); 692var original = new ProjectInstance(rootElement); 697var copy = ProjectInstance.FactoryForDeserialization(TranslationHelpers.GetReadTranslator()); 702public delegate ProjectInstance ProjectInstanceFactory(string file, ProjectRootElement xml, ProjectCollection collection); 715(f, xml, c) => ProjectInstance.FromFile(f, new ProjectOptions { ProjectCollection = c }) 739(f, xml, c) => ProjectInstance.FromProjectRootElement(xml, new ProjectOptions { ProjectCollection = c }) 747var pi = new ProjectInstance(f, null, null, c); 752var copy = ProjectInstance.FactoryForDeserialization(TranslationHelpers.GetReadTranslator()); 771var projectInstance = projectInstanceFactory.Invoke(file, xml, projectCollection); 785ProjectInstance projectInstance = new ProjectInstance(rootElement); 821ProjectInstance projectInstance = new ProjectInstance(rootElement); 865ProjectInstance projectInstance = useDirectConstruction 899ProjectInstance projectInstance = ProjectInstance.FromFile( 927ProjectInstance projectInstance = ProjectInstance.FromProjectRootElement( 942private static ProjectInstance GetProjectInstance(string content) 950private static ProjectInstance GetProjectInstance(string content, HostServices hostServices) 958private static ProjectInstance GetProjectInstance(string content, HostServices hostServices, IDictionary<string, string> globalProperties, ProjectCollection projectCollection, string toolsVersion = null) 971ProjectInstance instance = project.CreateProjectInstance(); 979private static ProjectInstance GetSampleProjectInstance() 987private static ProjectInstance GetSampleProjectInstance(HostServices hostServices) 995private static ProjectInstance GetSampleProjectInstance(HostServices hostServices, IDictionary<string, string> globalProperties, ProjectCollection projectCollection, string toolsVersion = null) 1020ProjectInstance p = GetProjectInstance(content, hostServices, globalProperties, projectCollection, toolsVersion);
Instance\ProjectMetadataInstance_Internal_Tests.cs (1)
57ProjectInstance projectInstance = project.CreateProjectInstance();
Instance\ProjectPropertyInstance_Internal_Tests.cs (1)
95ProjectInstance projectInstance = project.CreateProjectInstance();
TestComparers\ProjectInstanceModelTestComparers.cs (4)
22public class ProjectInstanceComparer : IEqualityComparer<ProjectInstance> 24public bool Equals(ProjectInstance x, ProjectInstance y) 74public int GetHashCode(ProjectInstance obj)
Microsoft.Build.Tasks.CodeAnalysis.UnitTests (29)
TargetTests.cs (29)
34var instance = CreateProjectInstance(xmlReader); 58var instance = CreateProjectInstance(xmlReader); 82var instance = CreateProjectInstance(xmlReader); 107var instance = CreateProjectInstance(xmlReader); 134var instance = CreateProjectInstance(xmlReader); 160var instance = CreateProjectInstance(xmlReader); 193var instance = CreateProjectInstance(xmlReader); 222var instance = CreateProjectInstance(xmlReader); 254var instance = CreateProjectInstance(xmlReader); 296var instance = CreateProjectInstance(xmlReader); 336var instance = CreateProjectInstance(xmlReader); 371var instance = CreateProjectInstance(xmlReader); 428var instance = CreateProjectInstance(xmlReader); 457var instance = CreateProjectInstance(xmlReader); 481var instance = CreateProjectInstance(xmlReader); 508var instance = CreateProjectInstance(xmlReader); 533var instance = CreateProjectInstance(xmlReader); 557var instance = CreateProjectInstance(xmlReader); 583var instance = CreateProjectInstance(xmlReader); 604var instance = CreateProjectInstance(xmlReader); 629var instance = CreateProjectInstance(xmlReader); 655var instance = CreateProjectInstance(xmlReader); 694var instance = CreateProjectInstance(xmlReader); 751var instance = CreateProjectInstance(xmlReader); 812var instance = CreateProjectInstance(xmlReader); 874var instance = CreateProjectInstance(xmlReader); 892var instance = CreateProjectInstance(xmlReader); 909var instance = CreateProjectInstance(xmlReader); 924private static ProjectInstance CreateProjectInstance(XmlReader reader)
Microsoft.Build.Tasks.UnitTests (9)
AssignLinkMetadata_Tests.cs (1)
182ProjectInstance pi = p.CreateProjectInstance();
CallTarget_Tests.cs (1)
176ProjectInstance instance = project.CreateProjectInstance();
Exec_Tests.cs (2)
960var project = collection.LoadProject(testProject.ProjectFile).CreateProjectInstance(); 1017var project = collection.LoadProject(testProject.ProjectFile).CreateProjectInstance();
ResolveSDKReference_Tests.cs (5)
3812ProjectInstance project = pc.LoadProject(testProjectFile).CreateProjectInstance(); 3955ProjectInstance project = pc.LoadProject(testProjectFile).CreateProjectInstance(); 4064ProjectInstance project = pc.LoadProject(testProjectFile).CreateProjectInstance(); 4161ProjectInstance project = pc.LoadProject(testProjectFile).CreateProjectInstance(); 4330ProjectInstance project = pc.LoadProject(testProjectFile).CreateProjectInstance();
Microsoft.Build.UnitTests.Shared (3)
MockEngine.cs (1)
314ProjectInstance instance = _projectCollection.LoadProject(projectFileNames[i], finalGlobalProperties, null).CreateProjectInstance();
ObjectModelHelpers.cs (2)
1483var p = ProjectInstance.FromFile(testProjectFile, new ProjectOptions());
Microsoft.Build.Utilities.UnitTests (7)
MuxLogger_Tests.cs (7)
54ProjectInstance project = (projectFromString.Project).CreateProjectInstance(); 97ProjectInstance project = projectFromString.Project.CreateProjectInstance(); 149ProjectInstance project = (projectFromString.Project).CreateProjectInstance(); 202ProjectInstance project1 = projectFromString1.Project.CreateProjectInstance(); 203ProjectInstance project2 = projectFromString2.Project.CreateProjectInstance(); 258ProjectInstance project = (projectFromString.Project).CreateProjectInstance(); 307ProjectInstance project = (projectFromString.Project).CreateProjectInstance();
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (33)
Build\ProjectBuildManager.cs (3)
223public Task<MSB.Execution.ProjectInstance> BuildProjectAsync( 234private async Task<MSB.Execution.ProjectInstance> BuildProjectAsync( 239var projectInstance = project.CreateProjectInstance();
MSBuild\CSharp\CSharpCommandLineArgumentReader.cs (2)
12private CSharpCommandLineArgumentReader(MSB.Execution.ProjectInstance project) 17public static ImmutableArray<string> Read(MSB.Execution.ProjectInstance project)
MSBuild\CSharp\CSharpProjectFile.cs (2)
18protected override IEnumerable<MSB.Framework.ITaskItem> GetCompilerCommandLineArgs(MSB.Execution.ProjectInstance executedProject) 21protected override ImmutableArray<string> ReadCommandLineArgs(MSB.Execution.ProjectInstance project)
MSBuild\ProjectFile\CommandLineArgumentReader.cs (2)
16protected readonly MSB.Execution.ProjectInstance Project; 19protected CommandLineArgumentReader(MSB.Execution.ProjectInstance project)
MSBuild\ProjectFile\Extensions.cs (14)
16public static IEnumerable<MSB.Framework.ITaskItem> GetAdditionalFiles(this MSB.Execution.ProjectInstance executedProject) 19public static IEnumerable<MSB.Framework.ITaskItem> GetAnalyzers(this MSB.Execution.ProjectInstance executedProject) 22public static IEnumerable<MSB.Framework.ITaskItem> GetDocuments(this MSB.Execution.ProjectInstance executedProject) 25public static IEnumerable<MSB.Framework.ITaskItem> GetEditorConfigFiles(this MSB.Execution.ProjectInstance executedProject) 28public static IEnumerable<MSB.Framework.ITaskItem> GetMetadataReferences(this MSB.Execution.ProjectInstance executedProject) 31public static IEnumerable<ProjectFileReference> GetProjectReferences(this MSB.Execution.ProjectInstance executedProject) 36public static ImmutableArray<PackageReference> GetPackageReferences(this MSB.Execution.ProjectInstance executedProject) 75public static string? ReadPropertyString(this MSB.Execution.ProjectInstance executedProject, string propertyName) 78public static bool ReadPropertyBool(this MSB.Execution.ProjectInstance executedProject, string propertyName) 81public static int ReadPropertyInt(this MSB.Execution.ProjectInstance executedProject, string propertyName) 84public static ulong ReadPropertyULong(this MSB.Execution.ProjectInstance executedProject, string propertyName) 87public static TEnum? ReadPropertyEnum<TEnum>(this MSB.Execution.ProjectInstance executedProject, string propertyName, bool ignoreCase) 91public static string ReadItemsAsString(this MSB.Execution.ProjectInstance executedProject, string itemType) 109public static IEnumerable<MSB.Framework.ITaskItem> GetTaskItems(this MSB.Execution.ProjectInstance executedProject, string itemType)
MSBuild\ProjectFile\ProjectFile.cs (6)
43protected abstract IEnumerable<MSB.Framework.ITaskItem> GetCompilerCommandLineArgs(MSB.Execution.ProjectInstance executedProject); 44protected abstract ImmutableArray<string> ReadCommandLineArgs(MSB.Execution.ProjectInstance project); 111var project = await _buildManager.BuildProjectAsync(_loadedProject, Log, cancellationToken).ConfigureAwait(false); 118private ProjectFileInfo CreateProjectFileInfo(MSB.Execution.ProjectInstance project) 214private static ImmutableArray<string> GetContentFiles(MSB.Execution.ProjectInstance project) 222private ImmutableArray<string> GetCommandLineArgs(MSB.Execution.ProjectInstance project)
MSBuild\VisualBasic\VisualBasicCommandLineArgumentReader.cs (2)
14public VisualBasicCommandLineArgumentReader(MSB.Execution.ProjectInstance project) 19public static ImmutableArray<string> Read(MSB.Execution.ProjectInstance project)
MSBuild\VisualBasic\VisualBasicProjectFile.cs (2)
18protected override IEnumerable<MSB.Framework.ITaskItem> GetCompilerCommandLineArgs(MSB.Execution.ProjectInstance executedProject) 21protected override ImmutableArray<string> ReadCommandLineArgs(MSB.Execution.ProjectInstance project)
MSBuild (2)
JsonOutputFormatter.cs (1)
46internal void AddItemInstancesInJsonFormat(string[] itemNames, ProjectInstance project)
XMake.cs (1)
1108ProjectInstance builtProject = result.ProjectStateAfterBuild;