60 instantiations of ProjectInstance
Microsoft.Build (15)
BackEnd\BuildManager\BuildManager.cs (1)
1929return new ProjectInstance(
BackEnd\Shared\BuildRequestConfiguration.cs (1)
479return new ProjectInstance(
Construction\Solution\SolutionProjectGenerator.cs (2)
994var traversalInstance = new ProjectInstance( 1210ProjectInstance metaprojectInstance = new ProjectInstance(EscapingUtilities.UnescapeAll(GetMetaprojectName(project)), traversalProject, GetMetaprojectGlobalProperties(traversalProject));
Definition\Project.cs (1)
3709return new ProjectInstance(_data, DirectoryPath, FullPath, ProjectCollection.HostServices, ProjectCollection.EnvironmentProperties, settings);
Graph\ProjectGraph.cs (1)
855return new ProjectInstance(
Instance\ProjectInstance.cs (9)
190/// of another ProjectInstance. <seealso cref="ProjectInstance(ProjectInstance, bool, RequestedProjectState)"/> 859return new ProjectInstance( 878return new ProjectInstance( 898return new ProjectInstance(project, fastItemLookupNeeded); 1144/// of another ProjectInstance. <seealso cref="ProjectInstance(ProjectInstance, bool, RequestedProjectState)"/> 1919return new ProjectInstance(this, true, filter); 1935return new ProjectInstance(this, isImmutable); 2481return new ProjectInstance(translator); 2818ProjectInstance instance = new(projectRootElement, globalProperties, toolsVersion, buildParameters, loggingService, projectBuildEventContext, sdkResolverService, submissionId);
Microsoft.Build.Engine.OM.UnitTests (10)
Definition\Project_Tests.cs (4)
674ProjectInstance projectInstance = new ProjectInstance(xml); 711ProjectInstance projectInstance = new ProjectInstance(xml); 746ProjectInstance projectInstance = new ProjectInstance(xml); 783ProjectInstance projectInstance = new ProjectInstance(xml);
Instance\ProjectInstance_Tests.cs (5)
346ProjectInstance instance = new ProjectInstance(ProjectRootElement.Create()); 358ProjectInstance instance = new ProjectInstance(ProjectRootElement.Create()); 370ProjectInstance instance = new ProjectInstance(ProjectRootElement.Create()); 383ProjectInstance instance = new ProjectInstance(xml); 470var projBInstance = new ProjectInstance(projBEval, ProjectInstanceSettings.ImmutableWithFastItemLookup);
Instance\ProjectItemInstance_Tests.cs (1)
1171ProjectInstance project = new ProjectInstance(xml);
Microsoft.Build.Engine.UnitTests (35)
BackEnd\BuildManager_Tests.cs (1)
3594return new ProjectInstance(rootProject);
BackEnd\IntrinsicTask_Tests.cs (1)
3464ProjectInstance instance = new ProjectInstance(xml);
BackEnd\ResultsCache_Tests.cs (1)
314resultForRequestWithSubsetFlag1.ProjectStateAfterBuild = new ProjectInstance(ProjectRootElement.Create(xmlReader)).FilteredCopy(requestedProjectState1);
BackEnd\TaskHost_Tests.cs (1)
78configuration.Project = new ProjectInstance(ProjectRootElement.Create());
BackEnd\TaskHostFactory_Tests.cs (2)
45ProjectInstance projectInstance = new(project.Path); 193ProjectInstance projectInstance = new(project.ProjectFile);
Definition\ToolsVersion_Tests.cs (2)
757ProjectInstance pi = new ProjectInstance(project.Xml, null /* no global properties */, null /* don't explicitly set the toolsversion */, p); 865ProjectInstance pi = new ProjectInstance(project.Xml, null /* no global properties */, null /* don't explicitly set the toolsversion */, p);
Evaluation\Evaluator_Tests.cs (1)
429ProjectInstance project = new ProjectInstance(subdirProjPath);
Evaluation\Expander_Tests.cs (9)
4742ProjectInstance projectInstance = new ProjectInstance(projectFile.Path); 4786ProjectInstance projectInstance = new ProjectInstance(projectFile.Path); 4815ProjectInstance projectInstance = new ProjectInstance(projectFile.Path); 4862ProjectInstance projectInstance = new ProjectInstance(projectFile.Path); 4903ProjectInstance projectInstance = new ProjectInstance(projectFile.Path); 4937ProjectInstance projectInstance = new ProjectInstance(projectFile.Path); 4983new ProjectInstance(projectFile.Path); 5024new ProjectInstance(projectFile.Path); 5056new 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)
285var projectInstance = new ProjectInstance( 418ProjectInstance p = new ProjectInstance(xml, globalProperties, ObjectModelHelpers.MSBuildDefaultToolsVersion, "ABCDEF", new ProjectCollection(projectCollectionGlobalProperties)); 682var original = new ProjectInstance(ProjectRootElement.Create(XmlReader.Create(new StringReader(ObjectModelHelpers.CleanupFileContents(projectContents))))); 699(f, xml, c) => new ProjectInstance(f, null, null, c) 717(f, xml, c) => new ProjectInstance(f, null, null, c).DeepCopy() 723(f, xml, c) => new ProjectInstance(xml, null, null, c) 737var pi = new ProjectInstance(f, null, null, c); 774ProjectInstance projectInstance = new ProjectInstance(rootElement); 809ProjectInstance projectInstance = new ProjectInstance(rootElement); 853? new ProjectInstance(rootElement, globalProperties: null, toolsVersion: null, buildParameters, projectCollection.LoggingService, buildEventContext, sdkResolverService: null, 0)
599 references to ProjectInstance
Microsoft.Build (162)
BackEnd\BuildManager\BuildManager.cs (6)
200private readonly Dictionary<ProjectInstance, string> _unnamedProjectInstanceToNames; 310_unnamedProjectInstanceToNames = new Dictionary<ProjectInstance, string>(); 863public ProjectInstance GetProjectInstanceForBuild(Project project) 1269ProjectInstance projectInstance = submission.BuildRequestData.ProjectInstance; 1465var instances = ProjectInstance.LoadSolutionForBuild( 1510ProjectInstance newInstance = project.CreateProjectInstance();
BackEnd\BuildManager\BuildRequestData.cs (6)
99public BuildRequestData(ProjectInstance projectInstance, string[] targetsToBuild) 110public BuildRequestData(ProjectInstance projectInstance, string[] targetsToBuild, HostServices hostServices) 122public BuildRequestData(ProjectInstance projectInstance, string[] targetsToBuild, HostServices hostServices, BuildRequestDataFlags flags) 135public BuildRequestData(ProjectInstance projectInstance, string[] targetsToBuild, HostServices hostServices, BuildRequestDataFlags flags, IEnumerable<string> propertiesToTransfer) 165public BuildRequestData(ProjectInstance projectInstance, string[] targetsToBuild, HostServices hostServices, BuildRequestDataFlags flags, IEnumerable<string> propertiesToTransfer, RequestedProjectState requestedProjectState) 249public ProjectInstance ProjectInstance
BackEnd\Components\ProjectCache\ProjectCacheService.cs (1)
171private IEnumerable<ProjectCacheDescriptor> GetProjectCacheDescriptors(ProjectInstance projectInstance)
BackEnd\Components\RequestBuilder\IntrinsicTask.cs (3)
26protected IntrinsicTask(TargetLoggingContext loggingContext, ProjectInstance projectInstance, bool logTaskInputs) 45internal ProjectInstance Project 68internal static IntrinsicTask InstantiateTask(ProjectTargetInstanceChild taskInstance, TargetLoggingContext loggingContext, ProjectInstance projectInstance, bool logTaskInputs)
BackEnd\Components\RequestBuilder\IntrinsicTasks\ItemGroupIntrinsicTask.cs (1)
41public ItemGroupIntrinsicTask(ProjectItemGroupTaskInstance taskInstance, TargetLoggingContext loggingContext, ProjectInstance projectInstance, bool logTaskInputs)
BackEnd\Components\RequestBuilder\IntrinsicTasks\PropertyGroupIntrinsicTask.cs (1)
34public PropertyGroupIntrinsicTask(ProjectPropertyGroupTaskInstance taskInstance, TargetLoggingContext loggingContext, ProjectInstance projectInstance, bool logTaskInputs)
BackEnd\Components\RequestBuilder\RequestBuilder.cs (2)
1362ProjectInstance project = _requestEntry?.RequestConfiguration?.Project; 1402ProjectInstance project = _requestEntry?.RequestConfiguration?.Project;
BackEnd\Components\RequestBuilder\TargetBuilder.cs (1)
86private ProjectInstance _projectInstance;
BackEnd\Components\RequestBuilder\TargetUpToDateChecker.cs (2)
55internal TargetUpToDateChecker(ProjectInstance project, ProjectTargetInstance targetToAnalyze, ILoggingService loggingServices, BuildEventContext buildEventContext) 1231private ProjectInstance _project;
BackEnd\Shared\BuildRequestConfiguration.cs (8)
87private ProjectInstance _project; 92private ProjectInstance _transferredState; 210internal BuildRequestConfiguration(int configId, ProjectInstance instance) 370public ProjectInstance Project 405private void SetProjectBasedState(ProjectInstance project) 499private void InitializeProject(BuildParameters buildParameters, Func<ProjectInstance> loadProjectFromFile) 910translator.Translate(ref _transferredState, ProjectInstance.FactoryForDeserialization); 951internal void ApplyTransferredState(ProjectInstance instance)
BackEnd\Shared\BuildResult.cs (11)
110/// <see cref="ProjectInstance"/> state after the build. This is only provided if <see cref="BuildRequest.BuildRequestDataFlags"/> 114/// be used to retrieve <see cref="ProjectInstance.Properties"/>, <see cref="ProjectInstance.GlobalProperties"/> and 115/// <see cref="ProjectInstance.Items"/> from it. No other operation is guaranteed to be supported. 117private ProjectInstance _projectStateAfterBuild; 385/// <see cref="ProjectInstance"/> state after the build. In general, it may be a non buildable-dummy object, and should only 386/// be used to retrieve <see cref="ProjectInstance.Properties"/>, <see cref="ProjectInstance.GlobalProperties"/> and 387/// <see cref="ProjectInstance.Items"/> from it. Any other operation is not guaranteed to be supported. 389public ProjectInstance ProjectStateAfterBuild 598translator.Translate(ref _projectStateAfterBuild, ProjectInstance.FactoryForDeserialization);
BackEnd\TaskExecutionHost\TaskExecutionHost.cs (3)
86private ProjectInstance _projectInstance; 203public ProjectInstance ProjectInstance => _projectInstance; 245public void InitializeForTask(IBuildEngine2 buildEngine, TargetLoggingContext loggingContext, ProjectInstance projectInstance, string taskName, ElementLocation taskLocation, ITaskHost taskHost, bool continueOnError,
Construction\Solution\SolutionProjectGenerator.cs (35)
209internal static ProjectInstance[] Generate( 692private ProjectInstance[] Generate() 715private ProjectInstance[] CreateSolutionProject(string wrapperProjectToolsVersion, bool explicitToolsVersionSpecified) 743var projectInstances = new List<ProjectInstance>(projectsInOrder.Count + 1); 746ProjectInstance traversalInstance = CreateTraversalInstance(wrapperProjectToolsVersion, explicitToolsVersionSpecified, projectsInOrder); 775foreach (ProjectInstance instance in projectInstances) 786private void EvaluateAndAddProjects(List<ProjectInSolution> projectsInOrder, List<ProjectInstance> projectInstances, ProjectInstance traversalInstance, string selectedSolutionConfiguration) 821ProjectInstance metaproject = CreateMetaproject(traversalInstance, project, projectConfiguration); 836private void AddStandardTraversalTargets(ProjectInstance traversalInstance, List<ProjectInSolution> projectsInOrder) 851private ProjectInstance CreateTraversalInstance(string wrapperProjectToolsVersion, bool explicitToolsVersionSpecified, List<ProjectInSolution> projectsInOrder) 994var traversalInstance = new ProjectInstance( 1051private void AddProjectReference(ProjectInstance traversalProject, ProjectInstance projectInstance, ProjectInSolution projectToAdd, ProjectConfigurationInSolution projectConfiguration, bool direct) 1084private static string GetToolsVersionMetadataForDirectMSBuildTask(ProjectInstance traversalProject) 1101private static string GetPropertiesMetadataForProjectReference(ProjectInstance traversalProject, string configurationAndPlatformProperties) 1140private bool CanBuildDirectly(ProjectInstance traversalProject, ProjectInSolution projectToAdd, ProjectConfigurationInSolution projectConfiguration) 1207private ProjectInstance CreateMetaproject(ProjectInstance traversalProject, ProjectInSolution project, ProjectConfigurationInSolution projectConfiguration) 1210ProjectInstance metaprojectInstance = new ProjectInstance(EscapingUtilities.UnescapeAll(GetMetaprojectName(project)), traversalProject, GetMetaprojectGlobalProperties(traversalProject)); 1302private void AddMetaprojectReferenceItems(ProjectInstance traversalProject, ProjectInstance metaprojectInstance, ProjectInSolution project) 1330private static void AddMetaprojectTargetForManagedProject(ProjectInstance traversalProject, ProjectInstance metaprojectInstance, ProjectInSolution project, ProjectConfigurationInSolution projectConfiguration, string targetName, string outputItem) 1349private static void AddProjectBuildTask(ProjectInstance traversalProject, ProjectConfigurationInSolution projectConfiguration, ProjectTargetInstance target, string targetToBuild, string sourceItems, string condition, string outputItem) 1848private void AddMetaprojectTargetForUnknownProjectType(ProjectInstance traversalProject, ProjectInstance metaprojectInstance, ProjectInSolution project, string targetName, string unknownProjectTypeErrorMessage) 1918private void AddValidateProjectsTarget(ProjectInstance traversalProject, List<ProjectInSolution> projects) 1960private static void AddTraversalReferencesTarget(ProjectInstance traversalProject, string targetName, string outputItem, bool batchBuildTargets) 2012private void AddTraversalTargetForProject(ProjectInstance traversalProject, ProjectInSolution project, ProjectConfigurationInSolution projectConfiguration, string targetToBuild, string outputItem, bool canBuildDirectly) 2057private IDictionary<string, string> GetMetaprojectGlobalProperties(ProjectInstance traversalProject) 2330private void AddInitialTargets(ProjectInstance traversalProject, List<ProjectInSolution> projects) 2341private void AddValidateSolutionConfigurationTarget(ProjectInstance traversalProject) 2376private static void AddValidateToolsVersionsTarget(ProjectInstance traversalProject) 2389private static void AddGetSolutionConfigurationContentsTarget(ProjectInstance traversalProject)
Definition\Project.cs (6)
1361public ProjectInstance CreateProjectInstance() 1375public ProjectInstance CreateProjectInstance(ProjectInstanceSettings settings) 1386public ProjectInstance CreateProjectInstance(ProjectInstanceSettings settings, EvaluationContext evaluationContext) 3274public override ProjectInstance CreateProjectInstance(ProjectInstanceSettings settings, EvaluationContext evaluationContext) 3342ProjectInstance instance = CreateProjectInstance(LoggingService, ProjectInstanceSettings.None, evaluationContext); 3702private ProjectInstance CreateProjectInstance(
Graph\GraphBuilder.cs (4)
53private ConcurrentDictionary<ConfigurationMetadata, Lazy<ProjectInstance>> _platformNegotiationInstancesCache = new(); 530var projectInstance = _projectInstanceFactory( 595private ProjectInstance GetInstanceForPlatformNegotiationWithCaching( 602new Lazy<ProjectInstance>(() => _projectInstanceFactory(projectPath, globalProperties, projectCollection))).Value;
Graph\ProjectGraph.cs (9)
33/// A callback used for constructing a <see cref="ProjectInstance" /> for a specific 39/// <returns>A <see cref="ProjectInstance" /> instance. This value must not be null.</returns> 55public delegate ProjectInstance ProjectInstanceFactoryFunc( 177/// A delegate used for constructing a <see cref="ProjectInstance" />, called for each 318/// A delegate used for constructing a <see cref="ProjectInstance" />, called for each 355/// A delegate used for constructing a <see cref="ProjectInstance" />, called for each 396/// A delegate used for constructing a <see cref="ProjectInstance" />, called for each 835internal ProjectInstance DefaultProjectInstanceFactory( 849internal static ProjectInstance StaticProjectInstanceFactory(
Graph\ProjectGraphNode.cs (2)
28internal ProjectGraphNode(ProjectInstance projectInstance) 49public ProjectInstance ProjectInstance { get; }
Graph\ProjectInterpretation.cs (9)
86ProjectInstance requesterInstance = projectGraphNode.ProjectInstance; 184var projectInstance = projectInstanceFactory( 215internal static string GetInnerBuildPropertyValue(ProjectInstance project) 220internal static string GetInnerBuildPropertyName(ProjectInstance project) 225internal static string GetInnerBuildPropertyValues(ProjectInstance project) 230internal static ProjectType GetProjectType(ProjectInstance project) 287private static IEnumerable<ProjectItemInstance> ConstructInnerBuildReferences(ProjectInstance outerBuild) 496public static TargetsToPropagate FromProjectAndEntryTargets(ProjectInstance project, ImmutableList<string> entryTargets) 558ProjectInstance projectInstance = projectGraphNode.ProjectInstance;
Instance\ProjectInstance.cs (23)
190/// of another ProjectInstance. <seealso cref="ProjectInstance(ProjectInstance, bool, RequestedProjectState)"/> 418/// The resulting <see cref="ProjectInstance"/> object wraps the <see cref="Project"/> 530internal ProjectInstance(string projectFile, ProjectInstance projectToInheritFrom, IDictionary<string, string> globalProperties) 592/// Initializes a new instance of the <see cref="ProjectInstance"/> class directly. 694private ProjectInstance(ProjectInstance that, bool isImmutable, RequestedProjectState filter = null) 857public static ProjectInstance FromFile(string file, ProjectOptions options) 876public static ProjectInstance FromProjectRootElement(ProjectRootElement rootElement, ProjectOptions options) 895public static ProjectInstance FromImmutableProjectSource(Project project, ProjectInstanceSettings settings) 1144/// of another ProjectInstance. <seealso cref="ProjectInstance(ProjectInstance, bool, RequestedProjectState)"/> 1902public ProjectInstance DeepCopy() 1917public ProjectInstance FilteredCopy(RequestedProjectState filter) 1927public ProjectInstance DeepCopy(bool isImmutable) 2183/// from the <see cref="ProjectInstance"/> provided. 2185/// <param name="projectState"><see cref="ProjectInstance"/> with the state to use.</param> 2186public void UpdateStateFrom(ProjectInstance projectState) 2203ErrorUtilities.VerifyThrow(TaskRegistry != null, $"{nameof(TaskRegistry)} Cannot be null after {nameof(ProjectInstance)} object creation."); 2383internal static ProjectInstance[] LoadSolutionForBuild( 2401ProjectInstance[] projectInstances = null; 2479internal static ProjectInstance FactoryForDeserialization(ITranslator translator) 2691private static ProjectInstance[] GenerateSolutionWrapper( 2717ProjectInstance[] instances = SolutionProjectGenerator.Generate(sp, globalProperties, toolsVersion, projectBuildEventContext, loggingService, targetNames, sdkResolverService, submissionId); 2744private static ProjectInstance[] GenerateSolutionWrapperUsingOldOM( 2818ProjectInstance instance = new(projectRootElement, globalProperties, toolsVersion, buildParameters, loggingService, projectBuildEventContext, sdkResolverService, submissionId);
Instance\ProjectItemInstance.cs (27)
46private ProjectInstance _project; 67internal ProjectItemInstance(ProjectInstance project, string itemType, string includeEscaped, string definingFileEscaped) 79internal ProjectItemInstance(ProjectInstance project, string itemType, string includeEscaped, string includeBeforeWildcardExpansionEscaped, string definingFileEscaped) 97internal ProjectItemInstance(ProjectInstance project, string itemType, string includeEscaped, string includeBeforeWildcardExpansionEscaped, CopyOnWritePropertyDictionary<ProjectMetadataInstance> directMetadata, List<ProjectItemDefinitionInstance> itemDefinitions, string definingFileEscaped) 113internal ProjectItemInstance(ProjectInstance project, string itemType, string includeEscaped, IEnumerable<KeyValuePair<string, string>> directMetadata, string definingFileEscaped) 138private ProjectItemInstance(ProjectItemInstance that, ProjectInstance newProject) 148private ProjectItemInstance(ProjectInstance projectInstance) 159public ProjectInstance Project 607internal static ProjectItemInstance FactoryForDeserialization(ITranslator translator, ProjectInstance projectInstance) 654internal ProjectItemInstance DeepClone(ProjectInstance newProject) 685private void CommonConstructor(ProjectInstance projectToUse, string itemTypeToUse, string includeEscaped, string includeBeforeWildcardExpansionEscaped, CopyOnWritePropertyDictionary<ProjectMetadataInstance> directMetadata, List<ProjectItemDefinitionInstance> itemDefinitions, string definingFileEscaped) 870ProjectInstance.VerifyThrowNotImmutable(_isImmutable); 896ProjectInstance.VerifyThrowNotImmutable(_isImmutable); 988ProjectInstance.VerifyThrowNotImmutable(_isImmutable); 1049ProjectInstance.VerifyThrowNotImmutable(_isImmutable); 1327ProjectInstance.VerifyThrowNotImmutable(_isImmutable); 1338ProjectInstance.VerifyThrowNotImmutable(_isImmutable); 1349ProjectInstance.VerifyThrowNotImmutable(_isImmutable); 1394ProjectInstance.VerifyThrowNotImmutable(destinationAsTaskItem._isImmutable); 1664ProjectInstance.VerifyThrowNotImmutable(_isImmutable); 1784ProjectInstance.VerifyThrowNotImmutable(_isImmutable); 1808ProjectInstance.VerifyThrowNotImmutable(_isImmutable); 1828ProjectInstance.VerifyThrowNotImmutable(_isImmutable); 1840ProjectInstance.VerifyThrowNotImmutable(_isImmutable); 1921private ProjectInstance _project; 1928internal ProjectItemInstanceFactory(ProjectInstance project) 1936internal ProjectItemInstanceFactory(ProjectInstance project, string itemType)
Instance\ProjectPropertyInstance.cs (1)
71ProjectInstance.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)
1827ProjectInstance instance = project.CreateProjectInstance();
Definition\Project_Tests.cs (7)
674ProjectInstance projectInstance = new ProjectInstance(xml); 711ProjectInstance projectInstance = new ProjectInstance(xml); 746ProjectInstance projectInstance = new ProjectInstance(xml); 783ProjectInstance projectInstance = new ProjectInstance(xml); 1749ProjectInstance projectInstance = project.CreateProjectInstance(); 3834var projectInstance = project.CreateProjectInstance(); 3846var newProjectInstance = project.CreateProjectInstance();
Definition\ProjectItem_Tests.cs (3)
953Should.Throw<InvalidProjectFileException>(() => { ProjectInstance.FromFile(testProjectFile, new ProjectOptions()); }); 964ProjectInstance.FromFile(testProjectFile, options); 3752var projectInstance = buildManager.GetProjectInstanceForBuild(project);
Definition\ProjectItemDefinition_Tests.cs (1)
445ProjectInstance instance = project.CreateProjectInstance();
Instance\ProjectInstance_Tests.cs (63)
41ProjectInstance i = p.CreateProjectInstance(); 52ProjectInstance p = GetSampleProjectInstance(); 64ProjectInstance p = GetSampleProjectInstance(); 84ProjectInstance p = GetEmptyProjectInstance(); 105ProjectInstance p = GetEmptyProjectInstance(); 126ProjectInstance p = GetEmptyProjectInstance(); 157ProjectInstance p = GetEmptyProjectInstance(); 169ProjectInstance p = GetEmptyProjectInstance(); 181ProjectInstance p = GetEmptyProjectInstance(); 191ProjectInstance p = GetEmptyProjectInstance(); 205ProjectInstance instance = p.CreateProjectInstance(); 223ProjectInstance first = GetSampleProjectInstance(); 224ProjectInstance second = first.DeepCopy(); 235ProjectInstance first = GetSampleProjectInstance(); 236ProjectInstance second = first.DeepCopy(); 263ProjectInstance project = GetProjectInstance(content); 306ProjectInstance projectInstance = GetProjectInstance(content); 328ProjectInstance first = GetSampleProjectInstance(); 329ProjectInstance second = first.DeepCopy(); 346ProjectInstance instance = new ProjectInstance(ProjectRootElement.Create()); 358ProjectInstance instance = new ProjectInstance(ProjectRootElement.Create()); 370ProjectInstance instance = new ProjectInstance(ProjectRootElement.Create()); 383ProjectInstance instance = new ProjectInstance(xml); 398ProjectInstance instance1 = new Project().CreateProjectInstance(); 428var projBInstance = projBEval.CreateProjectInstance(); 470var projBInstance = new ProjectInstance(projBEval, ProjectInstanceSettings.ImmutableWithFastItemLookup); 512var projBInstance = projBEval.CreateProjectInstance(); 669var instance = GetSampleProjectInstance(true /* immutable */); 680var instance = GetSampleProjectInstance(true /* immutable */); 691var instance = GetSampleProjectInstance(true /* immutable */); 702var instance = GetSampleProjectInstance(true /* immutable */); 713var instance = GetSampleProjectInstance(true /* immutable */); 724var instance = GetSampleProjectInstance(true /* immutable */); 735var instance = GetSampleProjectInstance(true /* immutable */); 746var instance = GetSampleProjectInstance(true /* immutable */); 757var instance = GetSampleProjectInstance(true /* immutable */); 768var instance = GetSampleProjectInstance(true /* immutable */); 779var instance = GetSampleProjectInstance(true /* immutable */); 790var instance = GetSampleProjectInstance(true /* immutable */); 801var instance = GetSampleProjectInstance(true /* immutable */); 812var instance = GetSampleProjectInstance(true /* immutable */); 823var instance = GetSampleProjectInstance(true /* immutable */); 834var instance = GetSampleProjectInstance(true /* immutable */); 846var instance = GetSampleProjectInstance(true /* immutable */); 858var instance = GetSampleProjectInstance(true /* immutable */); 869var protoInstance = GetSampleProjectInstance(true /* immutable */); 870var instance = protoInstance.DeepCopy(false /* mutable */); 888var protoInstance = GetSampleProjectInstance(false /* mutable */); 889var instance = protoInstance.DeepCopy(true /* immutable */); 910var protoInstance = GetSampleProjectInstance(true /* immutable */); 911var instance = protoInstance.DeepCopy(/* inherit */); 935var protoInstance = GetSampleProjectInstance(true /* immutable */); 936var instance = protoInstance.DeepCopy(true /* immutable */); 957var protoInstance = GetSampleProjectInstance(false /* mutable */); 958var instance = protoInstance.DeepCopy(/* inherit */); 974var protoInstance = GetSampleProjectInstance(false /* mutable */); 975var instance = protoInstance.DeepCopy(false /* mutable */); 988private static ProjectInstance GetSampleProjectInstance(bool isImmutable = false) 1017ProjectInstance p = GetProjectInstance(content, isImmutable); 1025private static ProjectInstance GetProjectInstance(string content, bool immutable = false) 1031ProjectInstance instance = immutable ? project.CreateProjectInstance(ProjectInstanceSettings.Immutable) : project.CreateProjectInstance(); 1039private static ProjectInstance GetEmptyProjectInstance() 1043ProjectInstance instance = project.CreateProjectInstance();
Instance\ProjectItemInstance_Tests.cs (4)
252ProjectInstance projectInstance = project.CreateProjectInstance(); 347ProjectInstance projectInstance = project.CreateProjectInstance(); 1171ProjectInstance project = new ProjectInstance(xml); 1193ProjectInstance projectInstance = project.CreateProjectInstance();
Instance\ProjectMetadataInstance_Tests.cs (1)
35ProjectInstance projectInstance = project.CreateProjectInstance();
Instance\ProjectOnErrorInstance_Tests.cs (1)
47ProjectInstance 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(); 147ProjectInstance instance = project.CreateProjectInstance();
Instance\ProjectTaskInstance_Tests.cs (1)
77ProjectInstance instance = project.CreateProjectInstance();
Instance\ProjectTaskOutputItemInstance_Tests.cs (1)
50ProjectInstance instance = project.CreateProjectInstance();
Instance\ProjectTaskOutputPropertyInstance_Tests.cs (1)
50ProjectInstance instance = project.CreateProjectInstance();
ObjectModelRemoting\RemoteProjectsProviderMock\EvaluationLinkMocks\MockProjectLink.cs (1)
185public override ProjectInstance CreateProjectInstance(ProjectInstanceSettings settings, EvaluationContext evaluationContext) => throw new NotImplementedException();
Microsoft.Build.Engine.UnitTests (325)
BackEnd\BatchingEngine_Tests.cs (4)
27ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 114ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 147ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 201ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance();
BackEnd\BuildManager_Tests.cs (29)
356ProjectInstance rootProject = GenerateDummyProjects(shutdownProjectDirectory, numberOfParallelProjectsToBuild, projectCollection); 1711ProjectInstance instance = _buildManager.GetProjectInstanceForBuild(project); 1742ProjectInstance instance = _buildManager.GetProjectInstanceForBuild(project); 1777ProjectInstance instance = _buildManager.GetProjectInstanceForBuild(project); 1834ProjectInstance instance = _buildManager.GetProjectInstanceForBuild(project); 1835ProjectInstance instance2 = _buildManager.GetProjectInstanceForBuild(project); 1862ProjectInstance instance = _buildManager.GetProjectInstanceForBuild(project); 1888ProjectInstance instance = _buildManager.GetProjectInstanceForBuild(project); 1920ProjectInstance instance = _buildManager.GetProjectInstanceForBuild(project); 1933ProjectInstance instance2 = _buildManager.GetProjectInstanceForBuild(project); 1970ProjectInstance projectInstance = CreateProjectInstance(contents1, null, _projectCollection, false); 1997ProjectInstance projectInstance2 = CreateProjectInstance(contents1, null, _projectCollection, false); 2201ProjectInstance instance = project.CreateProjectInstance(); 2252ProjectInstance instance = project.CreateProjectInstance(); 3075ProjectInstance pi = BuildManager.DefaultBuildManager.GetProjectInstanceForBuild(project1); 3086ProjectInstance pi = BuildManager.DefaultBuildManager.GetProjectInstanceForBuild(project2); 3154ProjectInstance pi = BuildManager.DefaultBuildManager.GetProjectInstanceForBuild(project2); 3166ProjectInstance pi = BuildManager.DefaultBuildManager.GetProjectInstanceForBuild(project1); 3241ProjectInstance pi = BuildManager.DefaultBuildManager.GetProjectInstanceForBuild(project2); 3253ProjectInstance pi = BuildManager.DefaultBuildManager.GetProjectInstanceForBuild(project1); 3344ProjectInstance instance = _buildManager.GetProjectInstanceForBuild(project); 3374ProjectInstance instance = _buildManager.GetProjectInstanceForBuild(project); 3405ProjectInstance instance = _buildManager.GetProjectInstanceForBuild(project); 3509private ProjectInstance CreateProjectInstance(string contents, string toolsVersion, ProjectCollection projectCollection, bool deleteTempProject) 3552private static ProjectInstance GenerateDummyProjects(string shutdownProjectDirectory, int parallelProjectCount, ProjectCollection projectCollection) 3640var mainInstance = mainProject.CreateProjectInstance(ProjectInstanceSettings.Immutable).DeepCopy(isImmutable: false); 3667var p2pInstance = p2pProject.CreateProjectInstance(ProjectInstanceSettings.Immutable).DeepCopy(isImmutable: false); 3792ProjectInstance instance = project.CreateProjectInstance(ProjectInstanceSettings.Immutable).DeepCopy(false); 4342ProjectInstance instance = _buildManager.GetProjectInstanceForBuild(project);
BackEnd\BuildRequestConfiguration_Tests.cs (5)
187ProjectInstance projectInstance = project.CreateProjectInstance(); 283ProjectInstance instance = project.CreateProjectInstance(); 359ProjectInstance instance = project.CreateProjectInstance(); 459ProjectInstance instance = project.CreateProjectInstance(); 561var projectInstance = project.CreateProjectInstance();
BackEnd\BuildRequestEngine_Tests.cs (1)
238private ProjectInstance CreateStandinProject()
BackEnd\IntrinsicTask_Tests.cs (17)
1239ProjectInstance p = project.CreateProjectInstance(); 1271ProjectInstance p = project.CreateProjectInstance(); 2247ProjectInstance p = project.CreateProjectInstance(); 2280ProjectInstance p = project.CreateProjectInstance(); 2316ProjectInstance p = project.CreateProjectInstance(); 2352ProjectInstance p = project.CreateProjectInstance(); 2388ProjectInstance p = project.CreateProjectInstance(); 2425ProjectInstance p = project.CreateProjectInstance(); 2455ProjectInstance p = project.CreateProjectInstance(); 3131ProjectInstance p = project.CreateProjectInstance(); 3176ProjectInstance p = project.CreateProjectInstance(); 3464ProjectInstance instance = new ProjectInstance(xml); 3820private static Lookup GenerateLookupWithItemsAndProperties(ProjectInstance project) 3829private static Lookup GenerateLookup(ProjectInstance project) 3834private static Lookup GenerateLookup(ProjectInstance project, PropertyDictionary<ProjectPropertyInstance> properties) 3864ProjectInstance projectInstance = project.CreateProjectInstance(); 3899var projectInstance = project.CreateProjectInstance();
BackEnd\Lookup_Tests.cs (24)
27ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 49ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 81ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 151ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 201ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 252ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 303ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 358ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 400ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 464ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 524ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 595ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 662ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 717ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 765ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 821ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 862ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 897ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 968ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 1014ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 1025ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 1076ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 1129ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 1166ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance();
BackEnd\MSBuild_Tests.cs (8)
145ProjectInstance pi = p.CreateProjectInstance(); 558ProjectInstance pi = p.CreateProjectInstance(); 627ProjectInstance pi = p.CreateProjectInstance(); 934ProjectInstance pi = p.CreateProjectInstance(); 1054ProjectInstance pi = p.CreateProjectInstance(); 1123ProjectInstance pi = p.CreateProjectInstance(); 1190ProjectInstance pi = p.CreateProjectInstance(); 1805ProjectInstance 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(); 117ProjectInstance project = CreateTestProject(); 143ProjectInstance project = CreateTestProject(); 165ProjectInstance project = CreateTestProject(); 356ProjectInstance project = CreateTestProject(projectBody); 495ProjectInstance project = CreateTestProject(projectBody); 520ProjectInstance project = CreateTestProject(projectBody); 545ProjectInstance project = CreateTestProject(projectBody); 574ProjectInstance project = CreateTestProject(projectBody); 608ProjectInstance project = CreateTestProject(projectBody); 639ProjectInstance project = CreateTestProject(projectBody); 669ProjectInstance project = CreateTestProject(projectBody); 694ProjectInstance project = CreateTestProject(projectBody); 729ProjectInstance project = CreateTestProject(projectBody); 754ProjectInstance project = CreateTestProject(projectBody); 780ProjectInstance project = CreateTestProject(projectBody); 809ProjectInstance project = CreateTestProject(projectBody); 852ProjectInstance project = CreateTestProject(projectBody); 878ProjectInstance project = CreateTestProject(projectBody); 904ProjectInstance project = CreateTestProject(projectBody); 935ProjectInstance project = CreateTestProject(projectBody); 1032ProjectInstance project = CreateTestProject(projectBody); 1066ProjectInstance project = CreateTestProject(projectBody); 1116ProjectInstance project = CreateTestProject(projectBody); 1175ProjectInstance project = CreateTestProject(projectBody); 1216ProjectInstance project = CreateTestProject(projectBody); 1261ProjectInstance project = CreateTestProject(projectBody); 1291ProjectInstance project = CreateTestProject(projectBody); 1364ProjectInstance project = CreateTestProject(projectBody); 1393var project = CreateTestProject(projectContents, string.Empty, "Build"); 1420var project = CreateTestProject(projectContents, string.Empty, "Build"); 1538private Lookup CreateStandardLookup(ProjectInstance project) 1548private ProjectInstance CreateTestProject() 1616private ProjectInstance CreateTestProject(string projectBodyContents) 1624private ProjectInstance CreateTestProject(string projectBodyContents, string initialTargets, string defaultTargets) 1672ProjectInstance project = CreateTestProject(projectBody);
BackEnd\TargetEntry_Tests.cs (23)
82ProjectInstance project = CreateTestProject(true /* Returns enabled */); 97ProjectInstance project = CreateTestProject(true /* Returns enabled */); 111ProjectInstance project = CreateTestProject(true /* Returns enabled */); 125ProjectInstance project = CreateTestProject(true /* Returns enabled */); 138ProjectInstance project = CreateTestProject(true /* Returns enabled */); 152ProjectInstance project = CreateTestProject(true /* Returns enabled */); 168ProjectInstance project = CreateTestProject(returnsEnabledForThisProject); 208ProjectInstance project = CreateTestProject(returnsEnabledForThisProject); 253ProjectInstance project = CreateTestProject(returnsEnabledForThisProject); 321ProjectInstance project = CreateTestProject(returnsEnabledForThisProject); 353ProjectInstance project = CreateTestProject(returnsEnabledForThisProject); 462ProjectInstance project = CreateTestProject(returnsEnabledForThisProject); 489ProjectInstance project = CreateTestProject(true /* returns are enabled */); 507ProjectInstance project = CreateTestProject(true /* returns are enabled */); 528ProjectInstance project = CreateTestProject(returnsEnabledForThisProject); 549ProjectInstance project = CreateTestProject(returnsEnabledForThisProject); 570ProjectInstance project = CreateTestProject(returnsEnabledForThisProject); 591ProjectInstance project = CreateTestProject(returnsEnabledForThisProject); 612ProjectInstance project = CreateTestProject(returnsEnabledForThisProject); 998private void ExecuteEntry(ProjectInstance project, TargetEntry entry) 1021private TargetEntry CreateStandardTargetEntry(ProjectInstance project, string targetName) 1039private TargetEntry CreateStandardTargetEntry(ProjectInstance project, string target, TargetEntry baseEntry) 1052private ProjectInstance CreateTestProject(bool returnsAttributeEnabled)
BackEnd\TargetUpToDateChecker_Tests.cs (4)
137ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 174ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 218ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 569ProjectInstance p = project.CreateProjectInstance();
BackEnd\TaskBuilder_Tests.cs (2)
46private ProjectInstance _testProject; 1170private ProjectInstance CreateTestProject()
BackEnd\TaskExecutionHost_Tests.cs (4)
986ProjectInstance project = CreateTestProject(); 1014ProjectInstance project = CreateTestProject(); 1240ProjectInstance project = CreateTestProject(); 1502private ProjectInstance CreateTestProject()
BackEnd\TaskHostFactory_Tests.cs (2)
45ProjectInstance projectInstance = new(project.Path); 193ProjectInstance projectInstance = new(project.ProjectFile);
BackEnd\TaskRegistry_Tests.cs (1)
2203ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance();
Collections\OMcollections_tests.cs (2)
312ProjectInstance projectInstance = project.CreateProjectInstance(); 324ProjectInstance projectInstance = project.CreateProjectInstance();
Construction\SolutionFilter_Tests.cs (1)
137ProjectInstance[] instances = SolutionProjectGenerator.Generate(solution, null, null, _buildEventContext, mockLogger);
Construction\SolutionProjectGenerator_Tests.cs (41)
74ProjectInstance[] instances = SolutionProjectGenerator.Generate(SolutionFile.Parse(sln.Path), null, null, _buildEventContext, CreateMockLoggingService()); 360ProjectInstance[] instances = SolutionProjectGenerator.Generate(solution, null, "3.5", _buildEventContext, CreateMockLoggingService()); 395ProjectInstance[] instances = SolutionProjectGenerator.Generate(solution, null, "3.5", _buildEventContext, CreateMockLoggingService()); 424ProjectInstance[] instances = SolutionProjectGenerator.Generate(solution, null, null, _buildEventContext, CreateMockLoggingService()); 466ProjectInstance[] instances = SolutionProjectGenerator.Generate(solution, null, null, _buildEventContext, CreateMockLoggingService()); 501ProjectInstance[] instances = SolutionProjectGenerator.Generate(solution, null, null, _buildEventContext, CreateMockLoggingService()); 613ProjectInstance[] instances = SolutionProjectGenerator.Generate(sp, null, null, _buildEventContext, CreateMockLoggingService()); 635ProjectInstance[] instances1 = SolutionProjectGenerator.Generate(sp1, null, null, _buildEventContext, CreateMockLoggingService()); 699ProjectInstance[] instances = SolutionProjectGenerator.Generate(sp, null, null, _buildEventContext, CreateMockLoggingService()); 760ProjectInstance[] instances = SolutionProjectGenerator.Generate(sp, null, null, _buildEventContext, CreateMockLoggingService()); 1027var projectBravoMetaProject = instances[1]; 1240var instance = SolutionProjectGenerator.Generate(solution, null, ObjectModelHelpers.MSBuildDefaultToolsVersion, _buildEventContext, CreateMockLoggingService())[0]; 1306ProjectInstance[] instances = SolutionProjectGenerator.Generate(solution, null, ObjectModelHelpers.MSBuildDefaultToolsVersion, _buildEventContext, CreateMockLoggingService()); 1309foreach (ProjectInstance instance in instances) 1444ProjectInstance[] instances = SolutionProjectGenerator.Generate(solution, null, "invalid", _buildEventContext, CreateMockLoggingService()); 1485ProjectInstance[] instances = SolutionProjectGenerator.Generate(solution, null, null, BuildEventContext.Invalid, CreateMockLoggingService()); 1563ProjectInstance[] instances = SolutionProjectGenerator.Generate(solution, null, null, BuildEventContext.Invalid, CreateMockLoggingService()); 1593ProjectInstance[] instances = SolutionProjectGenerator.Generate(solution, null, null, BuildEventContext.Invalid, CreateMockLoggingService()); 1618ProjectInstance msbuildProject = CreateVenusSolutionProject(globalProperties); 1647ProjectInstance msbuildProject = CreateVenusSolutionProject(); 1684ProjectInstance msbuildProject = CreateVenusSolutionProject("2.0"); 1710ProjectInstance msbuildProject = CreateVenusSolutionProject(); 1736ProjectInstance msbuildProject = CreateVenusSolutionProject(); 1840ProjectInstance[] instances = SolutionProjectGenerator.Generate(solution, null, null, BuildEventContext.Invalid, CreateMockLoggingService()); 1895ProjectInstance[] instances = SolutionProjectGenerator.Generate(solution, null, null, BuildEventContext.Invalid, CreateMockLoggingService()); 1973ProjectInstance[] instances = SolutionProjectGenerator.Generate(solution, globalProperties, null, BuildEventContext.Invalid, CreateMockLoggingService()); 1974ProjectInstance msbuildProject = instances[0]; 2236ProjectInstance[] instances = SolutionProjectGenerator.Generate(solution, globalProperties, null, BuildEventContext.Invalid, collection.LoggingService); 2278ProjectInstance[] instances = SolutionProjectGenerator.Generate(solution, null, null, BuildEventContext.Invalid, CreateMockLoggingService(), new List<string> { "One" }); 2329ProjectInstance[] instances = SolutionProjectGenerator.Generate(solution, null, null, BuildEventContext.Invalid, CreateMockLoggingService(), null); 2374ProjectInstance[] instances; 2457ProjectInstance projectInstance = SolutionProjectGenerator.Generate(solutionFile, null, null, BuildEventContext.Invalid, CreateMockLoggingService(), new[] { "MyTarget" }).FirstOrDefault(); 2515ProjectInstance projectInstance = SolutionProjectGenerator.Generate(solutionFile, null, null, BuildEventContext.Invalid, CreateMockLoggingService(), targetsToBuild).FirstOrDefault(); 2625ProjectInstance projectInstance = SolutionProjectGenerator.Generate(solutionFile, globalProperties, null, BuildEventContext.Invalid, CreateMockLoggingService(), new[] { "Build" }).FirstOrDefault(); 2666private ProjectInstance CreateVenusSolutionProject() 2674private ProjectInstance CreateVenusSolutionProject(IDictionary<string, string> globalProperties) 2682private ProjectInstance CreateVenusSolutionProject(string toolsVersion) 2693private ProjectInstance CreateVenusSolutionProject(IDictionary<string, string> globalProperties, string toolsVersion) 2732ProjectInstance[] instances = SolutionProjectGenerator.Generate(solution, globalProperties, toolsVersion, BuildEventContext.Invalid, CreateMockLoggingService()); 2750private void AssertProjectContainsItem(ProjectInstance msbuildProject, string itemType, string include) 2770private void AssertProjectItemNameCount(ProjectInstance msbuildProject, string itemType, int count)
Definition\ItemDefinitionGroup_Tests.cs (3)
579ProjectInstance pi = p.CreateProjectInstance(); 614ProjectInstance pi = p.CreateProjectInstance(); 655ProjectInstance pi = p.CreateProjectInstance();
Definition\ProjectEvaluationContext_Tests.cs (3)
152var projectInstance = ProjectInstance.FromFile( 247ProjectInstance.FromProjectRootElement(
Definition\ProjectHelpers.cs (2)
22internal static ProjectInstance CreateEmptyProjectInstance() 30ProjectInstance instance = project.CreateProjectInstance();
Definition\ToolsVersion_Tests.cs (4)
605ProjectInstance pi = project.CreateProjectInstance(); 674ProjectInstance pi = project.CreateProjectInstance(); 757ProjectInstance pi = new ProjectInstance(project.Xml, null /* no global properties */, null /* don't explicitly set the toolsversion */, p); 865ProjectInstance pi = new ProjectInstance(project.Xml, null /* no global properties */, null /* don't explicitly set the toolsversion */, p);
EscapingInProjects_Tests.cs (1)
650ProjectInstance projectInstance = project.CreateProjectInstance();
Evaluation\Evaluator_Tests.cs (5)
429ProjectInstance project = new ProjectInstance(subdirProjPath); 1399ProjectInstance instance = project.CreateProjectInstance(); 2265ProjectInstance instance = project.CreateProjectInstance(); 2289ProjectInstance instance = project.CreateProjectInstance(); 2312ProjectInstance instance = project.CreateProjectInstance();
Evaluation\Expander_Tests.cs (23)
84ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 137ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 172ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 192ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 212ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 233ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 250ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 276ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 649ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 687ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 707ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 727ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 745ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 794ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 1302ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 1515ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 3856ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 4742ProjectInstance projectInstance = new ProjectInstance(projectFile.Path); 4786ProjectInstance projectInstance = new ProjectInstance(projectFile.Path); 4815ProjectInstance projectInstance = new ProjectInstance(projectFile.Path); 4862ProjectInstance projectInstance = new ProjectInstance(projectFile.Path); 4903ProjectInstance projectInstance = new ProjectInstance(projectFile.Path); 4937ProjectInstance projectInstance = new ProjectInstance(projectFile.Path);
Evaluation\ItemSpec_Tests.cs (1)
97var dummyProject = ProjectHelpers.CreateEmptyProjectInstance();
EvaluationProfiler_Tests.cs (1)
282var projectInstance = _buildManager.GetProjectInstanceForBuild(project);
ExpressionTree_Tests.cs (6)
183ProjectInstance parentProject = new ProjectInstance(ProjectRootElement.Create()); 213ProjectInstance parentProject = new ProjectInstance(ProjectRootElement.Create()); 248ProjectInstance parentProject = new ProjectInstance(ProjectRootElement.Create()); 280ProjectInstance parentProject = new ProjectInstance(ProjectRootElement.Create()); 297ProjectInstance parentProject = new ProjectInstance(ProjectRootElement.Create()); 326ProjectInstance parentProject = new ProjectInstance(ProjectRootElement.Create());
ExpressionTreeExpression_Tests.cs (1)
374ProjectInstance parentProject = new ProjectInstance(xml);
Graph\ProjectGraph_Tests.cs (2)
134var projectInstance = new Project().CreateProjectInstance(); 181var projectInstance = new Project().CreateProjectInstance();
Instance\HostServices_Tests.cs (3)
391ProjectInstance project = CreateDummyProject("foo.proj"); 475public ProjectInstance CreateDummyProject(string fileName) 486ProjectInstance instance = project.CreateProjectInstance();
Instance\ProjectInstance_Internal_Tests.cs (57)
70ProjectInstance project = new Project(ProjectRootElement.Create(XmlReader.Create(new StringReader(projectFileContent)))).CreateProjectInstance(); 117ProjectInstance project = new Project(ProjectRootElement.Create(XmlReader.Create(new StringReader(projectFileContent)))).CreateProjectInstance(); 142ProjectInstance project = new Project(ProjectRootElement.Create(XmlReader.Create(new StringReader(projectFileContent)))).CreateProjectInstance(); 170ProjectInstance p = GetProjectInstance(content); 208ProjectInstance p = GetProjectInstance(content); 254ProjectInstance p = GetSampleProjectInstance(); 265ProjectInstance p = GetSampleProjectInstance(); 277ProjectInstance p = GetSampleProjectInstance(); 285var projectInstance = new ProjectInstance( 300ProjectInstance first = GetSampleProjectInstance(null, null, projectCollection, toolsVersion: "TESTTV"); 301ProjectInstance second = first.DeepCopy(); 319ProjectInstance p = GetSampleProjectInstance(null, null, new ProjectCollection()); 352ProjectInstance p = GetSampleProjectInstance(null, null, new ProjectCollection()); 379ProjectInstance p = GetSampleProjectInstance(null, globalProperties, new ProjectCollection()); 418ProjectInstance p = new ProjectInstance(xml, globalProperties, ObjectModelHelpers.MSBuildDefaultToolsVersion, "ABCDEF", new ProjectCollection(projectCollectionGlobalProperties)); 436ProjectInstance p = GetSampleProjectInstance(); 447ProjectInstance p = GetSampleProjectInstance(); 460ProjectInstance first = GetSampleProjectInstance(hostServices); 461ProjectInstance second = first.DeepCopy(); 480ProjectInstance first = GetSampleProjectInstance(); 481ProjectInstance second = first.DeepCopy(); 493ProjectInstance first = GetSampleProjectInstance(); 494ProjectInstance second = first.DeepCopy(); 506ProjectInstance first = GetSampleProjectInstance(); 507ProjectInstance second = first.DeepCopy(); 518ProjectInstance first = GetSampleProjectInstance(); 519ProjectInstance second = first.DeepCopy(); 530ProjectInstance first = GetSampleProjectInstance(); 531ProjectInstance second = first.DeepCopy(); 542ProjectInstance first = GetSampleProjectInstance(); 545ProjectInstance second = first.DeepCopy(); 573ProjectInstance projectInstance = GetProjectInstance(projectFileContent); 682var original = new ProjectInstance(ProjectRootElement.Create(XmlReader.Create(new StringReader(ObjectModelHelpers.CleanupFileContents(projectContents))))); 687var copy = ProjectInstance.FactoryForDeserialization(TranslationHelpers.GetReadTranslator()); 692public delegate ProjectInstance ProjectInstanceFactory(string file, ProjectRootElement xml, ProjectCollection collection); 705(f, xml, c) => ProjectInstance.FromFile(f, new ProjectOptions { ProjectCollection = c }) 729(f, xml, c) => ProjectInstance.FromProjectRootElement(xml, new ProjectOptions { ProjectCollection = c }) 737var pi = new ProjectInstance(f, null, null, c); 742var copy = ProjectInstance.FactoryForDeserialization(TranslationHelpers.GetReadTranslator()); 761var projectInstance = projectInstanceFactory.Invoke(file, xml, projectCollection); 774ProjectInstance projectInstance = new ProjectInstance(rootElement); 809ProjectInstance projectInstance = new ProjectInstance(rootElement); 852ProjectInstance projectInstance = useDirectConstruction 886ProjectInstance projectInstance = ProjectInstance.FromFile( 914ProjectInstance projectInstance = ProjectInstance.FromProjectRootElement( 929private static ProjectInstance GetProjectInstance(string content) 937private static ProjectInstance GetProjectInstance(string content, HostServices hostServices) 945private static ProjectInstance GetProjectInstance(string content, HostServices hostServices, IDictionary<string, string> globalProperties, ProjectCollection projectCollection, string toolsVersion = null) 959ProjectInstance instance = project.CreateProjectInstance(); 967private static ProjectInstance GetSampleProjectInstance() 975private static ProjectInstance GetSampleProjectInstance(HostServices hostServices) 983private static ProjectInstance GetSampleProjectInstance(HostServices hostServices, IDictionary<string, string> globalProperties, ProjectCollection projectCollection, string toolsVersion = null) 1008ProjectInstance 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.UnitTests (9)
AssignLinkMetadata_Tests.cs (1)
181ProjectInstance pi = p.CreateProjectInstance();
CallTarget_Tests.cs (1)
176ProjectInstance instance = project.CreateProjectInstance();
Exec_Tests.cs (2)
960var project = collection.LoadProject(testProject.ProjectFile).CreateProjectInstance(); 1017var project = collection.LoadProject(testProject.ProjectFile).CreateProjectInstance();
ResolveSDKReference_Tests.cs (5)
3812ProjectInstance project = pc.LoadProject(testProjectFile).CreateProjectInstance(); 3955ProjectInstance project = pc.LoadProject(testProjectFile).CreateProjectInstance(); 4064ProjectInstance project = pc.LoadProject(testProjectFile).CreateProjectInstance(); 4161ProjectInstance project = pc.LoadProject(testProjectFile).CreateProjectInstance(); 4330ProjectInstance project = pc.LoadProject(testProjectFile).CreateProjectInstance();
Microsoft.Build.UnitTests.Shared (3)
MockEngine.cs (1)
314ProjectInstance instance = _projectCollection.LoadProject(projectFileNames[i], finalGlobalProperties, null).CreateProjectInstance();
ObjectModelHelpers.cs (2)
1474var p = ProjectInstance.FromFile(testProjectFile, new ProjectOptions());
Microsoft.Build.Utilities.UnitTests (7)
MuxLogger_Tests.cs (7)
53ProjectInstance project = (new Project(XmlReader.Create(new StringReader(projectBody)))).CreateProjectInstance(); 95ProjectInstance project = (new Project(XmlReader.Create(new StringReader(projectBody)), null, ObjectModelHelpers.MSBuildDefaultToolsVersion, projectCollection)).CreateProjectInstance(); 142ProjectInstance project = (new Project(XmlReader.Create(new StringReader(projectBody)))).CreateProjectInstance(); 193ProjectInstance project1 = (new Project(XmlReader.Create(new StringReader(projectBody1)))).CreateProjectInstance(); 194ProjectInstance project2 = (new Project(XmlReader.Create(new StringReader(projectBody2)))).CreateProjectInstance(); 248ProjectInstance project = (new Project(XmlReader.Create(new StringReader(projectBody)))).CreateProjectInstance(); 296ProjectInstance project = (new Project(XmlReader.Create(new StringReader(projectBody)))).CreateProjectInstance();
MSBuild (2)
JsonOutputFormatter.cs (1)
46internal void AddItemInstancesInJsonFormat(string[] itemNames, ProjectInstance project)
XMake.cs (1)
1097ProjectInstance builtProject = result.ProjectStateAfterBuild;