71 instantiations of ProjectInstance
Microsoft.Build (15)
BackEnd\BuildManager\BuildManager.cs (1)
2174return new ProjectInstance(
BackEnd\Shared\BuildRequestConfiguration.cs (1)
508return new ProjectInstance(
Construction\Solution\SolutionProjectGenerator.cs (2)
1037var traversalInstance = new ProjectInstance( 1274ProjectInstance metaprojectInstance = new ProjectInstance(EscapingUtilities.UnescapeAll(GetMetaprojectName(project)), traversalProject, GetMetaprojectGlobalProperties(traversalProject));
Definition\Project.cs (1)
3727return new ProjectInstance(_data, DirectoryPath, FullPath, ProjectCollection.HostServices, ProjectCollection.EnvironmentProperties, settings);
Graph\ProjectGraph.cs (1)
855return new ProjectInstance(
Instance\ProjectInstance.cs (9)
199/// of another ProjectInstance. <seealso cref="ProjectInstance(ProjectInstance, bool, RequestedProjectState)"/> 921return new ProjectInstance( 940return new ProjectInstance( 960return new ProjectInstance(project, fastItemLookupNeeded); 1310/// of another ProjectInstance. <seealso cref="ProjectInstance(ProjectInstance, bool, RequestedProjectState)"/> 2173return new ProjectInstance(this, true, filter); 2189return new ProjectInstance(this, isImmutable); 2778return new ProjectInstance(translator); 3120ProjectInstance instance = new(projectRootElement, globalProperties, toolsVersion, buildParameters, loggingService, projectBuildEventContext, sdkResolverService, submissionId);
Microsoft.Build.Engine.OM.UnitTests (10)
Definition\Project_Tests.cs (4)
680ProjectInstance projectInstance = new ProjectInstance(xml); 718ProjectInstance projectInstance = new ProjectInstance(xml); 754ProjectInstance projectInstance = new ProjectInstance(xml); 792ProjectInstance projectInstance = new ProjectInstance(xml);
Instance\ProjectInstance_Tests.cs (5)
344ProjectInstance instance = new ProjectInstance(ProjectRootElement.Create()); 356ProjectInstance instance = new ProjectInstance(ProjectRootElement.Create()); 368ProjectInstance instance = new ProjectInstance(ProjectRootElement.Create()); 381ProjectInstance instance = new ProjectInstance(xml); 468var projBInstance = new ProjectInstance(projBEval, ProjectInstanceSettings.ImmutableWithFastItemLookup);
Instance\ProjectItemInstance_Tests.cs (1)
1166ProjectInstance project = new ProjectInstance(xml);
Microsoft.Build.Engine.UnitTests (46)
BackEnd\BuildManager_Tests.cs (1)
3703return new ProjectInstance(rootProject);
BackEnd\IntrinsicTask_Tests.cs (1)
3541ProjectInstance instance = new ProjectInstance(xml);
BackEnd\ResultsCache_Tests.cs (1)
311resultForRequestWithSubsetFlag1.ProjectStateAfterBuild = new ProjectInstance(ProjectRootElement.Create(xmlReader)).FilteredCopy(requestedProjectState1);
BackEnd\TaskHost_Tests.cs (1)
83configuration.Project = new ProjectInstance(ProjectRootElement.Create());
BackEnd\TaskHostCallback_Tests.cs (7)
53ProjectInstance projectInstance = new(project.ProjectFile); 128ProjectInstance projectInstance = new(project.ProjectFile); 159ProjectInstance projectInstance = new(project.ProjectFile); 349ProjectInstance projectInstance = new(project.ProjectFile); 388ProjectInstance projectInstance = new(project.ProjectFile); 434ProjectInstance projectInstance = new(project.ProjectFile); 474ProjectInstance projectInstance = new(project.ProjectFile);
BackEnd\TaskHostFactory_Tests.cs (4)
73ProjectInstance projectInstance = new(project.Path); 178ProjectInstance projectInstance = new(project.Path); 331ProjectInstance projectInstance = new(project.ProjectFile); 390ProjectInstance projectInstance = new(project.Path);
Definition\ToolsVersion_Tests.cs (4)
792ProjectInstance pi = new ProjectInstance(projectFromString.Project.Xml, null /* no global properties */, null /* don't explicitly set the toolsversion */, p); 826ProjectInstance pi = new ProjectInstance(projectFromString.Project.Xml, null /* no global properties */, null /* don't explicitly set the toolsversion */, p); 862ProjectInstance pi = new ProjectInstance(projectFromString.Project.Xml, null /* no global properties */, null /* don't explicitly set the toolsversion */, p); 902ProjectInstance pi = new ProjectInstance(projectFromString.Project.Xml, null /* no global properties */, null /* don't explicitly set the toolsversion */, p);
Evaluation\Evaluator_Tests.cs (1)
484ProjectInstance project = new ProjectInstance(subdirProjPath);
Evaluation\Expander_Tests.cs (9)
4909ProjectInstance projectInstance = new ProjectInstance(projectFile.Path); 4953ProjectInstance projectInstance = new ProjectInstance(projectFile.Path); 4982ProjectInstance projectInstance = new ProjectInstance(projectFile.Path); 5029ProjectInstance projectInstance = new ProjectInstance(projectFile.Path); 5070ProjectInstance projectInstance = new ProjectInstance(projectFile.Path); 5104ProjectInstance projectInstance = new ProjectInstance(projectFile.Path); 5151new ProjectInstance(projectFile.Path); 5192new ProjectInstance(projectFile.Path); 5224new ProjectInstance(projectFile.Path);
ExpressionTree_Tests.cs (6)
182ProjectInstance parentProject = new ProjectInstance(ProjectRootElement.Create()); 212ProjectInstance parentProject = new ProjectInstance(ProjectRootElement.Create()); 247ProjectInstance parentProject = new ProjectInstance(ProjectRootElement.Create()); 279ProjectInstance parentProject = new ProjectInstance(ProjectRootElement.Create()); 296ProjectInstance parentProject = new ProjectInstance(ProjectRootElement.Create()); 325ProjectInstance parentProject = new ProjectInstance(ProjectRootElement.Create());
ExpressionTreeExpression_Tests.cs (1)
373ProjectInstance parentProject = new ProjectInstance(xml);
Instance\ProjectInstance_Internal_Tests.cs (10)
287var projectInstance = new ProjectInstance( 424ProjectInstance p = new ProjectInstance(xml, globalProperties, ObjectModelHelpers.MSBuildDefaultToolsVersion, "ABCDEF", collection); 690var original = new ProjectInstance(rootElement); 707(f, xml, c) => new ProjectInstance(f, null, null, c) 725(f, xml, c) => new ProjectInstance(f, null, null, c).DeepCopy() 731(f, xml, c) => new ProjectInstance(xml, null, null, c) 745var pi = new ProjectInstance(f, null, null, c); 783ProjectInstance projectInstance = new ProjectInstance(rootElement); 819ProjectInstance projectInstance = new ProjectInstance(rootElement); 864? new ProjectInstance(rootElement, globalProperties: null, toolsVersion: null, buildParameters, projectCollection.LoggingService, buildEventContext, sdkResolverService: null, 0)
716 references to ProjectInstance
Microsoft.Build (171)
BackEnd\BuildManager\BuildManager.cs (6)
191private readonly Dictionary<ProjectInstance, string> _unnamedProjectInstanceToNames; 306_unnamedProjectInstanceToNames = new Dictionary<ProjectInstance, string>(); 926public ProjectInstance GetProjectInstanceForBuild(Project project) 1507ProjectInstance? projectInstance = submission.BuildRequestData.ProjectInstance; 1738var instances = ProjectInstance.LoadSolutionForBuild( 1783ProjectInstance newInstance = project.CreateProjectInstance();
BackEnd\BuildManager\BuildRequestData.cs (6)
22public BuildRequestData(ProjectInstance projectInstance, string[] targetsToBuild) 33public BuildRequestData(ProjectInstance projectInstance, string[] targetsToBuild, HostServices hostServices) 45public BuildRequestData(ProjectInstance projectInstance, string[] targetsToBuild, HostServices? hostServices, BuildRequestDataFlags flags) 58public BuildRequestData(ProjectInstance projectInstance, string[] targetsToBuild, HostServices? hostServices, BuildRequestDataFlags flags, IEnumerable<string>? propertiesToTransfer) 87public BuildRequestData(ProjectInstance projectInstance, string[] targetsToBuild, HostServices? hostServices, BuildRequestDataFlags flags, IEnumerable<string>? propertiesToTransfer, RequestedProjectState requestedProjectState) 167public ProjectInstance? ProjectInstance
BackEnd\Components\ProjectCache\ProjectCacheService.cs (1)
173private 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)
37public PropertyGroupIntrinsicTask(ProjectPropertyGroupTaskInstance taskInstance, TargetLoggingContext loggingContext, ProjectInstance projectInstance, bool logTaskInputs)
BackEnd\Components\RequestBuilder\RequestBuilder.cs (2)
1488ProjectInstance project = _requestEntry?.RequestConfiguration?.Project; 1528ProjectInstance project = _requestEntry?.RequestConfiguration?.Project;
BackEnd\Components\RequestBuilder\TargetBuilder.cs (1)
86private ProjectInstance _projectInstance;
BackEnd\Components\RequestBuilder\TargetUpToDateChecker.cs (2)
56internal TargetUpToDateChecker(ProjectInstance project, ProjectTargetInstance targetToAnalyze, ILoggingService loggingServices, BuildEventContext buildEventContext) 1237private ProjectInstance _project;
BackEnd\Shared\BuildRequestConfiguration.cs (8)
89private ProjectInstance _project; 94private ProjectInstance _transferredState; 218internal BuildRequestConfiguration(int configId, ProjectInstance instance) 398public ProjectInstance Project 433private void SetProjectBasedState(ProjectInstance project) 528private void InitializeProject(BuildParameters buildParameters, Func<ProjectInstance> loadProjectFromFile) 957translator.Translate(ref _transferredState, ProjectInstance.FactoryForDeserialization); 1000internal void ApplyTransferredState(ProjectInstance instance)
BackEnd\Shared\BuildResult.cs (11)
131/// <see cref="ProjectInstance"/> state after the build. This is only provided if <see cref="BuildRequest.BuildRequestDataFlags"/> 135/// be used to retrieve <see cref="ProjectInstance.Properties"/>, <see cref="ProjectInstance.GlobalProperties"/> and 136/// <see cref="ProjectInstance.Items"/> from it. No other operation is guaranteed to be supported. 138private ProjectInstance? _projectStateAfterBuild; 415/// <see cref="ProjectInstance"/> state after the build. In general, it may be a non buildable-dummy object, and should only 416/// be used to retrieve <see cref="ProjectInstance.Properties"/>, <see cref="ProjectInstance.GlobalProperties"/> and 417/// <see cref="ProjectInstance.Items"/> from it. Any other operation is not guaranteed to be supported. 419public ProjectInstance? ProjectStateAfterBuild 652translator.Translate(ref _projectStateAfterBuild, ProjectInstance.FactoryForDeserialization);
BackEnd\TaskExecutionHost\TaskExecutionHost.cs (3)
87private ProjectInstance _projectInstance; 218public ProjectInstance ProjectInstance => _projectInstance; 265ProjectInstance projectInstance,
Construction\Solution\SolutionProjectGenerator.cs (35)
209internal static ProjectInstance[] Generate( 739private ProjectInstance[] Generate() 766private ProjectInstance[] CreateSolutionProject(string wrapperProjectToolsVersion, bool explicitToolsVersionSpecified) 794var projectInstances = new List<ProjectInstance>(projectsInOrder.Count + 1); 797ProjectInstance traversalInstance = CreateTraversalInstance(wrapperProjectToolsVersion, explicitToolsVersionSpecified, projectsInOrder); 826foreach (ProjectInstance instance in projectInstances) 837private void EvaluateAndAddProjects(List<ProjectInSolution> projectsInOrder, List<ProjectInstance> projectInstances, ProjectInstance traversalInstance, string selectedSolutionConfiguration) 872ProjectInstance metaproject = CreateMetaproject(traversalInstance, project, projectConfiguration); 887private void AddStandardTraversalTargets(ProjectInstance traversalInstance, List<ProjectInSolution> projectsInOrder) 902private ProjectInstance CreateTraversalInstance(string wrapperProjectToolsVersion, bool explicitToolsVersionSpecified, List<ProjectInSolution> projectsInOrder) 1037var traversalInstance = new ProjectInstance( 1115private void AddProjectReference(ProjectInstance traversalProject, ProjectInstance projectInstance, ProjectInSolution projectToAdd, ProjectConfigurationInSolution projectConfiguration, bool direct) 1148private static string GetToolsVersionMetadataForDirectMSBuildTask(ProjectInstance traversalProject) 1165private static string GetPropertiesMetadataForProjectReference(ProjectInstance traversalProject, string configurationAndPlatformProperties) 1204private bool CanBuildDirectly(ProjectInstance traversalProject, ProjectInSolution projectToAdd, ProjectConfigurationInSolution projectConfiguration) 1271private ProjectInstance CreateMetaproject(ProjectInstance traversalProject, ProjectInSolution project, ProjectConfigurationInSolution projectConfiguration) 1274ProjectInstance metaprojectInstance = new ProjectInstance(EscapingUtilities.UnescapeAll(GetMetaprojectName(project)), traversalProject, GetMetaprojectGlobalProperties(traversalProject)); 1376private void AddMetaprojectReferenceItems(ProjectInstance traversalProject, ProjectInstance metaprojectInstance, ProjectInSolution project) 1404private static void AddMetaprojectTargetForManagedProject(ProjectInstance traversalProject, ProjectInstance metaprojectInstance, ProjectInSolution project, ProjectConfigurationInSolution projectConfiguration, string targetName, string outputItem) 1423private static void AddProjectBuildTask(ProjectInstance traversalProject, ProjectConfigurationInSolution projectConfiguration, ProjectTargetInstance target, string targetToBuild, string sourceItems, string condition, string outputItem) 1922private void AddMetaprojectTargetForUnknownProjectType(ProjectInstance traversalProject, ProjectInstance metaprojectInstance, ProjectInSolution project, string targetName, string unknownProjectTypeErrorMessage) 1992private void AddValidateProjectsTarget(ProjectInstance traversalProject, List<ProjectInSolution> projects) 2034private static void AddTraversalReferencesTarget(ProjectInstance traversalProject, string targetName, string outputItem, bool batchBuildTargets) 2086private void AddTraversalTargetForProject(ProjectInstance traversalProject, ProjectInSolution project, ProjectConfigurationInSolution projectConfiguration, string targetToBuild, string outputItem, bool canBuildDirectly) 2131private IDictionary<string, string> GetMetaprojectGlobalProperties(ProjectInstance traversalProject) 2404private void AddInitialTargets(ProjectInstance traversalProject, List<ProjectInSolution> projects) 2415private void AddValidateSolutionConfigurationTarget(ProjectInstance traversalProject) 2450private static void AddValidateToolsVersionsTarget(ProjectInstance traversalProject) 2463private static void AddGetSolutionConfigurationContentsTarget(ProjectInstance traversalProject)
Definition\Project.cs (6)
1367public ProjectInstance CreateProjectInstance() 1381public ProjectInstance CreateProjectInstance(ProjectInstanceSettings settings) 1392public ProjectInstance CreateProjectInstance(ProjectInstanceSettings settings, EvaluationContext evaluationContext) 3293public override ProjectInstance CreateProjectInstance(ProjectInstanceSettings settings, EvaluationContext evaluationContext) 3361ProjectInstance instance = CreateProjectInstance(LoggingService, ProjectInstanceSettings.None, evaluationContext); 3720private ProjectInstance CreateProjectInstance(
Graph\GraphBuilder.cs (4)
54private ConcurrentDictionary<ConfigurationMetadata, Lazy<ProjectInstance>> _platformNegotiationInstancesCache = new(); 539ProjectInstance projectInstance; 642private ProjectInstance GetInstanceForPlatformNegotiationWithCaching( 649new 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)
26internal ProjectGraphNode(ProjectInstance projectInstance) 47public 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 (29)
199/// of another ProjectInstance. <seealso cref="ProjectInstance(ProjectInstance, bool, RequestedProjectState)"/> 423/// The resulting <see cref="ProjectInstance"/> object wraps the <see cref="Project"/> 563internal ProjectInstance(string projectFile, ProjectInstance projectToInheritFrom, IDictionary<string, string> globalProperties) 626/// Initializes a new instance of the <see cref="ProjectInstance"/> class directly. 739private ProjectInstance(ProjectInstance that, bool isImmutable, RequestedProjectState filter = null) 919public static ProjectInstance FromFile(string file, ProjectOptions options) 938public static ProjectInstance FromProjectRootElement(ProjectRootElement rootElement, ProjectOptions options) 957public static ProjectInstance FromImmutableProjectSource(Project project, ProjectInstanceSettings settings) 981ProjectInstance owningProjectInstance) 1003ProjectInstance owningProjectInstance, 1310/// of another ProjectInstance. <seealso cref="ProjectInstance(ProjectInstance, bool, RequestedProjectState)"/> 1390/// Adds an Environment Variable that was resolved by an <see cref="SdkResolver"/> to the set of properties tracked by this <see cref="ProjectInstance"/>. 2156public ProjectInstance DeepCopy() 2171public ProjectInstance FilteredCopy(RequestedProjectState filter) 2181public ProjectInstance DeepCopy(bool isImmutable) 2438/// from the <see cref="ProjectInstance"/> provided. 2440/// <param name="projectState"><see cref="ProjectInstance"/> with the state to use.</param> 2441public void UpdateStateFrom(ProjectInstance projectState) 2458ErrorUtilities.VerifyThrow(TaskRegistry != null, $"{nameof(TaskRegistry)} Cannot be null after {nameof(ProjectInstance)} object creation."); 2638internal static ProjectInstance[] LoadSolutionForBuild( 2656ProjectInstance[] projectInstances = null; 2702private static ProjectInstance[] CalculateToolsVersionAndGenerateSolutionWrapper( 2728ProjectInstance[] projectInstances = null; 2776internal static ProjectInstance FactoryForDeserialization(ITranslator translator) 2993private static ProjectInstance[] GenerateSolutionWrapper( 3019ProjectInstance[] instances = SolutionProjectGenerator.Generate(sp, globalProperties, toolsVersion, projectBuildEventContext, loggingService, targetNames, sdkResolverService, submissionId); 3046private static ProjectInstance[] GenerateSolutionWrapperUsingOldOM( 3120ProjectInstance instance = new(projectRootElement, globalProperties, toolsVersion, buildParameters, loggingService, projectBuildEventContext, sdkResolverService, submissionId); 3502ProjectInstance projectInstance,
Instance\ProjectItemInstance.cs (30)
49private ProjectInstance _project; 70internal ProjectItemInstance(ProjectInstance project, string itemType, string includeEscaped, string definingFileEscaped) 82internal ProjectItemInstance(ProjectInstance project, string itemType, string includeEscaped, string includeBeforeWildcardExpansionEscaped, string definingFileEscaped) 101ProjectInstance project, 124internal ProjectItemInstance(ProjectInstance project, string itemType, string includeEscaped, IEnumerable<KeyValuePair<string, string>> directMetadata, string definingFileEscaped) 148private ProjectItemInstance(ProjectItemInstance that, ProjectInstance newProject) 158private ProjectItemInstance(ProjectInstance projectInstance) 169public ProjectInstance Project 638internal static ProjectItemInstance FactoryForDeserialization(ITranslator translator, ProjectInstance projectInstance) 696internal ProjectItemInstance DeepClone(ProjectInstance newProject) 728ProjectInstance projectToUse, 933ProjectInstance.VerifyThrowNotImmutable(_isImmutable); 959ProjectInstance.VerifyThrowNotImmutable(_isImmutable); 1056ProjectInstance.VerifyThrowNotImmutable(_isImmutable); 1154ProjectInstance.VerifyThrowNotImmutable(_isImmutable); 1173ProjectInstance.VerifyThrowNotImmutable(_isImmutable); 1468ProjectInstance.VerifyThrowNotImmutable(_isImmutable); 1479ProjectInstance.VerifyThrowNotImmutable(_isImmutable); 1490ProjectInstance.VerifyThrowNotImmutable(_isImmutable); 1536ProjectInstance.VerifyThrowNotImmutable(destinationAsTaskItem._isImmutable); 1851ProjectInstance.VerifyThrowNotImmutable(_isImmutable); 1972ProjectInstance.VerifyThrowNotImmutable(_isImmutable); 1989ProjectInstance.VerifyThrowNotImmutable(_isImmutable); 2010ProjectInstance.VerifyThrowNotImmutable(_isImmutable); 2029ProjectInstance.VerifyThrowNotImmutable(_isImmutable); 2040ProjectInstance.VerifyThrowNotImmutable(_isImmutable); 2055ProjectInstance.VerifyThrowNotImmutable(_isImmutable); 2217private ProjectInstance _project; 2224internal ProjectItemInstanceFactory(ProjectInstance project) 2232internal ProjectItemInstanceFactory(ProjectInstance project, string itemType)
Instance\ProjectPropertyInstance.cs (1)
76ProjectInstance.VerifyThrowNotImmutable(IsImmutable);
ObjectModelRemoting\DefinitionObjectsLinks\ProjectLink.cs (1)
234public abstract ProjectInstance CreateProjectInstance(ProjectInstanceSettings settings, EvaluationContext evaluationContext);
Microsoft.Build.Engine.OM.UnitTests (91)
Definition\DefinitionEditing_Tests.cs (1)
1829ProjectInstance instance = project.CreateProjectInstance();
Definition\Project_Tests.cs (7)
680ProjectInstance projectInstance = new ProjectInstance(xml); 718ProjectInstance projectInstance = new ProjectInstance(xml); 754ProjectInstance projectInstance = new ProjectInstance(xml); 792ProjectInstance projectInstance = new ProjectInstance(xml); 1764ProjectInstance projectInstance = project.CreateProjectInstance(); 3866var projectInstance = project.CreateProjectInstance(); 3878var newProjectInstance = project.CreateProjectInstance();
Definition\ProjectItem_Tests.cs (3)
952Should.Throw<InvalidProjectFileException>(() => { ProjectInstance.FromFile(testProjectFile, new ProjectOptions()); }); 963ProjectInstance.FromFile(testProjectFile, options); 3756var projectInstance = buildManager.GetProjectInstanceForBuild(project);
Definition\ProjectItemDefinition_Tests.cs (1)
453ProjectInstance instance = project.CreateProjectInstance();
Instance\ProjectInstance_Tests.cs (63)
39ProjectInstance i = p.CreateProjectInstance(); 50ProjectInstance p = GetSampleProjectInstance(); 62ProjectInstance p = GetSampleProjectInstance(); 82ProjectInstance p = GetEmptyProjectInstance(); 103ProjectInstance p = GetEmptyProjectInstance(); 124ProjectInstance p = GetEmptyProjectInstance(); 155ProjectInstance p = GetEmptyProjectInstance(); 167ProjectInstance p = GetEmptyProjectInstance(); 179ProjectInstance p = GetEmptyProjectInstance(); 189ProjectInstance p = GetEmptyProjectInstance(); 203ProjectInstance instance = p.CreateProjectInstance(); 221ProjectInstance first = GetSampleProjectInstance(); 222ProjectInstance second = first.DeepCopy(); 233ProjectInstance first = GetSampleProjectInstance(); 234ProjectInstance second = first.DeepCopy(); 261ProjectInstance project = GetProjectInstance(content); 304ProjectInstance projectInstance = GetProjectInstance(content); 326ProjectInstance first = GetSampleProjectInstance(); 327ProjectInstance second = first.DeepCopy(); 344ProjectInstance instance = new ProjectInstance(ProjectRootElement.Create()); 356ProjectInstance instance = new ProjectInstance(ProjectRootElement.Create()); 368ProjectInstance instance = new ProjectInstance(ProjectRootElement.Create()); 381ProjectInstance instance = new ProjectInstance(xml); 396ProjectInstance instance1 = new Project().CreateProjectInstance(); 426var projBInstance = projBEval.CreateProjectInstance(); 468var projBInstance = new ProjectInstance(projBEval, ProjectInstanceSettings.ImmutableWithFastItemLookup); 510var projBInstance = projBEval.CreateProjectInstance(); 667var instance = GetSampleProjectInstance(true /* immutable */); 678var instance = GetSampleProjectInstance(true /* immutable */); 689var instance = GetSampleProjectInstance(true /* immutable */); 700var instance = GetSampleProjectInstance(true /* immutable */); 711var instance = GetSampleProjectInstance(true /* immutable */); 722var instance = GetSampleProjectInstance(true /* immutable */); 733var instance = GetSampleProjectInstance(true /* immutable */); 744var instance = GetSampleProjectInstance(true /* immutable */); 755var instance = GetSampleProjectInstance(true /* immutable */); 766var instance = GetSampleProjectInstance(true /* immutable */); 777var instance = GetSampleProjectInstance(true /* immutable */); 788var instance = GetSampleProjectInstance(true /* immutable */); 799var instance = GetSampleProjectInstance(true /* immutable */); 810var instance = GetSampleProjectInstance(true /* immutable */); 821var instance = GetSampleProjectInstance(true /* immutable */); 832var instance = GetSampleProjectInstance(true /* immutable */); 844var instance = GetSampleProjectInstance(true /* immutable */); 856var instance = GetSampleProjectInstance(true /* immutable */); 867var protoInstance = GetSampleProjectInstance(true /* immutable */); 868var instance = protoInstance.DeepCopy(false /* mutable */); 886var protoInstance = GetSampleProjectInstance(false /* mutable */); 887var instance = protoInstance.DeepCopy(true /* immutable */); 908var protoInstance = GetSampleProjectInstance(true /* immutable */); 909var instance = protoInstance.DeepCopy(/* inherit */); 933var protoInstance = GetSampleProjectInstance(true /* immutable */); 934var instance = protoInstance.DeepCopy(true /* immutable */); 955var protoInstance = GetSampleProjectInstance(false /* mutable */); 956var instance = protoInstance.DeepCopy(/* inherit */); 972var protoInstance = GetSampleProjectInstance(false /* mutable */); 973var instance = protoInstance.DeepCopy(false /* mutable */); 986private static ProjectInstance GetSampleProjectInstance(bool isImmutable = false) 1015ProjectInstance p = GetProjectInstance(content, isImmutable); 1023private static ProjectInstance GetProjectInstance(string content, bool immutable = false) 1030ProjectInstance instance = immutable ? project.CreateProjectInstance(ProjectInstanceSettings.Immutable) : project.CreateProjectInstance(); 1038private static ProjectInstance GetEmptyProjectInstance() 1042ProjectInstance instance = project.CreateProjectInstance();
Instance\ProjectItemInstance_Tests.cs (4)
246ProjectInstance projectInstance = project.CreateProjectInstance(); 341ProjectInstance projectInstance = project.CreateProjectInstance(); 1166ProjectInstance project = new ProjectInstance(xml); 1188ProjectInstance projectInstance = project.CreateProjectInstance();
Instance\ProjectMetadataInstance_Tests.cs (1)
35ProjectInstance projectInstance = project.CreateProjectInstance();
Instance\ProjectOnErrorInstance_Tests.cs (1)
46ProjectInstance 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)
76ProjectInstance instance = project.CreateProjectInstance();
Instance\ProjectTaskOutputItemInstance_Tests.cs (1)
49ProjectInstance instance = project.CreateProjectInstance();
Instance\ProjectTaskOutputPropertyInstance_Tests.cs (1)
49ProjectInstance instance = project.CreateProjectInstance();
ObjectModelRemoting\RemoteProjectsProviderMock\EvaluationLinkMocks\MockProjectLink.cs (1)
185public override ProjectInstance CreateProjectInstance(ProjectInstanceSettings settings, EvaluationContext evaluationContext) => throw new NotImplementedException();
Microsoft.Build.Engine.UnitTests (360)
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 (30)
310ProjectInstance instance = CreateProjectInstance(contents2, null, _projectCollection, true); 354ProjectInstance rootProject = GenerateDummyProjects(shutdownProjectDirectory, numberOfParallelProjectsToBuild, projectCollection); 1777ProjectInstance 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); 3619private ProjectInstance CreateProjectInstance(string contents, string toolsVersion, ProjectCollection projectCollection, bool deleteTempProject) 3661private static ProjectInstance GenerateDummyProjects(string shutdownProjectDirectory, int parallelProjectCount, ProjectCollection projectCollection) 3750var mainInstance = mainProject.CreateProjectInstance(ProjectInstanceSettings.Immutable).DeepCopy(isImmutable: false); 3777var p2pInstance = p2pProject.CreateProjectInstance(ProjectInstanceSettings.Immutable).DeepCopy(isImmutable: false); 3902ProjectInstance instance = project.CreateProjectInstance(ProjectInstanceSettings.Immutable).DeepCopy(false); 4456ProjectInstance instance = _buildManager.GetProjectInstanceForBuild(project);
BackEnd\BuildRequestConfiguration_Tests.cs (8)
187ProjectInstance projectInstance = project.CreateProjectInstance(); 285ProjectInstance instance = project.CreateProjectInstance(); 362ProjectInstance instance = project.CreateProjectInstance(); 464ProjectInstance instance = project.CreateProjectInstance(); 567var projectInstance = project.CreateProjectInstance(); 596ProjectInstance instance = project.CreateProjectInstance(); 634ProjectInstance instance = project.CreateProjectInstance(); 666ProjectInstance instance = project.CreateProjectInstance();
BackEnd\BuildRequestEngine_Tests.cs (1)
234private ProjectInstance CreateStandinProject()
BackEnd\IntrinsicTask_Tests.cs (17)
1278ProjectInstance p = project.CreateProjectInstance(); 1311ProjectInstance p = project.CreateProjectInstance(); 2298ProjectInstance p = project.CreateProjectInstance(); 2332ProjectInstance p = project.CreateProjectInstance(); 2369ProjectInstance p = project.CreateProjectInstance(); 2406ProjectInstance p = project.CreateProjectInstance(); 2443ProjectInstance p = project.CreateProjectInstance(); 2481ProjectInstance p = project.CreateProjectInstance(); 2512ProjectInstance p = project.CreateProjectInstance(); 3199ProjectInstance p = project.CreateProjectInstance(); 3245ProjectInstance p = project.CreateProjectInstance(); 3541ProjectInstance instance = new ProjectInstance(xml); 3913private static Lookup GenerateLookupWithItemsAndProperties(ProjectInstance project) 3922private static Lookup GenerateLookup(ProjectInstance project) 3927private static Lookup GenerateLookup(ProjectInstance project, PropertyDictionary<ProjectPropertyInstance> properties) 3958ProjectInstance projectInstance = project.CreateProjectInstance(); 3993var projectInstance = project.CreateProjectInstance();
BackEnd\Lookup_Tests.cs (30)
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(); 1296ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 1356ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 1413ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 1457ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 1511ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 1551ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance();
BackEnd\MSBuild_Tests.cs (8)
143ProjectInstance pi = p.CreateProjectInstance(); 556ProjectInstance pi = p.CreateProjectInstance(); 625ProjectInstance pi = p.CreateProjectInstance(); 932ProjectInstance pi = p.CreateProjectInstance(); 1052ProjectInstance pi = p.CreateProjectInstance(); 1121ProjectInstance pi = p.CreateProjectInstance(); 1188ProjectInstance pi = p.CreateProjectInstance(); 1803ProjectInstance pi = p.CreateProjectInstance();
BackEnd\OnError_Tests.cs (1)
113ProjectInstance p = project.CreateProjectInstance();
BackEnd\SdkResultOutOfProc_Tests.cs (3)
109ProjectInstance projectInstance = CreateProjectInstance(projectPath, MSBuildDefaultToolsVersion, _projectCollection); 154ProjectInstance projectInstance = CreateProjectInstance(entryProjectPath, MSBuildDefaultToolsVersion, _projectCollection); 197private ProjectInstance CreateProjectInstance(string projectPath, string toolsVersion, ProjectCollection projectCollection)
BackEnd\TargetBuilder_Tests.cs (36)
103ProjectInstance project = CreateTestProject(); 123ProjectInstance project = CreateTestProject(); 150ProjectInstance project = CreateTestProject(); 173ProjectInstance project = CreateTestProject(); 365ProjectInstance project = CreateTestProject(projectBody); 505ProjectInstance project = CreateTestProject(projectBody); 531ProjectInstance project = CreateTestProject(projectBody); 557ProjectInstance project = CreateTestProject(projectBody); 587ProjectInstance project = CreateTestProject(projectBody); 622ProjectInstance project = CreateTestProject(projectBody); 654ProjectInstance project = CreateTestProject(projectBody); 685ProjectInstance project = CreateTestProject(projectBody); 711ProjectInstance project = CreateTestProject(projectBody); 747ProjectInstance project = CreateTestProject(projectBody); 773ProjectInstance project = CreateTestProject(projectBody); 800ProjectInstance project = CreateTestProject(projectBody); 830ProjectInstance project = CreateTestProject(projectBody); 874ProjectInstance project = CreateTestProject(projectBody); 901ProjectInstance project = CreateTestProject(projectBody); 928ProjectInstance project = CreateTestProject(projectBody); 960ProjectInstance project = CreateTestProject(projectBody); 1058ProjectInstance project = CreateTestProject(projectBody); 1093ProjectInstance project = CreateTestProject(projectBody); 1144ProjectInstance project = CreateTestProject(projectBody); 1204ProjectInstance project = CreateTestProject(projectBody); 1246ProjectInstance project = CreateTestProject(projectBody); 1292ProjectInstance project = CreateTestProject(projectBody); 1323ProjectInstance project = CreateTestProject(projectBody); 1397ProjectInstance project = CreateTestProject(projectBody); 1427var project = CreateTestProject(projectContents, string.Empty, "Build"); 1455var project = CreateTestProject(projectContents, string.Empty, "Build"); 1574private Lookup CreateStandardLookup(ProjectInstance project) 1584private ProjectInstance CreateTestProject() 1652private ProjectInstance CreateTestProject(string projectBodyContents) 1660private ProjectInstance CreateTestProject(string projectBodyContents, string initialTargets, string defaultTargets) 1709ProjectInstance project = CreateTestProject(projectBody);
BackEnd\TargetEntry_Tests.cs (23)
89ProjectInstance project = CreateTestProject(true /* Returns enabled */); 104ProjectInstance project = CreateTestProject(true /* Returns enabled */); 118ProjectInstance project = CreateTestProject(true /* Returns enabled */); 132ProjectInstance project = CreateTestProject(true /* Returns enabled */); 145ProjectInstance project = CreateTestProject(true /* Returns enabled */); 159ProjectInstance project = CreateTestProject(true /* Returns enabled */); 173ProjectInstance project = CreateTestProject(returnsEnabledForThisProject); 210ProjectInstance project = CreateTestProject(returnsEnabledForThisProject); 252ProjectInstance project = CreateTestProject(returnsEnabledForThisProject); 317ProjectInstance project = CreateTestProject(returnsEnabledForThisProject); 346ProjectInstance project = CreateTestProject(returnsEnabledForThisProject); 452ProjectInstance project = CreateTestProject(returnsEnabledForThisProject); 478ProjectInstance project = CreateTestProject(true /* returns are enabled */); 496ProjectInstance project = CreateTestProject(true /* returns are enabled */); 515ProjectInstance project = CreateTestProject(returnsEnabledForThisProject); 533ProjectInstance project = CreateTestProject(returnsEnabledForThisProject); 551ProjectInstance project = CreateTestProject(returnsEnabledForThisProject); 569ProjectInstance project = CreateTestProject(returnsEnabledForThisProject); 587ProjectInstance project = CreateTestProject(returnsEnabledForThisProject); 896private void ExecuteEntry(ProjectInstance project, TargetEntry entry) 919private TargetEntry CreateStandardTargetEntry(ProjectInstance project, string targetName) 937private TargetEntry CreateStandardTargetEntry(ProjectInstance project, string target, TargetEntry baseEntry) 950private ProjectInstance CreateTestProject(bool returnsAttributeEnabled)
BackEnd\TargetUpToDateChecker_Tests.cs (4)
171ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 208ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 252ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 611ProjectInstance p = project.CreateProjectInstance();
BackEnd\TaskExecutionHost_Tests.cs (4)
984ProjectInstance project = CreateTestProject(); 1014ProjectInstance project = CreateTestProject(); 1246ProjectInstance project = CreateTestProject(); 1499private ProjectInstance CreateTestProject()
BackEnd\TaskHostCallback_Tests.cs (7)
53ProjectInstance projectInstance = new(project.ProjectFile); 128ProjectInstance projectInstance = new(project.ProjectFile); 159ProjectInstance projectInstance = new(project.ProjectFile); 349ProjectInstance projectInstance = new(project.ProjectFile); 388ProjectInstance projectInstance = new(project.ProjectFile); 434ProjectInstance projectInstance = new(project.ProjectFile); 474ProjectInstance projectInstance = new(project.ProjectFile);
BackEnd\TaskHostFactory_Tests.cs (4)
73ProjectInstance projectInstance = new(project.Path); 178ProjectInstance projectInstance = new(project.Path); 331ProjectInstance projectInstance = new(project.ProjectFile); 390ProjectInstance projectInstance = new(project.Path);
BackEnd\TaskRegistry_Tests.cs (1)
2067ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance();
Collections\OMcollections_tests.cs (2)
311ProjectInstance projectInstance = project.CreateProjectInstance(); 323ProjectInstance projectInstance = project.CreateProjectInstance();
Construction\SolutionFilter_Tests.cs (1)
142ProjectInstance[] instances = SolutionProjectGenerator.Generate(solution, null, null, _buildEventContext, mockLogger);
Construction\SolutionProjectGenerator_Tests.cs (43)
77ProjectInstance[] instances = SolutionProjectGenerator.Generate(SolutionFile.Parse(sln.Path), null, null, _buildEventContext, CreateMockLoggingService()); 107ProjectInstance[] instances = SolutionProjectGenerator.Generate(SolutionFile.Parse(solutionPath), null, null, _buildEventContext, CreateMockLoggingService()); 403ProjectInstance[] instances = SolutionProjectGenerator.Generate(solution, null, "3.5", _buildEventContext, CreateMockLoggingService()); 444ProjectInstance[] instances = SolutionProjectGenerator.Generate(solution, null, "3.5", _buildEventContext, CreateMockLoggingService()); 474ProjectInstance[] instances = SolutionProjectGenerator.Generate(solution, null, null, _buildEventContext, CreateMockLoggingService()); 521ProjectInstance[] instances = SolutionProjectGenerator.Generate(solution, null, null, _buildEventContext, CreateMockLoggingService()); 562ProjectInstance[] instances = SolutionProjectGenerator.Generate(solution, null, null, _buildEventContext, CreateMockLoggingService()); 675ProjectInstance[] instances = SolutionProjectGenerator.Generate(sp, null, null, _buildEventContext, CreateMockLoggingService()); 697ProjectInstance[] instances1 = SolutionProjectGenerator.Generate(sp1, null, null, _buildEventContext, CreateMockLoggingService()); 761ProjectInstance[] instances = SolutionProjectGenerator.Generate(sp, null, null, _buildEventContext, CreateMockLoggingService()); 823ProjectInstance[] instances = SolutionProjectGenerator.Generate(sp, null, null, _buildEventContext, CreateMockLoggingService()); 1097var projectBravoMetaProject = instances[1]; 1321var instance = SolutionProjectGenerator.Generate(solution, null, ObjectModelHelpers.MSBuildDefaultToolsVersion, _buildEventContext, CreateMockLoggingService())[0]; 1393ProjectInstance[] instances = SolutionProjectGenerator.Generate(solution, null, ObjectModelHelpers.MSBuildDefaultToolsVersion, _buildEventContext, CreateMockLoggingService()); 1396foreach (ProjectInstance instance in instances) 1477ProjectInstance[] instances = SolutionProjectGenerator.Generate(solution, null, solutionToolsVersion, _buildEventContext, CreateMockLoggingService()); 1542ProjectInstance[] instances = SolutionProjectGenerator.Generate(solution, null, "invalid", _buildEventContext, CreateMockLoggingService()); 1588ProjectInstance[] instances = SolutionProjectGenerator.Generate(solution, null, null, BuildEventContext.Invalid, CreateMockLoggingService()); 1669ProjectInstance[] instances = SolutionProjectGenerator.Generate(solution, null, null, BuildEventContext.Invalid, CreateMockLoggingService()); 1701ProjectInstance[] instances = SolutionProjectGenerator.Generate(solution, null, null, BuildEventContext.Invalid, CreateMockLoggingService()); 1728ProjectInstance msbuildProject = CreateVenusSolutionProject(globalProperties, useNewParser); 1759ProjectInstance msbuildProject = CreateVenusSolutionProject(useNewParser); 1798ProjectInstance msbuildProject = CreateVenusSolutionProject("2.0", useNewParser); 1826ProjectInstance msbuildProject = CreateVenusSolutionProject(useNewParser); 1854ProjectInstance msbuildProject = CreateVenusSolutionProject(useNewParser); 1965ProjectInstance[] instances = SolutionProjectGenerator.Generate(solution, null, null, BuildEventContext.Invalid, CreateMockLoggingService()); 2026ProjectInstance[] instances = SolutionProjectGenerator.Generate(solution, null, null, BuildEventContext.Invalid, CreateMockLoggingService()); 2111ProjectInstance[] instances = SolutionProjectGenerator.Generate(solution, globalProperties, null, BuildEventContext.Invalid, CreateMockLoggingService()); 2112ProjectInstance msbuildProject = instances[0]; 2383ProjectInstance[] instances = SolutionProjectGenerator.Generate(solution, globalProperties, null, BuildEventContext.Invalid, collection.LoggingService); 2589ProjectInstance[] instances = SolutionProjectGenerator.Generate(solution, null, null, BuildEventContext.Invalid, CreateMockLoggingService(), new List<string> { "One" }); 2648ProjectInstance[] instances = SolutionProjectGenerator.Generate(solution, null, null, BuildEventContext.Invalid, CreateMockLoggingService(), null); 2701ProjectInstance[] instances; 2788ProjectInstance projectInstance = SolutionProjectGenerator.Generate(solutionFile, null, null, BuildEventContext.Invalid, CreateMockLoggingService(), new[] { "MyTarget" }).FirstOrDefault(); 2849ProjectInstance projectInstance = SolutionProjectGenerator.Generate(solutionFile, null, null, BuildEventContext.Invalid, CreateMockLoggingService(), targetsToBuild).FirstOrDefault(); 2966ProjectInstance projectInstance = SolutionProjectGenerator.Generate(solutionFile, globalProperties, null, BuildEventContext.Invalid, CreateMockLoggingService(), new[] { "Build" }).FirstOrDefault(); 3010private ProjectInstance CreateVenusSolutionProject(bool useNewParser) 3018private ProjectInstance CreateVenusSolutionProject(IDictionary<string, string> globalProperties, bool useNewParser) 3026private ProjectInstance CreateVenusSolutionProject(string toolsVersion, bool useNewParser) 3037private ProjectInstance CreateVenusSolutionProject(IDictionary<string, string> globalProperties, string toolsVersion, bool useNewParser) 3079ProjectInstance[] instances = SolutionProjectGenerator.Generate(solution, globalProperties, toolsVersion, BuildEventContext.Invalid, CreateMockLoggingService()); 3098private void AssertProjectContainsItem(ProjectInstance msbuildProject, string itemType, string include) 3118private 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)
20internal static ProjectInstance CreateEmptyProjectInstance() 26ProjectInstance instance = project.CreateProjectInstance();
Definition\ToolsVersion_Tests.cs (8)
636ProjectInstance pi = projectFromString.Project.CreateProjectInstance(); 670ProjectInstance pi = projectFromString.Project.CreateProjectInstance(); 707ProjectInstance pi = projectFromString.Project.CreateProjectInstance(); 748ProjectInstance pi = projectFromString.Project.CreateProjectInstance(); 792ProjectInstance pi = new ProjectInstance(projectFromString.Project.Xml, null /* no global properties */, null /* don't explicitly set the toolsversion */, p); 826ProjectInstance pi = new ProjectInstance(projectFromString.Project.Xml, null /* no global properties */, null /* don't explicitly set the toolsversion */, p); 862ProjectInstance pi = new ProjectInstance(projectFromString.Project.Xml, null /* no global properties */, null /* don't explicitly set the toolsversion */, p); 902ProjectInstance pi = new ProjectInstance(projectFromString.Project.Xml, null /* no global properties */, null /* don't explicitly set the toolsversion */, p);
EscapingInProjects_Tests.cs (1)
649ProjectInstance projectInstance = project.CreateProjectInstance();
Evaluation\Evaluator_Tests.cs (5)
484ProjectInstance project = new ProjectInstance(subdirProjPath); 1462ProjectInstance instance = project.CreateProjectInstance(); 2349ProjectInstance instance = project.CreateProjectInstance(); 2374ProjectInstance instance = project.CreateProjectInstance(); 2398ProjectInstance instance = project.CreateProjectInstance();
Evaluation\Expander_Tests.cs (23)
89ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 146ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 181ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 201ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 221ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 242ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 259ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 285ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 696ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 734ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 754ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 774ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 792ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 841ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 1402ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 1615ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 3975ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 4909ProjectInstance projectInstance = new ProjectInstance(projectFile.Path); 4953ProjectInstance projectInstance = new ProjectInstance(projectFile.Path); 4982ProjectInstance projectInstance = new ProjectInstance(projectFile.Path); 5029ProjectInstance projectInstance = new ProjectInstance(projectFile.Path); 5070ProjectInstance projectInstance = new ProjectInstance(projectFile.Path); 5104ProjectInstance projectInstance = new ProjectInstance(projectFile.Path);
Evaluation\ItemSpec_Tests.cs (1)
103var dummyProject = ProjectHelpers.CreateEmptyProjectInstance();
Evaluation\SdkResultEvaluation_Tests.cs (2)
537var instance = project.CreateProjectInstance(); 587var instance = project.CreateProjectInstance();
EvaluationProfiler_Tests.cs (1)
280var projectInstance = _buildManager.GetProjectInstanceForBuild(project);
ExpressionTree_Tests.cs (6)
182ProjectInstance parentProject = new ProjectInstance(ProjectRootElement.Create()); 212ProjectInstance parentProject = new ProjectInstance(ProjectRootElement.Create()); 247ProjectInstance parentProject = new ProjectInstance(ProjectRootElement.Create()); 279ProjectInstance parentProject = new ProjectInstance(ProjectRootElement.Create()); 296ProjectInstance parentProject = new ProjectInstance(ProjectRootElement.Create()); 325ProjectInstance parentProject = new ProjectInstance(ProjectRootElement.Create());
ExpressionTreeExpression_Tests.cs (1)
373ProjectInstance parentProject = new ProjectInstance(xml);
Graph\ProjectGraph_Tests.cs (2)
134var projectInstance = new Project().CreateProjectInstance(); 181var projectInstance = new Project().CreateProjectInstance();
Instance\HostServices_Tests.cs (3)
390ProjectInstance project = CreateDummyProject("foo.proj"); 474public ProjectInstance CreateDummyProject(string fileName) 485ProjectInstance instance = project.CreateProjectInstance();
Instance\ProjectInstance_Internal_Tests.cs (57)
69ProjectInstance project = new Project(projectRootElementFromString.Project).CreateProjectInstance(); 117ProjectInstance project = new Project(projectRootElementFromString.Project).CreateProjectInstance(); 143ProjectInstance project = projectFromString.Project.CreateProjectInstance(); 171ProjectInstance p = GetProjectInstance(content); 209ProjectInstance p = GetProjectInstance(content); 255ProjectInstance p = GetSampleProjectInstance(); 266ProjectInstance p = GetSampleProjectInstance(); 278ProjectInstance p = GetSampleProjectInstance(); 287var projectInstance = new ProjectInstance( 301ProjectInstance first = GetSampleProjectInstance(null, null, projectCollection, toolsVersion: "TESTTV"); 302ProjectInstance second = first.DeepCopy(); 321ProjectInstance p = GetSampleProjectInstance(null, null, collection); 355ProjectInstance p = GetSampleProjectInstance(null, null, collection); 383ProjectInstance p = GetSampleProjectInstance(null, globalProperties, collection); 424ProjectInstance p = new ProjectInstance(xml, globalProperties, ObjectModelHelpers.MSBuildDefaultToolsVersion, "ABCDEF", collection); 442ProjectInstance p = GetSampleProjectInstance(); 453ProjectInstance p = GetSampleProjectInstance(); 466ProjectInstance first = GetSampleProjectInstance(hostServices); 467ProjectInstance second = first.DeepCopy(); 486ProjectInstance first = GetSampleProjectInstance(); 487ProjectInstance second = first.DeepCopy(); 499ProjectInstance first = GetSampleProjectInstance(); 500ProjectInstance second = first.DeepCopy(); 512ProjectInstance first = GetSampleProjectInstance(); 513ProjectInstance second = first.DeepCopy(); 524ProjectInstance first = GetSampleProjectInstance(); 525ProjectInstance second = first.DeepCopy(); 536ProjectInstance first = GetSampleProjectInstance(); 537ProjectInstance second = first.DeepCopy(); 548ProjectInstance first = GetSampleProjectInstance(); 551ProjectInstance second = first.DeepCopy(); 579ProjectInstance projectInstance = GetProjectInstance(projectFileContent); 690var original = new ProjectInstance(rootElement); 695var copy = ProjectInstance.FactoryForDeserialization(TranslationHelpers.GetReadTranslator()); 700public delegate ProjectInstance ProjectInstanceFactory(string file, ProjectRootElement xml, ProjectCollection collection); 713(f, xml, c) => ProjectInstance.FromFile(f, new ProjectOptions { ProjectCollection = c }) 737(f, xml, c) => ProjectInstance.FromProjectRootElement(xml, new ProjectOptions { ProjectCollection = c }) 745var pi = new ProjectInstance(f, null, null, c); 750var copy = ProjectInstance.FactoryForDeserialization(TranslationHelpers.GetReadTranslator()); 769var projectInstance = projectInstanceFactory.Invoke(file, xml, projectCollection); 783ProjectInstance projectInstance = new ProjectInstance(rootElement); 819ProjectInstance projectInstance = new ProjectInstance(rootElement); 863ProjectInstance projectInstance = useDirectConstruction 897ProjectInstance projectInstance = ProjectInstance.FromFile( 925ProjectInstance projectInstance = ProjectInstance.FromProjectRootElement( 940private static ProjectInstance GetProjectInstance(string content) 948private static ProjectInstance GetProjectInstance(string content, HostServices hostServices) 956private static ProjectInstance GetProjectInstance(string content, HostServices hostServices, IDictionary<string, string> globalProperties, ProjectCollection projectCollection, string toolsVersion = null) 969ProjectInstance instance = project.CreateProjectInstance(); 977private static ProjectInstance GetSampleProjectInstance() 985private static ProjectInstance GetSampleProjectInstance(HostServices hostServices) 993private static ProjectInstance GetSampleProjectInstance(HostServices hostServices, IDictionary<string, string> globalProperties, ProjectCollection projectCollection, string toolsVersion = null) 1018ProjectInstance 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();
InstanceFromRemote\FakeProjectLink.cs (1)
87public override ProjectInstance CreateProjectInstance(ProjectInstanceSettings settings, EvaluationContext evaluationContext) => throw new NotImplementedException();
InstanceFromRemote\ProjectInstance_FromImmutableProjectLink_Tests.cs (8)
26ProjectInstance instance = ProjectInstance.FromImmutableProjectSource(project, ProjectInstanceSettings.ImmutableWithFastItemLookup); 44ProjectInstance instance = ProjectInstance.FromImmutableProjectSource(project, ProjectInstanceSettings.ImmutableWithFastItemLookup); 65ProjectInstance instance = ProjectInstance.FromImmutableProjectSource(project, ProjectInstanceSettings.ImmutableWithFastItemLookup); 100ProjectInstance instance = ProjectInstance.FromImmutableProjectSource(project, ProjectInstanceSettings.ImmutableWithFastItemLookup);
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); 429var instance = CreateProjectInstance(xmlReader); 458var instance = CreateProjectInstance(xmlReader); 482var instance = CreateProjectInstance(xmlReader); 509var instance = CreateProjectInstance(xmlReader); 534var instance = CreateProjectInstance(xmlReader); 558var instance = CreateProjectInstance(xmlReader); 584var instance = CreateProjectInstance(xmlReader); 605var instance = CreateProjectInstance(xmlReader); 630var instance = CreateProjectInstance(xmlReader); 656var instance = CreateProjectInstance(xmlReader); 695var instance = CreateProjectInstance(xmlReader); 752var instance = CreateProjectInstance(xmlReader); 813var instance = CreateProjectInstance(xmlReader); 875var instance = CreateProjectInstance(xmlReader); 893var instance = CreateProjectInstance(xmlReader); 910var instance = CreateProjectInstance(xmlReader); 925private static ProjectInstance CreateProjectInstance(XmlReader reader)
Microsoft.Build.Tasks.UnitTests (9)
AssignLinkMetadata_Tests.cs (1)
181ProjectInstance pi = p.CreateProjectInstance();
CallTarget_Tests.cs (1)
176ProjectInstance instance = project.CreateProjectInstance();
Exec_Tests.cs (2)
980var project = collection.LoadProject(testProject.ProjectFile).CreateProjectInstance(); 1037var project = collection.LoadProject(testProject.ProjectFile).CreateProjectInstance();
ResolveSDKReference_Tests.cs (5)
3811ProjectInstance project = pc.LoadProject(testProjectFile).CreateProjectInstance(); 3954ProjectInstance project = pc.LoadProject(testProjectFile).CreateProjectInstance(); 4063ProjectInstance project = pc.LoadProject(testProjectFile).CreateProjectInstance(); 4160ProjectInstance project = pc.LoadProject(testProjectFile).CreateProjectInstance(); 4329ProjectInstance project = pc.LoadProject(testProjectFile).CreateProjectInstance();
Microsoft.Build.UnitTests.Shared (3)
MockEngine.cs (1)
338ProjectInstance instance = _projectCollection.LoadProject(projectFileNames[i], finalGlobalProperties, null).CreateProjectInstance();
ObjectModelHelpers.cs (2)
1498var p = ProjectInstance.FromFile(testProjectFile, new ProjectOptions());
Microsoft.Build.Utilities.UnitTests (7)
MuxLogger_Tests.cs (7)
52ProjectInstance project = (projectFromString.Project).CreateProjectInstance(); 95ProjectInstance project = projectFromString.Project.CreateProjectInstance(); 147ProjectInstance project = (projectFromString.Project).CreateProjectInstance(); 200ProjectInstance project1 = projectFromString1.Project.CreateProjectInstance(); 201ProjectInstance project2 = projectFromString2.Project.CreateProjectInstance(); 256ProjectInstance project = (projectFromString.Project).CreateProjectInstance(); 305ProjectInstance project = (projectFromString.Project).CreateProjectInstance();
Microsoft.CodeAnalysis.ExternalAccess.HotReload (2)
Api\HotReloadMSBuildWorkspace.cs (1)
32public HotReloadMSBuildWorkspace(ILogger logger, Func<string, (ImmutableArray<MSB.Execution.ProjectInstance> instances, MSB.Evaluation.Project? project)> getBuildProjects)
Api\HotReloadMSBuildWorkspace.ProjectFileInfoProvider.cs (1)
18Func<string, (ImmutableArray<MSB.Execution.ProjectInstance> instances, MSB.Evaluation.Project? project)> getBuildProjects,
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (38)
Build\ProjectBuildManager.cs (6)
292public async Task<MSB.Execution.ProjectInstance[]> BuildProjectInstancesAsync( 312var results = new List<MSB.Execution.ProjectInstance>(targetFrameworks.Length); 318var projectInstance = await BuildProjectInstanceAsync(project, log, cancellationToken).ConfigureAwait(false); 336private Task<MSB.Execution.ProjectInstance> BuildProjectInstanceAsync( 347private async Task<MSB.Execution.ProjectInstance> BuildProjectInstanceAsync( 352var projectInstance = project.CreateProjectInstance();
MSBuild\CSharp\CSharpCommandLineArgumentReader.cs (2)
11private CSharpCommandLineArgumentReader(MSB.Execution.ProjectInstance project) 16public static string[] Read(MSB.Execution.ProjectInstance project)
MSBuild\CSharp\CSharpProjectCommandLineReader.cs (2)
17public override IEnumerable<MSB.Framework.ITaskItem> GetCompilerCommandLineArgs(MSB.Execution.ProjectInstance executedProject) 20public override string[] ReadCommandLineArgs(MSB.Execution.ProjectInstance project)
MSBuild\ProjectFile\CommandLineArgumentReader.cs (2)
15protected readonly MSB.Execution.ProjectInstance Project; 18protected CommandLineArgumentReader(MSB.Execution.ProjectInstance project)
MSBuild\ProjectFile\Extensions.cs (16)
15public static IEnumerable<MSB.Framework.ITaskItem> GetAdditionalFiles(this MSB.Execution.ProjectInstance executedProject) 18public static IEnumerable<MSB.Framework.ITaskItem> GetAnalyzers(this MSB.Execution.ProjectInstance executedProject) 21public static IEnumerable<MSB.Framework.ITaskItem> GetDocuments(this MSB.Execution.ProjectInstance executedProject) 24public static IEnumerable<MSB.Framework.ITaskItem> GetEditorConfigFiles(this MSB.Execution.ProjectInstance executedProject) 27public static IEnumerable<MetadataReferenceItem> GetMetadataReferences(this MSB.Execution.ProjectInstance project) 38public static string GetAbsolutePath(this MSB.Execution.ProjectInstance project, string path) 45public static IEnumerable<ProjectFileReference> GetProjectReferences(this MSB.Execution.ProjectInstance executedProject) 50public static PackageReferenceItem[] GetPackageReferences(this MSB.Execution.ProjectInstance executedProject) 89public static string? ReadPropertyString(this MSB.Execution.ProjectInstance executedProject, string propertyName) 92public static bool ReadPropertyBool(this MSB.Execution.ProjectInstance executedProject, string propertyName) 95public static int ReadPropertyInt(this MSB.Execution.ProjectInstance executedProject, string propertyName) 98public static int ReadCodePage(this MSB.Execution.ProjectInstance executedProject) 101public static ulong ReadPropertyULong(this MSB.Execution.ProjectInstance executedProject, string propertyName) 104public static TEnum? ReadPropertyEnum<TEnum>(this MSB.Execution.ProjectInstance executedProject, string propertyName, bool ignoreCase) 108public static string ReadItemsAsString(this MSB.Execution.ProjectInstance executedProject, string itemType) 121public static IEnumerable<MSB.Framework.ITaskItem> GetTaskItems(this MSB.Execution.ProjectInstance executedProject, string itemType)
MSBuild\ProjectFile\ProjectCommandLineReader.cs (2)
17public abstract IEnumerable<MSB.Framework.ITaskItem> GetCompilerCommandLineArgs(MSB.Execution.ProjectInstance executedProject); 18public abstract string[] ReadCommandLineArgs(MSB.Execution.ProjectInstance project);
MSBuild\ProjectFile\ProjectInstanceReader.cs (4)
18public readonly MSB.Execution.ProjectInstance _projectInstance; 27MSB.Execution.ProjectInstance projectInstance, 153private static string[] GetContentFiles(MSB.Execution.ProjectInstance project) 162private string[] TryGetCommandLineArgs(MSB.Execution.ProjectInstance project)
MSBuild\VisualBasic\VisualBasicCommandLineArgumentReader.cs (2)
13public VisualBasicCommandLineArgumentReader(MSB.Execution.ProjectInstance project) 18public static string[] Read(MSB.Execution.ProjectInstance project)
MSBuild\VisualBasic\VisualBasicProjectCommandLineReader.cs (2)
17public override IEnumerable<MSB.Framework.ITaskItem> GetCompilerCommandLineArgs(MSB.Execution.ProjectInstance executedProject) 20public override string[] ReadCommandLineArgs(MSB.Execution.ProjectInstance project)
MSBuild (2)
JsonOutputFormatter.cs (1)
46internal void AddItemInstancesInJsonFormat(string[] itemNames, ProjectInstance project)
XMake.cs (1)
1142ProjectInstance builtProject = result.ProjectStateAfterBuild;
MSBuild.Benchmarks (4)
DefiningProjectModifiersBenchmark.cs (2)
27private ProjectInstance _singleProjectInstance = null!; 28private ProjectInstance _multiProjectInstance = null!;
ItemSpecModifiersCachingBenchmark.cs (1)
28private ProjectInstance _projectInstance = null!;
LookupGetItemsBenchmark.cs (1)
41private ProjectInstance _project = null!;