60 instantiations of ProjectInstance
Microsoft.Build (15)
BackEnd\BuildManager\BuildManager.cs (1)
1967return new ProjectInstance(
BackEnd\Shared\BuildRequestConfiguration.cs (1)
483return new ProjectInstance(
Construction\Solution\SolutionProjectGenerator.cs (2)
990var traversalInstance = new ProjectInstance( 1227ProjectInstance metaprojectInstance = new ProjectInstance(EscapingUtilities.UnescapeAll(GetMetaprojectName(project)), traversalProject, GetMetaprojectGlobalProperties(traversalProject));
Definition\Project.cs (1)
3713return 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); 2668return new ProjectInstance(translator); 3005ProjectInstance 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)
345ProjectInstance instance = new ProjectInstance(ProjectRootElement.Create()); 357ProjectInstance instance = new ProjectInstance(ProjectRootElement.Create()); 369ProjectInstance instance = new ProjectInstance(ProjectRootElement.Create()); 382ProjectInstance instance = new ProjectInstance(xml); 469var projBInstance = new ProjectInstance(projBEval, ProjectInstanceSettings.ImmutableWithFastItemLookup);
Instance\ProjectItemInstance_Tests.cs (1)
1166ProjectInstance project = new ProjectInstance(xml);
Microsoft.Build.Engine.UnitTests (35)
BackEnd\BuildManager_Tests.cs (1)
3659return 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)
78configuration.Project = new ProjectInstance(ProjectRootElement.Create());
BackEnd\TaskHostFactory_Tests.cs (2)
44ProjectInstance projectInstance = new(project.Path); 172ProjectInstance projectInstance = new(project.ProjectFile);
Definition\ToolsVersion_Tests.cs (2)
791ProjectInstance pi = new ProjectInstance(projectFromString.Project.Xml, null /* no global properties */, null /* don't explicitly set the toolsversion */, p); 901ProjectInstance 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)
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)
288var projectInstance = new ProjectInstance( 425ProjectInstance p = new ProjectInstance(xml, globalProperties, ObjectModelHelpers.MSBuildDefaultToolsVersion, "ABCDEF", collection); 691var original = new ProjectInstance(rootElement); 708(f, xml, c) => new ProjectInstance(f, null, null, c) 726(f, xml, c) => new ProjectInstance(f, null, null, c).DeepCopy() 732(f, xml, c) => new ProjectInstance(xml, null, null, c) 746var pi = new ProjectInstance(f, null, null, c); 784ProjectInstance projectInstance = new ProjectInstance(rootElement); 820ProjectInstance projectInstance = new ProjectInstance(rootElement); 865? new ProjectInstance(rootElement, globalProperties: null, toolsVersion: null, buildParameters, projectCollection.LoggingService, buildEventContext, sdkResolverService: null, 0)
674 references to ProjectInstance
Microsoft.Build (174)
BackEnd\BuildManager\BuildManager.cs (6)
191private readonly Dictionary<ProjectInstance, string> _unnamedProjectInstanceToNames; 305_unnamedProjectInstanceToNames = new Dictionary<ProjectInstance, string>(); 889public ProjectInstance GetProjectInstanceForBuild(Project project) 1304ProjectInstance? projectInstance = submission.BuildRequestData.ProjectInstance; 1535var instances = ProjectInstance.LoadSolutionForBuild( 1580ProjectInstance newInstance = project.CreateProjectInstance();
BackEnd\BuildManager\BuildRequestData.cs (6)
21public BuildRequestData(ProjectInstance projectInstance, string[] targetsToBuild) 32public BuildRequestData(ProjectInstance projectInstance, string[] targetsToBuild, HostServices hostServices) 44public BuildRequestData(ProjectInstance projectInstance, string[] targetsToBuild, HostServices? hostServices, BuildRequestDataFlags flags) 57public BuildRequestData(ProjectInstance projectInstance, string[] targetsToBuild, HostServices? hostServices, BuildRequestDataFlags flags, IEnumerable<string>? propertiesToTransfer) 86public BuildRequestData(ProjectInstance projectInstance, string[] targetsToBuild, HostServices? hostServices, BuildRequestDataFlags flags, IEnumerable<string>? propertiesToTransfer, RequestedProjectState requestedProjectState) 166public ProjectInstance? ProjectInstance
BackEnd\Components\ProjectCache\ProjectCacheService.cs (1)
172private 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)
1457ProjectInstance project = _requestEntry?.RequestConfiguration?.Project; 1497ProjectInstance 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)
87private ProjectInstance _project; 92private ProjectInstance _transferredState; 210internal BuildRequestConfiguration(int configId, ProjectInstance instance) 374public ProjectInstance Project 409private void SetProjectBasedState(ProjectInstance project) 503private void InitializeProject(BuildParameters buildParameters, Func<ProjectInstance> loadProjectFromFile) 932translator.Translate(ref _transferredState, ProjectInstance.FactoryForDeserialization); 973internal void ApplyTransferredState(ProjectInstance instance)
BackEnd\Shared\BuildResult.cs (11)
129/// <see cref="ProjectInstance"/> state after the build. This is only provided if <see cref="BuildRequest.BuildRequestDataFlags"/> 133/// be used to retrieve <see cref="ProjectInstance.Properties"/>, <see cref="ProjectInstance.GlobalProperties"/> and 134/// <see cref="ProjectInstance.Items"/> from it. No other operation is guaranteed to be supported. 136private ProjectInstance? _projectStateAfterBuild; 408/// <see cref="ProjectInstance"/> state after the build. In general, it may be a non buildable-dummy object, and should only 409/// be used to retrieve <see cref="ProjectInstance.Properties"/>, <see cref="ProjectInstance.GlobalProperties"/> and 410/// <see cref="ProjectInstance.Items"/> from it. Any other operation is not guaranteed to be supported. 412public ProjectInstance? ProjectStateAfterBuild 634translator.Translate(ref _projectStateAfterBuild, ProjectInstance.FactoryForDeserialization);
BackEnd\TaskExecutionHost\TaskExecutionHost.cs (3)
86private ProjectInstance _projectInstance; 207public ProjectInstance ProjectInstance => _projectInstance; 249public 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) 990var traversalInstance = new ProjectInstance( 1068private void AddProjectReference(ProjectInstance traversalProject, ProjectInstance projectInstance, ProjectInSolution projectToAdd, ProjectConfigurationInSolution projectConfiguration, bool direct) 1101private static string GetToolsVersionMetadataForDirectMSBuildTask(ProjectInstance traversalProject) 1118private static string GetPropertiesMetadataForProjectReference(ProjectInstance traversalProject, string configurationAndPlatformProperties) 1157private bool CanBuildDirectly(ProjectInstance traversalProject, ProjectInSolution projectToAdd, ProjectConfigurationInSolution projectConfiguration) 1224private ProjectInstance CreateMetaproject(ProjectInstance traversalProject, ProjectInSolution project, ProjectConfigurationInSolution projectConfiguration) 1227ProjectInstance metaprojectInstance = new ProjectInstance(EscapingUtilities.UnescapeAll(GetMetaprojectName(project)), traversalProject, GetMetaprojectGlobalProperties(traversalProject)); 1319private void AddMetaprojectReferenceItems(ProjectInstance traversalProject, ProjectInstance metaprojectInstance, ProjectInSolution project) 1347private static void AddMetaprojectTargetForManagedProject(ProjectInstance traversalProject, ProjectInstance metaprojectInstance, ProjectInSolution project, ProjectConfigurationInSolution projectConfiguration, string targetName, string outputItem) 1366private static void AddProjectBuildTask(ProjectInstance traversalProject, ProjectConfigurationInSolution projectConfiguration, ProjectTargetInstance target, string targetToBuild, string sourceItems, string condition, string outputItem) 1422private void AddMetaprojectTargetForWebProject(ProjectInstance traversalProject, ProjectInstance metaprojectInstance, ProjectInSolution project, string targetName) 1614ProjectInstance traversalProject, 1683ProjectInstance traversalProject, 1684ProjectInstance metaprojectInstance, 1752outDirValue = ProjectInstance.GetPropertyValueEscaped(outdir); 1814private static void AddTargetForGetFrameworkPathAndRedistList(ProjectInstance metaprojectInstance) 1865private void AddMetaprojectTargetForUnknownProjectType(ProjectInstance traversalProject, ProjectInstance metaprojectInstance, ProjectInSolution project, string targetName, string unknownProjectTypeErrorMessage) 1935private void AddValidateProjectsTarget(ProjectInstance traversalProject, List<ProjectInSolution> projects) 1977private static void AddTraversalReferencesTarget(ProjectInstance traversalProject, string targetName, string outputItem, bool batchBuildTargets) 2029private void AddTraversalTargetForProject(ProjectInstance traversalProject, ProjectInSolution project, ProjectConfigurationInSolution projectConfiguration, string targetToBuild, string outputItem, bool canBuildDirectly) 2074private IDictionary<string, string> GetMetaprojectGlobalProperties(ProjectInstance traversalProject) 2347private void AddInitialTargets(ProjectInstance traversalProject, List<ProjectInSolution> projects) 2358private void AddValidateSolutionConfigurationTarget(ProjectInstance traversalProject) 2393private static void AddValidateToolsVersionsTarget(ProjectInstance traversalProject) 2406private static void AddGetSolutionConfigurationContentsTarget(ProjectInstance traversalProject)
Definition\Project.cs (6)
1367public ProjectInstance CreateProjectInstance() 1381public ProjectInstance CreateProjectInstance(ProjectInstanceSettings settings) 1392public ProjectInstance CreateProjectInstance(ProjectInstanceSettings settings, EvaluationContext evaluationContext) 3279public override ProjectInstance CreateProjectInstance(ProjectInstanceSettings settings, EvaluationContext evaluationContext) 3347ProjectInstance instance = CreateProjectInstance(LoggingService, ProjectInstanceSettings.None, evaluationContext); 3706private 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)
27internal ProjectGraphNode(ProjectInstance projectInstance) 48public 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; 2666internal static ProjectInstance FactoryForDeserialization(ITranslator translator) 2878private static ProjectInstance[] GenerateSolutionWrapper( 2904ProjectInstance[] instances = SolutionProjectGenerator.Generate(sp, globalProperties, toolsVersion, projectBuildEventContext, loggingService, targetNames, sdkResolverService, submissionId); 2931private static ProjectInstance[] GenerateSolutionWrapperUsingOldOM( 3005ProjectInstance instance = new(projectRootElement, globalProperties, toolsVersion, buildParameters, loggingService, projectBuildEventContext, sdkResolverService, submissionId); 3386ProjectInstance 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); 1362ProjectInstance.VerifyThrowNotImmutable(_isImmutable); 1373ProjectInstance.VerifyThrowNotImmutable(_isImmutable); 1384ProjectInstance.VerifyThrowNotImmutable(_isImmutable); 1429ProjectInstance.VerifyThrowNotImmutable(destinationAsTaskItem._isImmutable); 1712ProjectInstance.VerifyThrowNotImmutable(_isImmutable); 1836ProjectInstance.VerifyThrowNotImmutable(_isImmutable); 1860ProjectInstance.VerifyThrowNotImmutable(_isImmutable); 1880ProjectInstance.VerifyThrowNotImmutable(_isImmutable); 1892ProjectInstance.VerifyThrowNotImmutable(_isImmutable); 1972private ProjectInstance _project; 1979internal ProjectItemInstanceFactory(ProjectInstance project) 1987internal 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)
1829ProjectInstance 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)
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)
40ProjectInstance i = p.CreateProjectInstance(); 51ProjectInstance p = GetSampleProjectInstance(); 63ProjectInstance p = GetSampleProjectInstance(); 83ProjectInstance p = GetEmptyProjectInstance(); 104ProjectInstance p = GetEmptyProjectInstance(); 125ProjectInstance p = GetEmptyProjectInstance(); 156ProjectInstance p = GetEmptyProjectInstance(); 168ProjectInstance p = GetEmptyProjectInstance(); 180ProjectInstance p = GetEmptyProjectInstance(); 190ProjectInstance p = GetEmptyProjectInstance(); 204ProjectInstance instance = p.CreateProjectInstance(); 222ProjectInstance first = GetSampleProjectInstance(); 223ProjectInstance second = first.DeepCopy(); 234ProjectInstance first = GetSampleProjectInstance(); 235ProjectInstance second = first.DeepCopy(); 262ProjectInstance project = GetProjectInstance(content); 305ProjectInstance projectInstance = GetProjectInstance(content); 327ProjectInstance first = GetSampleProjectInstance(); 328ProjectInstance second = first.DeepCopy(); 345ProjectInstance instance = new ProjectInstance(ProjectRootElement.Create()); 357ProjectInstance instance = new ProjectInstance(ProjectRootElement.Create()); 369ProjectInstance instance = new ProjectInstance(ProjectRootElement.Create()); 382ProjectInstance instance = new ProjectInstance(xml); 397ProjectInstance instance1 = new Project().CreateProjectInstance(); 427var projBInstance = projBEval.CreateProjectInstance(); 469var projBInstance = new ProjectInstance(projBEval, ProjectInstanceSettings.ImmutableWithFastItemLookup); 511var projBInstance = projBEval.CreateProjectInstance(); 668var instance = GetSampleProjectInstance(true /* immutable */); 679var instance = GetSampleProjectInstance(true /* immutable */); 690var instance = GetSampleProjectInstance(true /* immutable */); 701var instance = GetSampleProjectInstance(true /* immutable */); 712var instance = GetSampleProjectInstance(true /* immutable */); 723var instance = GetSampleProjectInstance(true /* immutable */); 734var instance = GetSampleProjectInstance(true /* immutable */); 745var instance = GetSampleProjectInstance(true /* immutable */); 756var instance = GetSampleProjectInstance(true /* immutable */); 767var instance = GetSampleProjectInstance(true /* immutable */); 778var instance = GetSampleProjectInstance(true /* immutable */); 789var instance = GetSampleProjectInstance(true /* immutable */); 800var instance = GetSampleProjectInstance(true /* immutable */); 811var instance = GetSampleProjectInstance(true /* immutable */); 822var instance = GetSampleProjectInstance(true /* immutable */); 833var instance = GetSampleProjectInstance(true /* immutable */); 845var instance = GetSampleProjectInstance(true /* immutable */); 857var instance = GetSampleProjectInstance(true /* immutable */); 868var protoInstance = GetSampleProjectInstance(true /* immutable */); 869var instance = protoInstance.DeepCopy(false /* mutable */); 887var protoInstance = GetSampleProjectInstance(false /* mutable */); 888var instance = protoInstance.DeepCopy(true /* immutable */); 909var protoInstance = GetSampleProjectInstance(true /* immutable */); 910var instance = protoInstance.DeepCopy(/* inherit */); 934var protoInstance = GetSampleProjectInstance(true /* immutable */); 935var instance = protoInstance.DeepCopy(true /* immutable */); 956var protoInstance = GetSampleProjectInstance(false /* mutable */); 957var instance = protoInstance.DeepCopy(/* inherit */); 973var protoInstance = GetSampleProjectInstance(false /* mutable */); 974var instance = protoInstance.DeepCopy(false /* mutable */); 987private static ProjectInstance GetSampleProjectInstance(bool isImmutable = false) 1016ProjectInstance p = GetProjectInstance(content, isImmutable); 1024private static ProjectInstance GetProjectInstance(string content, bool immutable = false) 1031ProjectInstance instance = immutable ? project.CreateProjectInstance(ProjectInstanceSettings.Immutable) : project.CreateProjectInstance(); 1039private static ProjectInstance GetEmptyProjectInstance() 1043ProjectInstance 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)
56ProjectInstance instance = project.CreateProjectInstance(); 76ProjectInstance instance = project.CreateProjectInstance(); 96ProjectInstance instance = project.CreateProjectInstance(); 147ProjectInstance 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 (326)
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)
354ProjectInstance rootProject = GenerateDummyProjects(shutdownProjectDirectory, numberOfParallelProjectsToBuild, projectCollection); 1775ProjectInstance instance = _buildManager.GetProjectInstanceForBuild(project); 1806ProjectInstance instance = _buildManager.GetProjectInstanceForBuild(project); 1841ProjectInstance instance = _buildManager.GetProjectInstanceForBuild(project); 1898ProjectInstance instance = _buildManager.GetProjectInstanceForBuild(project); 1899ProjectInstance instance2 = _buildManager.GetProjectInstanceForBuild(project); 1926ProjectInstance instance = _buildManager.GetProjectInstanceForBuild(project); 1952ProjectInstance instance = _buildManager.GetProjectInstanceForBuild(project); 1984ProjectInstance instance = _buildManager.GetProjectInstanceForBuild(project); 1997ProjectInstance instance2 = _buildManager.GetProjectInstanceForBuild(project); 2034ProjectInstance projectInstance = CreateProjectInstance(contents1, null, _projectCollection, false); 2061ProjectInstance projectInstance2 = CreateProjectInstance(contents1, null, _projectCollection, false); 2265ProjectInstance instance = project.CreateProjectInstance(); 2316ProjectInstance instance = project.CreateProjectInstance(); 3139ProjectInstance pi = BuildManager.DefaultBuildManager.GetProjectInstanceForBuild(project1); 3150ProjectInstance pi = BuildManager.DefaultBuildManager.GetProjectInstanceForBuild(project2); 3218ProjectInstance pi = BuildManager.DefaultBuildManager.GetProjectInstanceForBuild(project2); 3230ProjectInstance pi = BuildManager.DefaultBuildManager.GetProjectInstanceForBuild(project1); 3305ProjectInstance pi = BuildManager.DefaultBuildManager.GetProjectInstanceForBuild(project2); 3317ProjectInstance pi = BuildManager.DefaultBuildManager.GetProjectInstanceForBuild(project1); 3408ProjectInstance instance = _buildManager.GetProjectInstanceForBuild(project); 3438ProjectInstance instance = _buildManager.GetProjectInstanceForBuild(project); 3469ProjectInstance instance = _buildManager.GetProjectInstanceForBuild(project); 3575private ProjectInstance CreateProjectInstance(string contents, string toolsVersion, ProjectCollection projectCollection, bool deleteTempProject) 3617private static ProjectInstance GenerateDummyProjects(string shutdownProjectDirectory, int parallelProjectCount, ProjectCollection projectCollection) 3706var mainInstance = mainProject.CreateProjectInstance(ProjectInstanceSettings.Immutable).DeepCopy(isImmutable: false); 3733var p2pInstance = p2pProject.CreateProjectInstance(ProjectInstanceSettings.Immutable).DeepCopy(isImmutable: false); 3858ProjectInstance instance = project.CreateProjectInstance(ProjectInstanceSettings.Immutable).DeepCopy(false); 4411ProjectInstance 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)
237private 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); 3908private static Lookup GenerateLookupWithItemsAndProperties(ProjectInstance project) 3917private static Lookup GenerateLookup(ProjectInstance project) 3922private static Lookup GenerateLookup(ProjectInstance project, PropertyDictionary<ProjectPropertyInstance> properties) 3953ProjectInstance projectInstance = project.CreateProjectInstance(); 3988var projectInstance = project.CreateProjectInstance();
BackEnd\Lookup_Tests.cs (24)
26ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 48ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 80ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 150ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 200ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 251ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 302ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 357ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 399ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 463ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 523ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 594ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 661ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 716ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 764ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 820ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 861ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 896ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 967ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 1013ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 1024ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 1075ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 1128ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 1165ProjectInstance 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)
98ProjectInstance project = CreateTestProject(); 118ProjectInstance project = CreateTestProject(); 145ProjectInstance project = CreateTestProject(); 168ProjectInstance project = CreateTestProject(); 360ProjectInstance project = CreateTestProject(projectBody); 500ProjectInstance project = CreateTestProject(projectBody); 526ProjectInstance project = CreateTestProject(projectBody); 552ProjectInstance project = CreateTestProject(projectBody); 582ProjectInstance project = CreateTestProject(projectBody); 617ProjectInstance project = CreateTestProject(projectBody); 649ProjectInstance project = CreateTestProject(projectBody); 680ProjectInstance project = CreateTestProject(projectBody); 706ProjectInstance project = CreateTestProject(projectBody); 742ProjectInstance project = CreateTestProject(projectBody); 768ProjectInstance project = CreateTestProject(projectBody); 795ProjectInstance project = CreateTestProject(projectBody); 825ProjectInstance project = CreateTestProject(projectBody); 869ProjectInstance project = CreateTestProject(projectBody); 896ProjectInstance project = CreateTestProject(projectBody); 923ProjectInstance project = CreateTestProject(projectBody); 955ProjectInstance project = CreateTestProject(projectBody); 1053ProjectInstance project = CreateTestProject(projectBody); 1088ProjectInstance project = CreateTestProject(projectBody); 1139ProjectInstance project = CreateTestProject(projectBody); 1199ProjectInstance project = CreateTestProject(projectBody); 1241ProjectInstance project = CreateTestProject(projectBody); 1287ProjectInstance project = CreateTestProject(projectBody); 1318ProjectInstance project = CreateTestProject(projectBody); 1392ProjectInstance project = CreateTestProject(projectBody); 1422var project = CreateTestProject(projectContents, string.Empty, "Build"); 1450var project = CreateTestProject(projectContents, string.Empty, "Build"); 1569private Lookup CreateStandardLookup(ProjectInstance project) 1579private ProjectInstance CreateTestProject() 1647private ProjectInstance CreateTestProject(string projectBodyContents) 1655private ProjectInstance CreateTestProject(string projectBodyContents, string initialTargets, string defaultTargets) 1704ProjectInstance project = CreateTestProject(projectBody);
BackEnd\TargetEntry_Tests.cs (23)
81ProjectInstance project = CreateTestProject(true /* Returns enabled */); 96ProjectInstance project = CreateTestProject(true /* Returns enabled */); 110ProjectInstance project = CreateTestProject(true /* Returns enabled */); 124ProjectInstance project = CreateTestProject(true /* Returns enabled */); 137ProjectInstance project = CreateTestProject(true /* Returns enabled */); 151ProjectInstance project = CreateTestProject(true /* Returns enabled */); 167ProjectInstance project = CreateTestProject(returnsEnabledForThisProject); 207ProjectInstance project = CreateTestProject(returnsEnabledForThisProject); 252ProjectInstance project = CreateTestProject(returnsEnabledForThisProject); 320ProjectInstance project = CreateTestProject(returnsEnabledForThisProject); 352ProjectInstance project = CreateTestProject(returnsEnabledForThisProject); 461ProjectInstance project = CreateTestProject(returnsEnabledForThisProject); 488ProjectInstance project = CreateTestProject(true /* returns are enabled */); 506ProjectInstance project = CreateTestProject(true /* returns are enabled */); 527ProjectInstance project = CreateTestProject(returnsEnabledForThisProject); 548ProjectInstance project = CreateTestProject(returnsEnabledForThisProject); 569ProjectInstance project = CreateTestProject(returnsEnabledForThisProject); 590ProjectInstance project = CreateTestProject(returnsEnabledForThisProject); 611ProjectInstance project = CreateTestProject(returnsEnabledForThisProject); 1000private void ExecuteEntry(ProjectInstance project, TargetEntry entry) 1023private TargetEntry CreateStandardTargetEntry(ProjectInstance project, string targetName) 1041private TargetEntry CreateStandardTargetEntry(ProjectInstance project, string target, TargetEntry baseEntry) 1054private ProjectInstance CreateTestProject(bool returnsAttributeEnabled)
BackEnd\TargetUpToDateChecker_Tests.cs (4)
169ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 206ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 250ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 608ProjectInstance p = project.CreateProjectInstance();
BackEnd\TaskBuilder_Tests.cs (2)
45private ProjectInstance _testProject; 1180private ProjectInstance CreateTestProject()
BackEnd\TaskExecutionHost_Tests.cs (4)
985ProjectInstance project = CreateTestProject(); 1013ProjectInstance project = CreateTestProject(); 1239ProjectInstance project = CreateTestProject(); 1502private ProjectInstance CreateTestProject()
BackEnd\TaskHostFactory_Tests.cs (2)
44ProjectInstance projectInstance = new(project.Path); 172ProjectInstance projectInstance = new(project.ProjectFile);
BackEnd\TaskRegistry_Tests.cs (1)
2203ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance();
Collections\OMcollections_tests.cs (2)
311ProjectInstance projectInstance = project.CreateProjectInstance(); 323ProjectInstance projectInstance = project.CreateProjectInstance();
Construction\SolutionFilter_Tests.cs (1)
143ProjectInstance[] instances = SolutionProjectGenerator.Generate(solution, null, null, _buildEventContext, mockLogger);
Construction\SolutionProjectGenerator_Tests.cs (42)
78ProjectInstance[] instances = SolutionProjectGenerator.Generate(SolutionFile.Parse(sln.Path), null, null, _buildEventContext, CreateMockLoggingService()); 108ProjectInstance[] instances = SolutionProjectGenerator.Generate(SolutionFile.Parse(solutionPath), null, null, _buildEventContext, CreateMockLoggingService()); 404ProjectInstance[] instances = SolutionProjectGenerator.Generate(solution, null, "3.5", _buildEventContext, CreateMockLoggingService()); 445ProjectInstance[] instances = SolutionProjectGenerator.Generate(solution, null, "3.5", _buildEventContext, CreateMockLoggingService()); 475ProjectInstance[] instances = SolutionProjectGenerator.Generate(solution, null, null, _buildEventContext, CreateMockLoggingService()); 522ProjectInstance[] instances = SolutionProjectGenerator.Generate(solution, null, null, _buildEventContext, CreateMockLoggingService()); 563ProjectInstance[] instances = SolutionProjectGenerator.Generate(solution, null, null, _buildEventContext, CreateMockLoggingService()); 676ProjectInstance[] instances = SolutionProjectGenerator.Generate(sp, null, null, _buildEventContext, CreateMockLoggingService()); 698ProjectInstance[] instances1 = SolutionProjectGenerator.Generate(sp1, null, null, _buildEventContext, CreateMockLoggingService()); 762ProjectInstance[] instances = SolutionProjectGenerator.Generate(sp, null, null, _buildEventContext, CreateMockLoggingService()); 824ProjectInstance[] instances = SolutionProjectGenerator.Generate(sp, null, null, _buildEventContext, CreateMockLoggingService()); 1098var projectBravoMetaProject = instances[1]; 1322var instance = SolutionProjectGenerator.Generate(solution, null, ObjectModelHelpers.MSBuildDefaultToolsVersion, _buildEventContext, CreateMockLoggingService())[0]; 1394ProjectInstance[] instances = SolutionProjectGenerator.Generate(solution, null, ObjectModelHelpers.MSBuildDefaultToolsVersion, _buildEventContext, CreateMockLoggingService()); 1397foreach (ProjectInstance instance in instances) 1543ProjectInstance[] instances = SolutionProjectGenerator.Generate(solution, null, "invalid", _buildEventContext, CreateMockLoggingService()); 1589ProjectInstance[] instances = SolutionProjectGenerator.Generate(solution, null, null, BuildEventContext.Invalid, CreateMockLoggingService()); 1670ProjectInstance[] instances = SolutionProjectGenerator.Generate(solution, null, null, BuildEventContext.Invalid, CreateMockLoggingService()); 1702ProjectInstance[] instances = SolutionProjectGenerator.Generate(solution, null, null, BuildEventContext.Invalid, CreateMockLoggingService()); 1729ProjectInstance msbuildProject = CreateVenusSolutionProject(globalProperties, useNewParser); 1760ProjectInstance msbuildProject = CreateVenusSolutionProject(useNewParser); 1799ProjectInstance msbuildProject = CreateVenusSolutionProject("2.0", useNewParser); 1827ProjectInstance msbuildProject = CreateVenusSolutionProject(useNewParser); 1855ProjectInstance msbuildProject = CreateVenusSolutionProject(useNewParser); 1966ProjectInstance[] instances = SolutionProjectGenerator.Generate(solution, null, null, BuildEventContext.Invalid, CreateMockLoggingService()); 2027ProjectInstance[] instances = SolutionProjectGenerator.Generate(solution, null, null, BuildEventContext.Invalid, CreateMockLoggingService()); 2112ProjectInstance[] instances = SolutionProjectGenerator.Generate(solution, globalProperties, null, BuildEventContext.Invalid, CreateMockLoggingService()); 2113ProjectInstance msbuildProject = instances[0]; 2384ProjectInstance[] instances = SolutionProjectGenerator.Generate(solution, globalProperties, null, BuildEventContext.Invalid, collection.LoggingService); 2434ProjectInstance[] instances = SolutionProjectGenerator.Generate(solution, null, null, BuildEventContext.Invalid, CreateMockLoggingService(), new List<string> { "One" }); 2493ProjectInstance[] instances = SolutionProjectGenerator.Generate(solution, null, null, BuildEventContext.Invalid, CreateMockLoggingService(), null); 2546ProjectInstance[] instances; 2633ProjectInstance projectInstance = SolutionProjectGenerator.Generate(solutionFile, null, null, BuildEventContext.Invalid, CreateMockLoggingService(), new[] { "MyTarget" }).FirstOrDefault(); 2694ProjectInstance projectInstance = SolutionProjectGenerator.Generate(solutionFile, null, null, BuildEventContext.Invalid, CreateMockLoggingService(), targetsToBuild).FirstOrDefault(); 2811ProjectInstance projectInstance = SolutionProjectGenerator.Generate(solutionFile, globalProperties, null, BuildEventContext.Invalid, CreateMockLoggingService(), new[] { "Build" }).FirstOrDefault(); 2855private ProjectInstance CreateVenusSolutionProject(bool useNewParser) 2863private ProjectInstance CreateVenusSolutionProject(IDictionary<string, string> globalProperties, bool useNewParser) 2871private ProjectInstance CreateVenusSolutionProject(string toolsVersion, bool useNewParser) 2882private ProjectInstance CreateVenusSolutionProject(IDictionary<string, string> globalProperties, string toolsVersion, bool useNewParser) 2924ProjectInstance[] instances = SolutionProjectGenerator.Generate(solution, globalProperties, toolsVersion, BuildEventContext.Invalid, CreateMockLoggingService()); 2943private void AssertProjectContainsItem(ProjectInstance msbuildProject, string itemType, string include) 2963private 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 (4)
635ProjectInstance pi = projectFromString.Project.CreateProjectInstance(); 706ProjectInstance pi = projectFromString.Project.CreateProjectInstance(); 791ProjectInstance pi = new ProjectInstance(projectFromString.Project.Xml, null /* no global properties */, null /* don't explicitly set the toolsversion */, p); 901ProjectInstance 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)
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)
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)
281var 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)
390ProjectInstance project = CreateDummyProject("foo.proj"); 474public ProjectInstance CreateDummyProject(string fileName) 485ProjectInstance instance = project.CreateProjectInstance();
Instance\ProjectInstance_Internal_Tests.cs (57)
70ProjectInstance project = new Project(projectRootElementFromString.Project).CreateProjectInstance(); 118ProjectInstance project = new Project(projectRootElementFromString.Project).CreateProjectInstance(); 144ProjectInstance project = projectFromString.Project.CreateProjectInstance(); 172ProjectInstance p = GetProjectInstance(content); 210ProjectInstance p = GetProjectInstance(content); 256ProjectInstance p = GetSampleProjectInstance(); 267ProjectInstance p = GetSampleProjectInstance(); 279ProjectInstance p = GetSampleProjectInstance(); 288var projectInstance = new ProjectInstance( 302ProjectInstance first = GetSampleProjectInstance(null, null, projectCollection, toolsVersion: "TESTTV"); 303ProjectInstance second = first.DeepCopy(); 322ProjectInstance p = GetSampleProjectInstance(null, null, collection); 356ProjectInstance p = GetSampleProjectInstance(null, null, collection); 384ProjectInstance p = GetSampleProjectInstance(null, globalProperties, collection); 425ProjectInstance p = new ProjectInstance(xml, globalProperties, ObjectModelHelpers.MSBuildDefaultToolsVersion, "ABCDEF", collection); 443ProjectInstance p = GetSampleProjectInstance(); 454ProjectInstance p = GetSampleProjectInstance(); 467ProjectInstance first = GetSampleProjectInstance(hostServices); 468ProjectInstance second = first.DeepCopy(); 487ProjectInstance first = GetSampleProjectInstance(); 488ProjectInstance second = first.DeepCopy(); 500ProjectInstance first = GetSampleProjectInstance(); 501ProjectInstance second = first.DeepCopy(); 513ProjectInstance first = GetSampleProjectInstance(); 514ProjectInstance second = first.DeepCopy(); 525ProjectInstance first = GetSampleProjectInstance(); 526ProjectInstance second = first.DeepCopy(); 537ProjectInstance first = GetSampleProjectInstance(); 538ProjectInstance second = first.DeepCopy(); 549ProjectInstance first = GetSampleProjectInstance(); 552ProjectInstance second = first.DeepCopy(); 580ProjectInstance projectInstance = GetProjectInstance(projectFileContent); 691var original = new ProjectInstance(rootElement); 696var copy = ProjectInstance.FactoryForDeserialization(TranslationHelpers.GetReadTranslator()); 701public delegate ProjectInstance ProjectInstanceFactory(string file, ProjectRootElement xml, ProjectCollection collection); 714(f, xml, c) => ProjectInstance.FromFile(f, new ProjectOptions { ProjectCollection = c }) 738(f, xml, c) => ProjectInstance.FromProjectRootElement(xml, new ProjectOptions { ProjectCollection = c }) 746var pi = new ProjectInstance(f, null, null, c); 751var copy = ProjectInstance.FactoryForDeserialization(TranslationHelpers.GetReadTranslator()); 770var projectInstance = projectInstanceFactory.Invoke(file, xml, projectCollection); 784ProjectInstance projectInstance = new ProjectInstance(rootElement); 820ProjectInstance projectInstance = new ProjectInstance(rootElement); 864ProjectInstance projectInstance = useDirectConstruction 898ProjectInstance projectInstance = ProjectInstance.FromFile( 926ProjectInstance projectInstance = ProjectInstance.FromProjectRootElement( 941private static ProjectInstance GetProjectInstance(string content) 949private static ProjectInstance GetProjectInstance(string content, HostServices hostServices) 957private static ProjectInstance GetProjectInstance(string content, HostServices hostServices, IDictionary<string, string> globalProperties, ProjectCollection projectCollection, string toolsVersion = null) 970ProjectInstance instance = project.CreateProjectInstance(); 978private static ProjectInstance GetSampleProjectInstance() 986private static ProjectInstance GetSampleProjectInstance(HostServices hostServices) 994private static ProjectInstance GetSampleProjectInstance(HostServices hostServices, IDictionary<string, string> globalProperties, ProjectCollection projectCollection, string toolsVersion = null) 1019ProjectInstance 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)
181ProjectInstance pi = p.CreateProjectInstance();
CallTarget_Tests.cs (1)
176ProjectInstance instance = project.CreateProjectInstance();
Exec_Tests.cs (2)
970var project = collection.LoadProject(testProject.ProjectFile).CreateProjectInstance(); 1027var 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)
314ProjectInstance instance = _projectCollection.LoadProject(projectFileNames[i], finalGlobalProperties, null).CreateProjectInstance();
ObjectModelHelpers.cs (2)
1482var 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.Workspaces.MSBuild.BuildHost (33)
Build\ProjectBuildManager.cs (3)
264public Task<MSB.Execution.ProjectInstance> BuildProjectAsync( 275private async Task<MSB.Execution.ProjectInstance> BuildProjectAsync( 280var 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)
41protected abstract IEnumerable<MSB.Framework.ITaskItem> GetCompilerCommandLineArgs(MSB.Execution.ProjectInstance executedProject); 42protected abstract ImmutableArray<string> ReadCommandLineArgs(MSB.Execution.ProjectInstance project); 109var project = await _buildManager.BuildProjectAsync(_loadedProject, Log, cancellationToken).ConfigureAwait(false); 116private ProjectFileInfo CreateProjectFileInfo(MSB.Execution.ProjectInstance project) 215private static ImmutableArray<string> GetContentFiles(MSB.Execution.ProjectInstance project) 223private 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)
1114ProjectInstance builtProject = result.ProjectStateAfterBuild;