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