68 instantiations of ProjectInstance
Microsoft.Build (15)
BackEnd\BuildManager\BuildManager.cs (1)
2097return new ProjectInstance(
BackEnd\Shared\BuildRequestConfiguration.cs (1)
490return 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)
3727return new ProjectInstance(_data, DirectoryPath, FullPath, ProjectCollection.HostServices, ProjectCollection.EnvironmentProperties, settings);
Graph\ProjectGraph.cs (1)
855return new ProjectInstance(
Instance\ProjectInstance.cs (9)
199/// of another ProjectInstance. <seealso cref="ProjectInstance(ProjectInstance, bool, RequestedProjectState)"/> 921return new ProjectInstance( 940return new ProjectInstance( 960return new ProjectInstance(project, fastItemLookupNeeded); 1310/// of another ProjectInstance. <seealso cref="ProjectInstance(ProjectInstance, bool, RequestedProjectState)"/> 2157return new ProjectInstance(this, true, filter); 2173return new ProjectInstance(this, isImmutable); 2762return new ProjectInstance(translator); 3104ProjectInstance 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 (43)
BackEnd\BuildManager_Tests.cs (1)
3704return new ProjectInstance(rootProject);
BackEnd\IntrinsicTask_Tests.cs (1)
3541ProjectInstance instance = new ProjectInstance(xml);
BackEnd\ResultsCache_Tests.cs (1)
311resultForRequestWithSubsetFlag1.ProjectStateAfterBuild = new ProjectInstance(ProjectRootElement.Create(xmlReader)).FilteredCopy(requestedProjectState1);
BackEnd\TaskHost_Tests.cs (1)
83configuration.Project = new ProjectInstance(ProjectRootElement.Create());
BackEnd\TaskHostCallback_Tests.cs (6)
53ProjectInstance projectInstance = new(project.ProjectFile); 132ProjectInstance projectInstance = new(project.ProjectFile); 165ProjectInstance projectInstance = new(project.ProjectFile); 197ProjectInstance projectInstance = new(project.ProjectFile); 277ProjectInstance projectInstance = new(project.ProjectFile); 324ProjectInstance projectInstance = new(project.ProjectFile);
BackEnd\TaskHostFactory_Tests.cs (4)
72ProjectInstance projectInstance = new(project.Path); 177ProjectInstance projectInstance = new(project.Path); 330ProjectInstance projectInstance = new(project.ProjectFile); 389ProjectInstance projectInstance = new(project.Path);
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)
4903ProjectInstance projectInstance = new ProjectInstance(projectFile.Path); 4947ProjectInstance projectInstance = new ProjectInstance(projectFile.Path); 4976ProjectInstance projectInstance = new ProjectInstance(projectFile.Path); 5023ProjectInstance projectInstance = new ProjectInstance(projectFile.Path); 5064ProjectInstance projectInstance = new ProjectInstance(projectFile.Path); 5098ProjectInstance projectInstance = new ProjectInstance(projectFile.Path); 5144new ProjectInstance(projectFile.Path); 5185new ProjectInstance(projectFile.Path); 5217new ProjectInstance(projectFile.Path);
ExpressionTree_Tests.cs (6)
182ProjectInstance parentProject = new ProjectInstance(ProjectRootElement.Create()); 212ProjectInstance parentProject = new ProjectInstance(ProjectRootElement.Create()); 247ProjectInstance parentProject = new ProjectInstance(ProjectRootElement.Create()); 279ProjectInstance parentProject = new ProjectInstance(ProjectRootElement.Create()); 296ProjectInstance parentProject = new ProjectInstance(ProjectRootElement.Create()); 325ProjectInstance parentProject = new ProjectInstance(ProjectRootElement.Create());
ExpressionTreeExpression_Tests.cs (1)
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)
700 references to ProjectInstance
Microsoft.Build (177)
BackEnd\BuildManager\BuildManager.cs (6)
191private readonly Dictionary<ProjectInstance, string> _unnamedProjectInstanceToNames; 306_unnamedProjectInstanceToNames = new Dictionary<ProjectInstance, string>(); 926public ProjectInstance GetProjectInstanceForBuild(Project project) 1430ProjectInstance? projectInstance = submission.BuildRequestData.ProjectInstance; 1661var instances = ProjectInstance.LoadSolutionForBuild( 1706ProjectInstance newInstance = project.CreateProjectInstance();
BackEnd\BuildManager\BuildRequestData.cs (6)
22public BuildRequestData(ProjectInstance projectInstance, string[] targetsToBuild) 33public BuildRequestData(ProjectInstance projectInstance, string[] targetsToBuild, HostServices hostServices) 45public BuildRequestData(ProjectInstance projectInstance, string[] targetsToBuild, HostServices? hostServices, BuildRequestDataFlags flags) 58public BuildRequestData(ProjectInstance projectInstance, string[] targetsToBuild, HostServices? hostServices, BuildRequestDataFlags flags, IEnumerable<string>? propertiesToTransfer) 87public BuildRequestData(ProjectInstance projectInstance, string[] targetsToBuild, HostServices? hostServices, BuildRequestDataFlags flags, IEnumerable<string>? propertiesToTransfer, RequestedProjectState requestedProjectState) 167public ProjectInstance? ProjectInstance
BackEnd\Components\ProjectCache\ProjectCacheService.cs (1)
173private IEnumerable<ProjectCacheDescriptor> GetProjectCacheDescriptors(ProjectInstance projectInstance)
BackEnd\Components\RequestBuilder\IntrinsicTask.cs (3)
26protected IntrinsicTask(TargetLoggingContext loggingContext, ProjectInstance projectInstance, bool logTaskInputs) 45internal ProjectInstance Project 68internal static IntrinsicTask InstantiateTask(ProjectTargetInstanceChild taskInstance, TargetLoggingContext loggingContext, ProjectInstance projectInstance, bool logTaskInputs)
BackEnd\Components\RequestBuilder\IntrinsicTasks\ItemGroupIntrinsicTask.cs (1)
42public ItemGroupIntrinsicTask(ProjectItemGroupTaskInstance taskInstance, TargetLoggingContext loggingContext, ProjectInstance projectInstance, bool logTaskInputs)
BackEnd\Components\RequestBuilder\IntrinsicTasks\PropertyGroupIntrinsicTask.cs (1)
37public PropertyGroupIntrinsicTask(ProjectPropertyGroupTaskInstance taskInstance, TargetLoggingContext loggingContext, ProjectInstance projectInstance, bool logTaskInputs)
BackEnd\Components\RequestBuilder\RequestBuilder.cs (2)
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)
89private ProjectInstance _project; 94private ProjectInstance _transferredState; 212internal BuildRequestConfiguration(int configId, ProjectInstance instance) 381public ProjectInstance Project 416private void SetProjectBasedState(ProjectInstance project) 510private void InitializeProject(BuildParameters buildParameters, Func<ProjectInstance> loadProjectFromFile) 939translator.Translate(ref _transferredState, ProjectInstance.FactoryForDeserialization); 980internal void ApplyTransferredState(ProjectInstance instance)
BackEnd\Shared\BuildResult.cs (11)
131/// <see cref="ProjectInstance"/> state after the build. This is only provided if <see cref="BuildRequest.BuildRequestDataFlags"/> 135/// be used to retrieve <see cref="ProjectInstance.Properties"/>, <see cref="ProjectInstance.GlobalProperties"/> and 136/// <see cref="ProjectInstance.Items"/> from it. No other operation is guaranteed to be supported. 138private ProjectInstance? _projectStateAfterBuild; 410/// <see cref="ProjectInstance"/> state after the build. In general, it may be a non buildable-dummy object, and should only 411/// be used to retrieve <see cref="ProjectInstance.Properties"/>, <see cref="ProjectInstance.GlobalProperties"/> and 412/// <see cref="ProjectInstance.Items"/> from it. Any other operation is not guaranteed to be supported. 414public ProjectInstance? ProjectStateAfterBuild 636translator.Translate(ref _projectStateAfterBuild, ProjectInstance.FactoryForDeserialization);
BackEnd\TaskExecutionHost\TaskExecutionHost.cs (3)
87private ProjectInstance _projectInstance; 218public ProjectInstance ProjectInstance => _projectInstance; 265ProjectInstance projectInstance,
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) 3293public override ProjectInstance CreateProjectInstance(ProjectInstanceSettings settings, EvaluationContext evaluationContext) 3361ProjectInstance instance = CreateProjectInstance(LoggingService, ProjectInstanceSettings.None, evaluationContext); 3720private ProjectInstance CreateProjectInstance(
Graph\GraphBuilder.cs (4)
54private ConcurrentDictionary<ConfigurationMetadata, Lazy<ProjectInstance>> _platformNegotiationInstancesCache = new(); 531var projectInstance = _projectInstanceFactory( 596private ProjectInstance GetInstanceForPlatformNegotiationWithCaching( 603new Lazy<ProjectInstance>(() => _projectInstanceFactory(projectPath, globalProperties, projectCollection))).Value;
Graph\ProjectGraph.cs (9)
33/// A callback used for constructing a <see cref="ProjectInstance" /> for a specific 39/// <returns>A <see cref="ProjectInstance" /> instance. This value must not be null.</returns> 55public delegate ProjectInstance ProjectInstanceFactoryFunc( 177/// A delegate used for constructing a <see cref="ProjectInstance" />, called for each 318/// A delegate used for constructing a <see cref="ProjectInstance" />, called for each 355/// A delegate used for constructing a <see cref="ProjectInstance" />, called for each 396/// A delegate used for constructing a <see cref="ProjectInstance" />, called for each 835internal ProjectInstance DefaultProjectInstanceFactory( 849internal static ProjectInstance StaticProjectInstanceFactory(
Graph\ProjectGraphNode.cs (2)
26internal ProjectGraphNode(ProjectInstance projectInstance) 47public ProjectInstance ProjectInstance { get; }
Graph\ProjectInterpretation.cs (9)
82ProjectInstance requesterInstance = projectGraphNode.ProjectInstance; 180var projectInstance = projectInstanceFactory( 211internal static string GetInnerBuildPropertyValue(ProjectInstance project) 216internal static string GetInnerBuildPropertyName(ProjectInstance project) 221internal static string GetInnerBuildPropertyValues(ProjectInstance project) 226internal static ProjectType GetProjectType(ProjectInstance project) 283private static IEnumerable<ProjectItemInstance> ConstructInnerBuildReferences(ProjectInstance outerBuild) 492public static TargetsToPropagate FromProjectAndEntryTargets(ProjectInstance project, ImmutableList<string> entryTargets) 554ProjectInstance projectInstance = projectGraphNode.ProjectInstance;
Instance\ProjectInstance.cs (28)
199/// of another ProjectInstance. <seealso cref="ProjectInstance(ProjectInstance, bool, RequestedProjectState)"/> 423/// The resulting <see cref="ProjectInstance"/> object wraps the <see cref="Project"/> 563internal ProjectInstance(string projectFile, ProjectInstance projectToInheritFrom, IDictionary<string, string> globalProperties) 626/// Initializes a new instance of the <see cref="ProjectInstance"/> class directly. 739private ProjectInstance(ProjectInstance that, bool isImmutable, RequestedProjectState filter = null) 919public static ProjectInstance FromFile(string file, ProjectOptions options) 938public static ProjectInstance FromProjectRootElement(ProjectRootElement rootElement, ProjectOptions options) 957public static ProjectInstance FromImmutableProjectSource(Project project, ProjectInstanceSettings settings) 981ProjectInstance owningProjectInstance) 1003ProjectInstance owningProjectInstance, 1310/// of another ProjectInstance. <seealso cref="ProjectInstance(ProjectInstance, bool, RequestedProjectState)"/> 2140public ProjectInstance DeepCopy() 2155public ProjectInstance FilteredCopy(RequestedProjectState filter) 2165public ProjectInstance DeepCopy(bool isImmutable) 2422/// from the <see cref="ProjectInstance"/> provided. 2424/// <param name="projectState"><see cref="ProjectInstance"/> with the state to use.</param> 2425public void UpdateStateFrom(ProjectInstance projectState) 2442ErrorUtilities.VerifyThrow(TaskRegistry != null, $"{nameof(TaskRegistry)} Cannot be null after {nameof(ProjectInstance)} object creation."); 2622internal static ProjectInstance[] LoadSolutionForBuild( 2640ProjectInstance[] projectInstances = null; 2686private static ProjectInstance[] CalculateToolsVersionAndGenerateSolutionWrapper( 2712ProjectInstance[] projectInstances = null; 2760internal static ProjectInstance FactoryForDeserialization(ITranslator translator) 2977private static ProjectInstance[] GenerateSolutionWrapper( 3003ProjectInstance[] instances = SolutionProjectGenerator.Generate(sp, globalProperties, toolsVersion, projectBuildEventContext, loggingService, targetNames, sdkResolverService, submissionId); 3030private static ProjectInstance[] GenerateSolutionWrapperUsingOldOM( 3104ProjectInstance instance = new(projectRootElement, globalProperties, toolsVersion, buildParameters, loggingService, projectBuildEventContext, sdkResolverService, submissionId); 3486ProjectInstance projectInstance,
Instance\ProjectItemInstance.cs (30)
49private ProjectInstance _project; 70internal ProjectItemInstance(ProjectInstance project, string itemType, string includeEscaped, string definingFileEscaped) 82internal ProjectItemInstance(ProjectInstance project, string itemType, string includeEscaped, string includeBeforeWildcardExpansionEscaped, string definingFileEscaped) 101ProjectInstance project, 124internal ProjectItemInstance(ProjectInstance project, string itemType, string includeEscaped, IEnumerable<KeyValuePair<string, string>> directMetadata, string definingFileEscaped) 148private ProjectItemInstance(ProjectItemInstance that, ProjectInstance newProject) 158private ProjectItemInstance(ProjectInstance projectInstance) 169public ProjectInstance Project 638internal static ProjectItemInstance FactoryForDeserialization(ITranslator translator, ProjectInstance projectInstance) 696internal ProjectItemInstance DeepClone(ProjectInstance newProject) 728ProjectInstance projectToUse, 933ProjectInstance.VerifyThrowNotImmutable(_isImmutable); 959ProjectInstance.VerifyThrowNotImmutable(_isImmutable); 1053ProjectInstance.VerifyThrowNotImmutable(_isImmutable); 1151ProjectInstance.VerifyThrowNotImmutable(_isImmutable); 1170ProjectInstance.VerifyThrowNotImmutable(_isImmutable); 1455ProjectInstance.VerifyThrowNotImmutable(_isImmutable); 1466ProjectInstance.VerifyThrowNotImmutable(_isImmutable); 1477ProjectInstance.VerifyThrowNotImmutable(_isImmutable); 1523ProjectInstance.VerifyThrowNotImmutable(destinationAsTaskItem._isImmutable); 1838ProjectInstance.VerifyThrowNotImmutable(_isImmutable); 1956ProjectInstance.VerifyThrowNotImmutable(_isImmutable); 1973ProjectInstance.VerifyThrowNotImmutable(_isImmutable); 1994ProjectInstance.VerifyThrowNotImmutable(_isImmutable); 2013ProjectInstance.VerifyThrowNotImmutable(_isImmutable); 2024ProjectInstance.VerifyThrowNotImmutable(_isImmutable); 2039ProjectInstance.VerifyThrowNotImmutable(_isImmutable); 2208private ProjectInstance _project; 2215internal ProjectItemInstanceFactory(ProjectInstance project) 2223internal ProjectItemInstanceFactory(ProjectInstance project, string itemType)
Instance\ProjectPropertyInstance.cs (1)
76ProjectInstance.VerifyThrowNotImmutable(IsImmutable);
ObjectModelRemoting\DefinitionObjectsLinks\ProjectLink.cs (1)
234public abstract ProjectInstance CreateProjectInstance(ProjectInstanceSettings settings, EvaluationContext evaluationContext);
Microsoft.Build.Engine.OM.UnitTests (91)
Definition\DefinitionEditing_Tests.cs (1)
1829ProjectInstance instance = project.CreateProjectInstance();
Definition\Project_Tests.cs (7)
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)
57ProjectInstance instance = project.CreateProjectInstance(); 77ProjectInstance instance = project.CreateProjectInstance(); 97ProjectInstance instance = project.CreateProjectInstance(); 148ProjectInstance instance = project.CreateProjectInstance();
Instance\ProjectTaskInstance_Tests.cs (1)
76ProjectInstance instance = project.CreateProjectInstance();
Instance\ProjectTaskOutputItemInstance_Tests.cs (1)
49ProjectInstance instance = project.CreateProjectInstance();
Instance\ProjectTaskOutputPropertyInstance_Tests.cs (1)
49ProjectInstance instance = project.CreateProjectInstance();
ObjectModelRemoting\RemoteProjectsProviderMock\EvaluationLinkMocks\MockProjectLink.cs (1)
185public override ProjectInstance CreateProjectInstance(ProjectInstanceSettings settings, EvaluationContext evaluationContext) => throw new NotImplementedException();
Microsoft.Build.Engine.UnitTests (342)
BackEnd\BatchingEngine_Tests.cs (4)
28ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 126ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 163ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 225ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance();
BackEnd\BuildManager_Tests.cs (29)
355ProjectInstance rootProject = GenerateDummyProjects(shutdownProjectDirectory, numberOfParallelProjectsToBuild, projectCollection); 1778ProjectInstance instance = _buildManager.GetProjectInstanceForBuild(project); 1808ProjectInstance instance = _buildManager.GetProjectInstanceForBuild(project); 1843ProjectInstance instance = _buildManager.GetProjectInstanceForBuild(project); 1900ProjectInstance instance = _buildManager.GetProjectInstanceForBuild(project); 1901ProjectInstance instance2 = _buildManager.GetProjectInstanceForBuild(project); 1928ProjectInstance instance = _buildManager.GetProjectInstanceForBuild(project); 1954ProjectInstance instance = _buildManager.GetProjectInstanceForBuild(project); 1986ProjectInstance instance = _buildManager.GetProjectInstanceForBuild(project); 1999ProjectInstance instance2 = _buildManager.GetProjectInstanceForBuild(project); 2036ProjectInstance projectInstance = CreateProjectInstance(contents1, null, _projectCollection, false); 2063ProjectInstance projectInstance2 = CreateProjectInstance(contents1, null, _projectCollection, false); 2267ProjectInstance instance = project.CreateProjectInstance(); 2318ProjectInstance instance = project.CreateProjectInstance(); 3141ProjectInstance pi = BuildManager.DefaultBuildManager.GetProjectInstanceForBuild(project1); 3152ProjectInstance pi = BuildManager.DefaultBuildManager.GetProjectInstanceForBuild(project2); 3220ProjectInstance pi = BuildManager.DefaultBuildManager.GetProjectInstanceForBuild(project2); 3232ProjectInstance pi = BuildManager.DefaultBuildManager.GetProjectInstanceForBuild(project1); 3307ProjectInstance pi = BuildManager.DefaultBuildManager.GetProjectInstanceForBuild(project2); 3319ProjectInstance pi = BuildManager.DefaultBuildManager.GetProjectInstanceForBuild(project1); 3410ProjectInstance instance = _buildManager.GetProjectInstanceForBuild(project); 3440ProjectInstance instance = _buildManager.GetProjectInstanceForBuild(project); 3471ProjectInstance instance = _buildManager.GetProjectInstanceForBuild(project); 3620private ProjectInstance CreateProjectInstance(string contents, string toolsVersion, ProjectCollection projectCollection, bool deleteTempProject) 3662private static ProjectInstance GenerateDummyProjects(string shutdownProjectDirectory, int parallelProjectCount, ProjectCollection projectCollection) 3751var mainInstance = mainProject.CreateProjectInstance(ProjectInstanceSettings.Immutable).DeepCopy(isImmutable: false); 3778var p2pInstance = p2pProject.CreateProjectInstance(ProjectInstanceSettings.Immutable).DeepCopy(isImmutable: false); 3903ProjectInstance instance = project.CreateProjectInstance(ProjectInstanceSettings.Immutable).DeepCopy(false); 4457ProjectInstance 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)
234private ProjectInstance CreateStandinProject()
BackEnd\IntrinsicTask_Tests.cs (17)
1278ProjectInstance p = project.CreateProjectInstance(); 1311ProjectInstance p = project.CreateProjectInstance(); 2298ProjectInstance p = project.CreateProjectInstance(); 2332ProjectInstance p = project.CreateProjectInstance(); 2369ProjectInstance p = project.CreateProjectInstance(); 2406ProjectInstance p = project.CreateProjectInstance(); 2443ProjectInstance p = project.CreateProjectInstance(); 2481ProjectInstance p = project.CreateProjectInstance(); 2512ProjectInstance p = project.CreateProjectInstance(); 3199ProjectInstance p = project.CreateProjectInstance(); 3245ProjectInstance p = project.CreateProjectInstance(); 3541ProjectInstance instance = new ProjectInstance(xml); 3913private static Lookup GenerateLookupWithItemsAndProperties(ProjectInstance project) 3922private static Lookup GenerateLookup(ProjectInstance project) 3927private static Lookup GenerateLookup(ProjectInstance project, PropertyDictionary<ProjectPropertyInstance> properties) 3958ProjectInstance projectInstance = project.CreateProjectInstance(); 3993var projectInstance = project.CreateProjectInstance();
BackEnd\Lookup_Tests.cs (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)
110ProjectInstance projectInstance = CreateProjectInstance(projectPath, MSBuildDefaultToolsVersion, _projectCollection); 155ProjectInstance projectInstance = CreateProjectInstance(entryProjectPath, MSBuildDefaultToolsVersion, _projectCollection); 198private ProjectInstance CreateProjectInstance(string projectPath, string toolsVersion, ProjectCollection projectCollection)
BackEnd\TargetBuilder_Tests.cs (36)
103ProjectInstance project = CreateTestProject(); 123ProjectInstance project = CreateTestProject(); 150ProjectInstance project = CreateTestProject(); 173ProjectInstance project = CreateTestProject(); 365ProjectInstance project = CreateTestProject(projectBody); 505ProjectInstance project = CreateTestProject(projectBody); 531ProjectInstance project = CreateTestProject(projectBody); 557ProjectInstance project = CreateTestProject(projectBody); 587ProjectInstance project = CreateTestProject(projectBody); 622ProjectInstance project = CreateTestProject(projectBody); 654ProjectInstance project = CreateTestProject(projectBody); 685ProjectInstance project = CreateTestProject(projectBody); 711ProjectInstance project = CreateTestProject(projectBody); 747ProjectInstance project = CreateTestProject(projectBody); 773ProjectInstance project = CreateTestProject(projectBody); 800ProjectInstance project = CreateTestProject(projectBody); 830ProjectInstance project = CreateTestProject(projectBody); 874ProjectInstance project = CreateTestProject(projectBody); 901ProjectInstance project = CreateTestProject(projectBody); 928ProjectInstance project = CreateTestProject(projectBody); 960ProjectInstance project = CreateTestProject(projectBody); 1058ProjectInstance project = CreateTestProject(projectBody); 1093ProjectInstance project = CreateTestProject(projectBody); 1144ProjectInstance project = CreateTestProject(projectBody); 1204ProjectInstance project = CreateTestProject(projectBody); 1246ProjectInstance project = CreateTestProject(projectBody); 1292ProjectInstance project = CreateTestProject(projectBody); 1323ProjectInstance project = CreateTestProject(projectBody); 1397ProjectInstance project = CreateTestProject(projectBody); 1427var project = CreateTestProject(projectContents, string.Empty, "Build"); 1455var project = CreateTestProject(projectContents, string.Empty, "Build"); 1574private Lookup CreateStandardLookup(ProjectInstance project) 1584private ProjectInstance CreateTestProject() 1652private ProjectInstance CreateTestProject(string projectBodyContents) 1660private ProjectInstance CreateTestProject(string projectBodyContents, string initialTargets, string defaultTargets) 1709ProjectInstance project = CreateTestProject(projectBody);
BackEnd\TargetEntry_Tests.cs (23)
90ProjectInstance project = CreateTestProject(true /* Returns enabled */); 105ProjectInstance project = CreateTestProject(true /* Returns enabled */); 119ProjectInstance project = CreateTestProject(true /* Returns enabled */); 133ProjectInstance project = CreateTestProject(true /* Returns enabled */); 146ProjectInstance project = CreateTestProject(true /* Returns enabled */); 160ProjectInstance project = CreateTestProject(true /* Returns enabled */); 174ProjectInstance project = CreateTestProject(returnsEnabledForThisProject); 211ProjectInstance project = CreateTestProject(returnsEnabledForThisProject); 253ProjectInstance project = CreateTestProject(returnsEnabledForThisProject); 318ProjectInstance project = CreateTestProject(returnsEnabledForThisProject); 347ProjectInstance project = CreateTestProject(returnsEnabledForThisProject); 453ProjectInstance project = CreateTestProject(returnsEnabledForThisProject); 479ProjectInstance project = CreateTestProject(true /* returns are enabled */); 497ProjectInstance project = CreateTestProject(true /* returns are enabled */); 516ProjectInstance project = CreateTestProject(returnsEnabledForThisProject); 534ProjectInstance project = CreateTestProject(returnsEnabledForThisProject); 552ProjectInstance project = CreateTestProject(returnsEnabledForThisProject); 570ProjectInstance project = CreateTestProject(returnsEnabledForThisProject); 588ProjectInstance project = CreateTestProject(returnsEnabledForThisProject); 897private void ExecuteEntry(ProjectInstance project, TargetEntry entry) 920private TargetEntry CreateStandardTargetEntry(ProjectInstance project, string targetName) 938private TargetEntry CreateStandardTargetEntry(ProjectInstance project, string target, TargetEntry baseEntry) 951private ProjectInstance CreateTestProject(bool returnsAttributeEnabled)
BackEnd\TargetUpToDateChecker_Tests.cs (4)
169ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 206ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 250ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 609ProjectInstance p = project.CreateProjectInstance();
BackEnd\TaskExecutionHost_Tests.cs (4)
986ProjectInstance project = CreateTestProject(); 1017ProjectInstance project = CreateTestProject(); 1250ProjectInstance project = CreateTestProject(); 1504private ProjectInstance CreateTestProject()
BackEnd\TaskHostCallback_Tests.cs (6)
53ProjectInstance projectInstance = new(project.ProjectFile); 132ProjectInstance projectInstance = new(project.ProjectFile); 165ProjectInstance projectInstance = new(project.ProjectFile); 197ProjectInstance projectInstance = new(project.ProjectFile); 277ProjectInstance projectInstance = new(project.ProjectFile); 324ProjectInstance projectInstance = new(project.ProjectFile);
BackEnd\TaskHostFactory_Tests.cs (4)
72ProjectInstance projectInstance = new(project.Path); 177ProjectInstance projectInstance = new(project.Path); 330ProjectInstance projectInstance = new(project.ProjectFile); 389ProjectInstance projectInstance = new(project.Path);
BackEnd\TaskRegistry_Tests.cs (1)
2068ProjectInstance 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)
650ProjectInstance 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)
83ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 140ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 175ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 195ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 215ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 236ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 253ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 279ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 690ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 728ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 748ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 768ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 786ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 835ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 1396ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 1609ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 3969ProjectInstance project = ProjectHelpers.CreateEmptyProjectInstance(); 4903ProjectInstance projectInstance = new ProjectInstance(projectFile.Path); 4947ProjectInstance projectInstance = new ProjectInstance(projectFile.Path); 4976ProjectInstance projectInstance = new ProjectInstance(projectFile.Path); 5023ProjectInstance projectInstance = new ProjectInstance(projectFile.Path); 5064ProjectInstance projectInstance = new ProjectInstance(projectFile.Path); 5098ProjectInstance projectInstance = new ProjectInstance(projectFile.Path);
Evaluation\ItemSpec_Tests.cs (1)
103var dummyProject = ProjectHelpers.CreateEmptyProjectInstance();
Evaluation\SdkResultEvaluation_Tests.cs (1)
538var instance = project.CreateProjectInstance();
EvaluationProfiler_Tests.cs (1)
281var projectInstance = _buildManager.GetProjectInstanceForBuild(project);
ExpressionTree_Tests.cs (6)
182ProjectInstance parentProject = new ProjectInstance(ProjectRootElement.Create()); 212ProjectInstance parentProject = new ProjectInstance(ProjectRootElement.Create()); 247ProjectInstance parentProject = new ProjectInstance(ProjectRootElement.Create()); 279ProjectInstance parentProject = new ProjectInstance(ProjectRootElement.Create()); 296ProjectInstance parentProject = new ProjectInstance(ProjectRootElement.Create()); 325ProjectInstance parentProject = new ProjectInstance(ProjectRootElement.Create());
ExpressionTreeExpression_Tests.cs (1)
374ProjectInstance parentProject = new ProjectInstance(xml);
Graph\ProjectGraph_Tests.cs (2)
135var projectInstance = new Project().CreateProjectInstance(); 182var 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();
InstanceFromRemote\FakeProjectLink.cs (1)
87public override ProjectInstance CreateProjectInstance(ProjectInstanceSettings settings, EvaluationContext evaluationContext) => throw new NotImplementedException();
InstanceFromRemote\ProjectInstance_FromImmutableProjectLink_Tests.cs (8)
26ProjectInstance instance = ProjectInstance.FromImmutableProjectSource(project, ProjectInstanceSettings.ImmutableWithFastItemLookup); 44ProjectInstance instance = ProjectInstance.FromImmutableProjectSource(project, ProjectInstanceSettings.ImmutableWithFastItemLookup); 65ProjectInstance instance = ProjectInstance.FromImmutableProjectSource(project, ProjectInstanceSettings.ImmutableWithFastItemLookup); 100ProjectInstance instance = ProjectInstance.FromImmutableProjectSource(project, ProjectInstanceSettings.ImmutableWithFastItemLookup);
TestComparers\ProjectInstanceModelTestComparers.cs (4)
22public class ProjectInstanceComparer : IEqualityComparer<ProjectInstance> 24public bool Equals(ProjectInstance x, ProjectInstance y) 74public int GetHashCode(ProjectInstance obj)
Microsoft.Build.Tasks.CodeAnalysis.UnitTests (29)
TargetTests.cs (29)
34var instance = CreateProjectInstance(xmlReader); 58var instance = CreateProjectInstance(xmlReader); 82var instance = CreateProjectInstance(xmlReader); 107var instance = CreateProjectInstance(xmlReader); 134var instance = CreateProjectInstance(xmlReader); 160var instance = CreateProjectInstance(xmlReader); 193var instance = CreateProjectInstance(xmlReader); 222var instance = CreateProjectInstance(xmlReader); 254var instance = CreateProjectInstance(xmlReader); 296var instance = CreateProjectInstance(xmlReader); 336var instance = CreateProjectInstance(xmlReader); 371var instance = CreateProjectInstance(xmlReader); 429var instance = CreateProjectInstance(xmlReader); 458var instance = CreateProjectInstance(xmlReader); 482var instance = CreateProjectInstance(xmlReader); 509var instance = CreateProjectInstance(xmlReader); 534var instance = CreateProjectInstance(xmlReader); 558var instance = CreateProjectInstance(xmlReader); 584var instance = CreateProjectInstance(xmlReader); 605var instance = CreateProjectInstance(xmlReader); 630var instance = CreateProjectInstance(xmlReader); 656var instance = CreateProjectInstance(xmlReader); 695var instance = CreateProjectInstance(xmlReader); 752var instance = CreateProjectInstance(xmlReader); 813var instance = CreateProjectInstance(xmlReader); 875var instance = CreateProjectInstance(xmlReader); 893var instance = CreateProjectInstance(xmlReader); 910var instance = CreateProjectInstance(xmlReader); 925private static ProjectInstance CreateProjectInstance(XmlReader reader)
Microsoft.Build.Tasks.UnitTests (9)
AssignLinkMetadata_Tests.cs (1)
181ProjectInstance pi = p.CreateProjectInstance();
CallTarget_Tests.cs (1)
176ProjectInstance instance = project.CreateProjectInstance();
Exec_Tests.cs (2)
981var project = collection.LoadProject(testProject.ProjectFile).CreateProjectInstance(); 1038var project = collection.LoadProject(testProject.ProjectFile).CreateProjectInstance();
ResolveSDKReference_Tests.cs (5)
3811ProjectInstance project = pc.LoadProject(testProjectFile).CreateProjectInstance(); 3954ProjectInstance project = pc.LoadProject(testProjectFile).CreateProjectInstance(); 4063ProjectInstance project = pc.LoadProject(testProjectFile).CreateProjectInstance(); 4160ProjectInstance project = pc.LoadProject(testProjectFile).CreateProjectInstance(); 4329ProjectInstance project = pc.LoadProject(testProjectFile).CreateProjectInstance();
Microsoft.Build.UnitTests.Shared (3)
MockEngine.cs (1)
338ProjectInstance instance = _projectCollection.LoadProject(projectFileNames[i], finalGlobalProperties, null).CreateProjectInstance();
ObjectModelHelpers.cs (2)
1495var p = ProjectInstance.FromFile(testProjectFile, new ProjectOptions());
Microsoft.Build.Utilities.UnitTests (7)
MuxLogger_Tests.cs (7)
52ProjectInstance project = (projectFromString.Project).CreateProjectInstance(); 95ProjectInstance project = projectFromString.Project.CreateProjectInstance(); 147ProjectInstance project = (projectFromString.Project).CreateProjectInstance(); 200ProjectInstance project1 = projectFromString1.Project.CreateProjectInstance(); 201ProjectInstance project2 = projectFromString2.Project.CreateProjectInstance(); 256ProjectInstance project = (projectFromString.Project).CreateProjectInstance(); 305ProjectInstance project = (projectFromString.Project).CreateProjectInstance();
Microsoft.CodeAnalysis.ExternalAccess.HotReload (2)
Api\HotReloadMSBuildWorkspace.cs (1)
32public HotReloadMSBuildWorkspace(ILogger logger, Func<string, (ImmutableArray<MSB.Execution.ProjectInstance> instances, MSB.Evaluation.Project? project)> getBuildProjects)
Api\HotReloadMSBuildWorkspace.ProjectFileInfoProvider.cs (1)
18Func<string, (ImmutableArray<MSB.Execution.ProjectInstance> instances, MSB.Evaluation.Project? project)> getBuildProjects,
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (38)
Build\ProjectBuildManager.cs (6)
277public async Task<ImmutableArray<MSB.Execution.ProjectInstance>> BuildProjectInstancesAsync( 297var results = new FixedSizeArrayBuilder<MSB.Execution.ProjectInstance>(targetFrameworks.Length); 303var projectInstance = await BuildProjectInstanceAsync(project, log, cancellationToken).ConfigureAwait(false); 321private Task<MSB.Execution.ProjectInstance> BuildProjectInstanceAsync( 332private async Task<MSB.Execution.ProjectInstance> BuildProjectInstanceAsync( 337var 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\CSharpProjectCommandLineReader.cs (2)
18public override IEnumerable<MSB.Framework.ITaskItem> GetCompilerCommandLineArgs(MSB.Execution.ProjectInstance executedProject) 21public 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 (16)
17public static IEnumerable<MSB.Framework.ITaskItem> GetAdditionalFiles(this MSB.Execution.ProjectInstance executedProject) 20public static IEnumerable<MSB.Framework.ITaskItem> GetAnalyzers(this MSB.Execution.ProjectInstance executedProject) 23public static IEnumerable<MSB.Framework.ITaskItem> GetDocuments(this MSB.Execution.ProjectInstance executedProject) 26public static IEnumerable<MSB.Framework.ITaskItem> GetEditorConfigFiles(this MSB.Execution.ProjectInstance executedProject) 29public static IEnumerable<MetadataReferenceItem> GetMetadataReferences(this MSB.Execution.ProjectInstance project) 40public static string GetAbsolutePath(this MSB.Execution.ProjectInstance project, string path) 47public static IEnumerable<ProjectFileReference> GetProjectReferences(this MSB.Execution.ProjectInstance executedProject) 52public static ImmutableArray<PackageReferenceItem> GetPackageReferences(this MSB.Execution.ProjectInstance executedProject) 91public static string? ReadPropertyString(this MSB.Execution.ProjectInstance executedProject, string propertyName) 94public static bool ReadPropertyBool(this MSB.Execution.ProjectInstance executedProject, string propertyName) 97public static int ReadPropertyInt(this MSB.Execution.ProjectInstance executedProject, string propertyName) 100public static int ReadCodePage(this MSB.Execution.ProjectInstance executedProject) 103public static ulong ReadPropertyULong(this MSB.Execution.ProjectInstance executedProject, string propertyName) 106public static TEnum? ReadPropertyEnum<TEnum>(this MSB.Execution.ProjectInstance executedProject, string propertyName, bool ignoreCase) 110public static string ReadItemsAsString(this MSB.Execution.ProjectInstance executedProject, string itemType) 128public static IEnumerable<MSB.Framework.ITaskItem> GetTaskItems(this MSB.Execution.ProjectInstance executedProject, string itemType)
MSBuild\ProjectFile\ProjectCommandLineReader.cs (2)
17public abstract IEnumerable<MSB.Framework.ITaskItem> GetCompilerCommandLineArgs(MSB.Execution.ProjectInstance executedProject); 18public abstract ImmutableArray<string> ReadCommandLineArgs(MSB.Execution.ProjectInstance project);
MSBuild\ProjectFile\ProjectInstanceReader.cs (4)
19public readonly MSB.Execution.ProjectInstance _projectInstance; 28MSB.Execution.ProjectInstance projectInstance, 151private static ImmutableArray<string> GetContentFiles(MSB.Execution.ProjectInstance project) 159private ImmutableArray<string> TryGetCommandLineArgs(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\VisualBasicProjectCommandLineReader.cs (2)
18public override IEnumerable<MSB.Framework.ITaskItem> GetCompilerCommandLineArgs(MSB.Execution.ProjectInstance executedProject) 21public override ImmutableArray<string> ReadCommandLineArgs(MSB.Execution.ProjectInstance project)
MSBuild (2)
JsonOutputFormatter.cs (1)
46internal void AddItemInstancesInJsonFormat(string[] itemNames, ProjectInstance project)
XMake.cs (1)
1142ProjectInstance builtProject = result.ProjectStateAfterBuild;