60 instantiations of ProjectInstance
Microsoft.Build (15)
BackEnd\BuildManager\BuildManager.cs (1)
1929
return new
ProjectInstance
(
BackEnd\Shared\BuildRequestConfiguration.cs (1)
479
return new
ProjectInstance
(
Construction\Solution\SolutionProjectGenerator.cs (2)
994
var traversalInstance = new
ProjectInstance
(
1210
ProjectInstance metaprojectInstance = new
ProjectInstance
(EscapingUtilities.UnescapeAll(GetMetaprojectName(project)), traversalProject, GetMetaprojectGlobalProperties(traversalProject));
Definition\Project.cs (1)
3709
return new
ProjectInstance
(_data, DirectoryPath, FullPath, ProjectCollection.HostServices, ProjectCollection.EnvironmentProperties, settings);
Graph\ProjectGraph.cs (1)
855
return new
ProjectInstance
(
Instance\ProjectInstance.cs (9)
190
/// of another ProjectInstance. <seealso cref="
ProjectInstance
(ProjectInstance, bool, RequestedProjectState)"/>
859
return new
ProjectInstance
(
878
return new
ProjectInstance
(
898
return new
ProjectInstance
(project, fastItemLookupNeeded);
1144
/// of another ProjectInstance. <seealso cref="
ProjectInstance
(ProjectInstance, bool, RequestedProjectState)"/>
1919
return new
ProjectInstance
(this, true, filter);
1935
return new
ProjectInstance
(this, isImmutable);
2481
return new
ProjectInstance
(translator);
2818
ProjectInstance instance =
new
(projectRootElement, globalProperties, toolsVersion, buildParameters, loggingService, projectBuildEventContext, sdkResolverService, submissionId);
Microsoft.Build.Engine.OM.UnitTests (10)
Definition\Project_Tests.cs (4)
674
ProjectInstance projectInstance = new
ProjectInstance
(xml);
711
ProjectInstance projectInstance = new
ProjectInstance
(xml);
746
ProjectInstance projectInstance = new
ProjectInstance
(xml);
783
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)
1171
ProjectInstance project = new
ProjectInstance
(xml);
Microsoft.Build.Engine.UnitTests (35)
BackEnd\BuildManager_Tests.cs (1)
3594
return new
ProjectInstance
(rootProject);
BackEnd\IntrinsicTask_Tests.cs (1)
3464
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);
193
ProjectInstance projectInstance =
new
(project.ProjectFile);
Definition\ToolsVersion_Tests.cs (2)
757
ProjectInstance pi = new
ProjectInstance
(project.Xml, null /* no global properties */, null /* don't explicitly set the toolsversion */, p);
865
ProjectInstance pi = new
ProjectInstance
(project.Xml, null /* no global properties */, null /* don't explicitly set the toolsversion */, p);
Evaluation\Evaluator_Tests.cs (1)
429
ProjectInstance project = new
ProjectInstance
(subdirProjPath);
Evaluation\Expander_Tests.cs (9)
4742
ProjectInstance projectInstance = new
ProjectInstance
(projectFile.Path);
4786
ProjectInstance projectInstance = new
ProjectInstance
(projectFile.Path);
4815
ProjectInstance projectInstance = new
ProjectInstance
(projectFile.Path);
4862
ProjectInstance projectInstance = new
ProjectInstance
(projectFile.Path);
4903
ProjectInstance projectInstance = new
ProjectInstance
(projectFile.Path);
4937
ProjectInstance projectInstance = new
ProjectInstance
(projectFile.Path);
4983
new
ProjectInstance
(projectFile.Path);
5024
new
ProjectInstance
(projectFile.Path);
5056
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)
285
var projectInstance = new
ProjectInstance
(
418
ProjectInstance p = new
ProjectInstance
(xml, globalProperties, ObjectModelHelpers.MSBuildDefaultToolsVersion, "ABCDEF", new ProjectCollection(projectCollectionGlobalProperties));
682
var original = new
ProjectInstance
(ProjectRootElement.Create(XmlReader.Create(new StringReader(ObjectModelHelpers.CleanupFileContents(projectContents)))));
699
(f, xml, c) => new
ProjectInstance
(f, null, null, c)
717
(f, xml, c) => new
ProjectInstance
(f, null, null, c).DeepCopy()
723
(f, xml, c) => new
ProjectInstance
(xml, null, null, c)
737
var pi = new
ProjectInstance
(f, null, null, c);
774
ProjectInstance projectInstance = new
ProjectInstance
(rootElement);
809
ProjectInstance projectInstance = new
ProjectInstance
(rootElement);
853
? new
ProjectInstance
(rootElement, globalProperties: null, toolsVersion: null, buildParameters, projectCollection.LoggingService, buildEventContext, sdkResolverService: null, 0)
599 references to ProjectInstance
Microsoft.Build (162)
BackEnd\BuildManager\BuildManager.cs (6)
200
private readonly Dictionary<
ProjectInstance
, string> _unnamedProjectInstanceToNames;
310
_unnamedProjectInstanceToNames = new Dictionary<
ProjectInstance
, string>();
863
public
ProjectInstance
GetProjectInstanceForBuild(Project project)
1269
ProjectInstance
projectInstance = submission.BuildRequestData.ProjectInstance;
1465
var instances =
ProjectInstance
.LoadSolutionForBuild(
1510
ProjectInstance
newInstance = project.CreateProjectInstance();
BackEnd\BuildManager\BuildRequestData.cs (6)
99
public BuildRequestData(
ProjectInstance
projectInstance, string[] targetsToBuild)
110
public BuildRequestData(
ProjectInstance
projectInstance, string[] targetsToBuild, HostServices hostServices)
122
public BuildRequestData(
ProjectInstance
projectInstance, string[] targetsToBuild, HostServices hostServices, BuildRequestDataFlags flags)
135
public BuildRequestData(
ProjectInstance
projectInstance, string[] targetsToBuild, HostServices hostServices, BuildRequestDataFlags flags, IEnumerable<string> propertiesToTransfer)
165
public BuildRequestData(
ProjectInstance
projectInstance, string[] targetsToBuild, HostServices hostServices, BuildRequestDataFlags flags, IEnumerable<string> propertiesToTransfer, RequestedProjectState requestedProjectState)
249
public
ProjectInstance
ProjectInstance
BackEnd\Components\ProjectCache\ProjectCacheService.cs (1)
171
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)
41
public ItemGroupIntrinsicTask(ProjectItemGroupTaskInstance taskInstance, TargetLoggingContext loggingContext,
ProjectInstance
projectInstance, bool logTaskInputs)
BackEnd\Components\RequestBuilder\IntrinsicTasks\PropertyGroupIntrinsicTask.cs (1)
34
public PropertyGroupIntrinsicTask(ProjectPropertyGroupTaskInstance taskInstance, TargetLoggingContext loggingContext,
ProjectInstance
projectInstance, bool logTaskInputs)
BackEnd\Components\RequestBuilder\RequestBuilder.cs (2)
1362
ProjectInstance
project = _requestEntry?.RequestConfiguration?.Project;
1402
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)
1231
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)
910
translator.Translate(ref _transferredState,
ProjectInstance
.FactoryForDeserialization);
951
internal void ApplyTransferredState(
ProjectInstance
instance)
BackEnd\Shared\BuildResult.cs (11)
110
/// <see cref="
ProjectInstance
"/> state after the build. This is only provided if <see cref="BuildRequest.BuildRequestDataFlags"/>
114
/// be used to retrieve <see cref="
ProjectInstance
.Properties"/>, <see cref="
ProjectInstance
.GlobalProperties"/> and
115
/// <see cref="
ProjectInstance
.Items"/> from it. No other operation is guaranteed to be supported.
117
private
ProjectInstance
_projectStateAfterBuild;
385
/// <see cref="
ProjectInstance
"/> state after the build. In general, it may be a non buildable-dummy object, and should only
386
/// be used to retrieve <see cref="
ProjectInstance
.Properties"/>, <see cref="
ProjectInstance
.GlobalProperties"/> and
387
/// <see cref="
ProjectInstance
.Items"/> from it. Any other operation is not guaranteed to be supported.
389
public
ProjectInstance
ProjectStateAfterBuild
598
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()
715
private
ProjectInstance
[] CreateSolutionProject(string wrapperProjectToolsVersion, bool explicitToolsVersionSpecified)
743
var projectInstances = new List<
ProjectInstance
>(projectsInOrder.Count + 1);
746
ProjectInstance
traversalInstance = CreateTraversalInstance(wrapperProjectToolsVersion, explicitToolsVersionSpecified, projectsInOrder);
775
foreach (
ProjectInstance
instance in projectInstances)
786
private void EvaluateAndAddProjects(List<ProjectInSolution> projectsInOrder, List<
ProjectInstance
> projectInstances,
ProjectInstance
traversalInstance, string selectedSolutionConfiguration)
821
ProjectInstance
metaproject = CreateMetaproject(traversalInstance, project, projectConfiguration);
836
private void AddStandardTraversalTargets(
ProjectInstance
traversalInstance, List<ProjectInSolution> projectsInOrder)
851
private
ProjectInstance
CreateTraversalInstance(string wrapperProjectToolsVersion, bool explicitToolsVersionSpecified, List<ProjectInSolution> projectsInOrder)
994
var
traversalInstance = new ProjectInstance(
1051
private void AddProjectReference(
ProjectInstance
traversalProject,
ProjectInstance
projectInstance, ProjectInSolution projectToAdd, ProjectConfigurationInSolution projectConfiguration, bool direct)
1084
private static string GetToolsVersionMetadataForDirectMSBuildTask(
ProjectInstance
traversalProject)
1101
private static string GetPropertiesMetadataForProjectReference(
ProjectInstance
traversalProject, string configurationAndPlatformProperties)
1140
private bool CanBuildDirectly(
ProjectInstance
traversalProject, ProjectInSolution projectToAdd, ProjectConfigurationInSolution projectConfiguration)
1207
private
ProjectInstance
CreateMetaproject(
ProjectInstance
traversalProject, ProjectInSolution project, ProjectConfigurationInSolution projectConfiguration)
1210
ProjectInstance
metaprojectInstance = new ProjectInstance(EscapingUtilities.UnescapeAll(GetMetaprojectName(project)), traversalProject, GetMetaprojectGlobalProperties(traversalProject));
1302
private void AddMetaprojectReferenceItems(
ProjectInstance
traversalProject,
ProjectInstance
metaprojectInstance, ProjectInSolution project)
1330
private static void AddMetaprojectTargetForManagedProject(
ProjectInstance
traversalProject,
ProjectInstance
metaprojectInstance, ProjectInSolution project, ProjectConfigurationInSolution projectConfiguration, string targetName, string outputItem)
1349
private static void AddProjectBuildTask(
ProjectInstance
traversalProject, ProjectConfigurationInSolution projectConfiguration, ProjectTargetInstance target, string targetToBuild, string sourceItems, string condition, string outputItem)
1848
private void AddMetaprojectTargetForUnknownProjectType(
ProjectInstance
traversalProject,
ProjectInstance
metaprojectInstance, ProjectInSolution project, string targetName, string unknownProjectTypeErrorMessage)
1918
private void AddValidateProjectsTarget(
ProjectInstance
traversalProject, List<ProjectInSolution> projects)
1960
private static void AddTraversalReferencesTarget(
ProjectInstance
traversalProject, string targetName, string outputItem, bool batchBuildTargets)
2012
private void AddTraversalTargetForProject(
ProjectInstance
traversalProject, ProjectInSolution project, ProjectConfigurationInSolution projectConfiguration, string targetToBuild, string outputItem, bool canBuildDirectly)
2057
private IDictionary<string, string> GetMetaprojectGlobalProperties(
ProjectInstance
traversalProject)
2330
private void AddInitialTargets(
ProjectInstance
traversalProject, List<ProjectInSolution> projects)
2341
private void AddValidateSolutionConfigurationTarget(
ProjectInstance
traversalProject)
2376
private static void AddValidateToolsVersionsTarget(
ProjectInstance
traversalProject)
2389
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)
3274
public override
ProjectInstance
CreateProjectInstance(ProjectInstanceSettings settings, EvaluationContext evaluationContext)
3342
ProjectInstance
instance = CreateProjectInstance(LoggingService, ProjectInstanceSettings.None, evaluationContext);
3702
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)
86
ProjectInstance
requesterInstance = projectGraphNode.ProjectInstance;
184
var
projectInstance = projectInstanceFactory(
215
internal static string GetInnerBuildPropertyValue(
ProjectInstance
project)
220
internal static string GetInnerBuildPropertyName(
ProjectInstance
project)
225
internal static string GetInnerBuildPropertyValues(
ProjectInstance
project)
230
internal static ProjectType GetProjectType(
ProjectInstance
project)
287
private static IEnumerable<ProjectItemInstance> ConstructInnerBuildReferences(
ProjectInstance
outerBuild)
496
public static TargetsToPropagate FromProjectAndEntryTargets(
ProjectInstance
project, ImmutableList<string> entryTargets)
558
ProjectInstance
projectInstance = projectGraphNode.ProjectInstance;
Instance\ProjectInstance.cs (23)
190
/// of another ProjectInstance. <seealso cref="ProjectInstance(
ProjectInstance
, bool, RequestedProjectState)"/>
418
/// The resulting <see cref="
ProjectInstance
"/> object wraps the <see cref="Project"/>
530
internal ProjectInstance(string projectFile,
ProjectInstance
projectToInheritFrom, IDictionary<string, string> globalProperties)
592
/// Initializes a new instance of the <see cref="
ProjectInstance
"/> class directly.
694
private ProjectInstance(
ProjectInstance
that, bool isImmutable, RequestedProjectState filter = null)
857
public static
ProjectInstance
FromFile(string file, ProjectOptions options)
876
public static
ProjectInstance
FromProjectRootElement(ProjectRootElement rootElement, ProjectOptions options)
895
public static
ProjectInstance
FromImmutableProjectSource(Project project, ProjectInstanceSettings settings)
1144
/// of another ProjectInstance. <seealso cref="ProjectInstance(
ProjectInstance
, bool, RequestedProjectState)"/>
1902
public
ProjectInstance
DeepCopy()
1917
public
ProjectInstance
FilteredCopy(RequestedProjectState filter)
1927
public
ProjectInstance
DeepCopy(bool isImmutable)
2183
/// from the <see cref="
ProjectInstance
"/> provided.
2185
/// <param name="projectState"><see cref="
ProjectInstance
"/> with the state to use.</param>
2186
public void UpdateStateFrom(
ProjectInstance
projectState)
2203
ErrorUtilities.VerifyThrow(TaskRegistry != null, $"{nameof(TaskRegistry)} Cannot be null after {nameof(
ProjectInstance
)} object creation.");
2383
internal static
ProjectInstance
[] LoadSolutionForBuild(
2401
ProjectInstance
[] projectInstances = null;
2479
internal static
ProjectInstance
FactoryForDeserialization(ITranslator translator)
2691
private static
ProjectInstance
[] GenerateSolutionWrapper(
2717
ProjectInstance
[] instances = SolutionProjectGenerator.Generate(sp, globalProperties, toolsVersion, projectBuildEventContext, loggingService, targetNames, sdkResolverService, submissionId);
2744
private static
ProjectInstance
[] GenerateSolutionWrapperUsingOldOM(
2818
ProjectInstance
instance = new(projectRootElement, globalProperties, toolsVersion, buildParameters, loggingService, projectBuildEventContext, sdkResolverService, submissionId);
Instance\ProjectItemInstance.cs (27)
46
private
ProjectInstance
_project;
67
internal ProjectItemInstance(
ProjectInstance
project, string itemType, string includeEscaped, string definingFileEscaped)
79
internal ProjectItemInstance(
ProjectInstance
project, string itemType, string includeEscaped, string includeBeforeWildcardExpansionEscaped, string definingFileEscaped)
97
internal ProjectItemInstance(
ProjectInstance
project, string itemType, string includeEscaped, string includeBeforeWildcardExpansionEscaped, CopyOnWritePropertyDictionary<ProjectMetadataInstance> directMetadata, List<ProjectItemDefinitionInstance> itemDefinitions, string definingFileEscaped)
113
internal ProjectItemInstance(
ProjectInstance
project, string itemType, string includeEscaped, IEnumerable<KeyValuePair<string, string>> directMetadata, string definingFileEscaped)
138
private ProjectItemInstance(ProjectItemInstance that,
ProjectInstance
newProject)
148
private ProjectItemInstance(
ProjectInstance
projectInstance)
159
public
ProjectInstance
Project
607
internal static ProjectItemInstance FactoryForDeserialization(ITranslator translator,
ProjectInstance
projectInstance)
654
internal ProjectItemInstance DeepClone(
ProjectInstance
newProject)
685
private void CommonConstructor(
ProjectInstance
projectToUse, string itemTypeToUse, string includeEscaped, string includeBeforeWildcardExpansionEscaped, CopyOnWritePropertyDictionary<ProjectMetadataInstance> directMetadata, List<ProjectItemDefinitionInstance> itemDefinitions, string definingFileEscaped)
870
ProjectInstance
.VerifyThrowNotImmutable(_isImmutable);
896
ProjectInstance
.VerifyThrowNotImmutable(_isImmutable);
988
ProjectInstance
.VerifyThrowNotImmutable(_isImmutable);
1049
ProjectInstance
.VerifyThrowNotImmutable(_isImmutable);
1327
ProjectInstance
.VerifyThrowNotImmutable(_isImmutable);
1338
ProjectInstance
.VerifyThrowNotImmutable(_isImmutable);
1349
ProjectInstance
.VerifyThrowNotImmutable(_isImmutable);
1394
ProjectInstance
.VerifyThrowNotImmutable(destinationAsTaskItem._isImmutable);
1664
ProjectInstance
.VerifyThrowNotImmutable(_isImmutable);
1784
ProjectInstance
.VerifyThrowNotImmutable(_isImmutable);
1808
ProjectInstance
.VerifyThrowNotImmutable(_isImmutable);
1828
ProjectInstance
.VerifyThrowNotImmutable(_isImmutable);
1840
ProjectInstance
.VerifyThrowNotImmutable(_isImmutable);
1921
private
ProjectInstance
_project;
1928
internal ProjectItemInstanceFactory(
ProjectInstance
project)
1936
internal ProjectItemInstanceFactory(
ProjectInstance
project, string itemType)
Instance\ProjectPropertyInstance.cs (1)
71
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)
1827
ProjectInstance
instance = project.CreateProjectInstance();
Definition\Project_Tests.cs (7)
674
ProjectInstance
projectInstance = new ProjectInstance(xml);
711
ProjectInstance
projectInstance = new ProjectInstance(xml);
746
ProjectInstance
projectInstance = new ProjectInstance(xml);
783
ProjectInstance
projectInstance = new ProjectInstance(xml);
1749
ProjectInstance
projectInstance = project.CreateProjectInstance();
3834
var
projectInstance = project.CreateProjectInstance();
3846
var
newProjectInstance = project.CreateProjectInstance();
Definition\ProjectItem_Tests.cs (3)
953
Should.Throw<InvalidProjectFileException>(() => {
ProjectInstance
.FromFile(testProjectFile, new ProjectOptions()); });
964
ProjectInstance
.FromFile(testProjectFile, options);
3752
var
projectInstance = buildManager.GetProjectInstanceForBuild(project);
Definition\ProjectItemDefinition_Tests.cs (1)
445
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)
1031
ProjectInstance
instance = immutable ? project.CreateProjectInstance(ProjectInstanceSettings.Immutable) : project.CreateProjectInstance();
1039
private static
ProjectInstance
GetEmptyProjectInstance()
1043
ProjectInstance
instance = project.CreateProjectInstance();
Instance\ProjectItemInstance_Tests.cs (4)
252
ProjectInstance
projectInstance = project.CreateProjectInstance();
347
ProjectInstance
projectInstance = project.CreateProjectInstance();
1171
ProjectInstance
project = new ProjectInstance(xml);
1193
ProjectInstance
projectInstance = project.CreateProjectInstance();
Instance\ProjectMetadataInstance_Tests.cs (1)
35
ProjectInstance
projectInstance = project.CreateProjectInstance();
Instance\ProjectOnErrorInstance_Tests.cs (1)
47
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();
147
ProjectInstance
instance = project.CreateProjectInstance();
Instance\ProjectTaskInstance_Tests.cs (1)
77
ProjectInstance
instance = project.CreateProjectInstance();
Instance\ProjectTaskOutputItemInstance_Tests.cs (1)
50
ProjectInstance
instance = project.CreateProjectInstance();
Instance\ProjectTaskOutputPropertyInstance_Tests.cs (1)
50
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)
27
ProjectInstance
project = ProjectHelpers.CreateEmptyProjectInstance();
114
ProjectInstance
project = ProjectHelpers.CreateEmptyProjectInstance();
147
ProjectInstance
project = ProjectHelpers.CreateEmptyProjectInstance();
201
ProjectInstance
project = ProjectHelpers.CreateEmptyProjectInstance();
BackEnd\BuildManager_Tests.cs (29)
356
ProjectInstance
rootProject = GenerateDummyProjects(shutdownProjectDirectory, numberOfParallelProjectsToBuild, projectCollection);
1711
ProjectInstance
instance = _buildManager.GetProjectInstanceForBuild(project);
1742
ProjectInstance
instance = _buildManager.GetProjectInstanceForBuild(project);
1777
ProjectInstance
instance = _buildManager.GetProjectInstanceForBuild(project);
1834
ProjectInstance
instance = _buildManager.GetProjectInstanceForBuild(project);
1835
ProjectInstance
instance2 = _buildManager.GetProjectInstanceForBuild(project);
1862
ProjectInstance
instance = _buildManager.GetProjectInstanceForBuild(project);
1888
ProjectInstance
instance = _buildManager.GetProjectInstanceForBuild(project);
1920
ProjectInstance
instance = _buildManager.GetProjectInstanceForBuild(project);
1933
ProjectInstance
instance2 = _buildManager.GetProjectInstanceForBuild(project);
1970
ProjectInstance
projectInstance = CreateProjectInstance(contents1, null, _projectCollection, false);
1997
ProjectInstance
projectInstance2 = CreateProjectInstance(contents1, null, _projectCollection, false);
2201
ProjectInstance
instance = project.CreateProjectInstance();
2252
ProjectInstance
instance = project.CreateProjectInstance();
3075
ProjectInstance
pi = BuildManager.DefaultBuildManager.GetProjectInstanceForBuild(project1);
3086
ProjectInstance
pi = BuildManager.DefaultBuildManager.GetProjectInstanceForBuild(project2);
3154
ProjectInstance
pi = BuildManager.DefaultBuildManager.GetProjectInstanceForBuild(project2);
3166
ProjectInstance
pi = BuildManager.DefaultBuildManager.GetProjectInstanceForBuild(project1);
3241
ProjectInstance
pi = BuildManager.DefaultBuildManager.GetProjectInstanceForBuild(project2);
3253
ProjectInstance
pi = BuildManager.DefaultBuildManager.GetProjectInstanceForBuild(project1);
3344
ProjectInstance
instance = _buildManager.GetProjectInstanceForBuild(project);
3374
ProjectInstance
instance = _buildManager.GetProjectInstanceForBuild(project);
3405
ProjectInstance
instance = _buildManager.GetProjectInstanceForBuild(project);
3509
private
ProjectInstance
CreateProjectInstance(string contents, string toolsVersion, ProjectCollection projectCollection, bool deleteTempProject)
3552
private static
ProjectInstance
GenerateDummyProjects(string shutdownProjectDirectory, int parallelProjectCount, ProjectCollection projectCollection)
3640
var
mainInstance = mainProject.CreateProjectInstance(ProjectInstanceSettings.Immutable).DeepCopy(isImmutable: false);
3667
var
p2pInstance = p2pProject.CreateProjectInstance(ProjectInstanceSettings.Immutable).DeepCopy(isImmutable: false);
3792
ProjectInstance
instance = project.CreateProjectInstance(ProjectInstanceSettings.Immutable).DeepCopy(false);
4342
ProjectInstance
instance = _buildManager.GetProjectInstanceForBuild(project);
BackEnd\BuildRequestConfiguration_Tests.cs (5)
187
ProjectInstance
projectInstance = project.CreateProjectInstance();
283
ProjectInstance
instance = project.CreateProjectInstance();
359
ProjectInstance
instance = project.CreateProjectInstance();
459
ProjectInstance
instance = project.CreateProjectInstance();
561
var
projectInstance = project.CreateProjectInstance();
BackEnd\BuildRequestEngine_Tests.cs (1)
238
private
ProjectInstance
CreateStandinProject()
BackEnd\IntrinsicTask_Tests.cs (17)
1239
ProjectInstance
p = project.CreateProjectInstance();
1271
ProjectInstance
p = project.CreateProjectInstance();
2247
ProjectInstance
p = project.CreateProjectInstance();
2280
ProjectInstance
p = project.CreateProjectInstance();
2316
ProjectInstance
p = project.CreateProjectInstance();
2352
ProjectInstance
p = project.CreateProjectInstance();
2388
ProjectInstance
p = project.CreateProjectInstance();
2425
ProjectInstance
p = project.CreateProjectInstance();
2455
ProjectInstance
p = project.CreateProjectInstance();
3131
ProjectInstance
p = project.CreateProjectInstance();
3176
ProjectInstance
p = project.CreateProjectInstance();
3464
ProjectInstance
instance = new ProjectInstance(xml);
3820
private static Lookup GenerateLookupWithItemsAndProperties(
ProjectInstance
project)
3829
private static Lookup GenerateLookup(
ProjectInstance
project)
3834
private static Lookup GenerateLookup(
ProjectInstance
project, PropertyDictionary<ProjectPropertyInstance> properties)
3864
ProjectInstance
projectInstance = project.CreateProjectInstance();
3899
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)
145
ProjectInstance
pi = p.CreateProjectInstance();
558
ProjectInstance
pi = p.CreateProjectInstance();
627
ProjectInstance
pi = p.CreateProjectInstance();
934
ProjectInstance
pi = p.CreateProjectInstance();
1054
ProjectInstance
pi = p.CreateProjectInstance();
1123
ProjectInstance
pi = p.CreateProjectInstance();
1190
ProjectInstance
pi = p.CreateProjectInstance();
1805
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)
98
ProjectInstance
project = CreateTestProject();
117
ProjectInstance
project = CreateTestProject();
143
ProjectInstance
project = CreateTestProject();
165
ProjectInstance
project = CreateTestProject();
356
ProjectInstance
project = CreateTestProject(projectBody);
495
ProjectInstance
project = CreateTestProject(projectBody);
520
ProjectInstance
project = CreateTestProject(projectBody);
545
ProjectInstance
project = CreateTestProject(projectBody);
574
ProjectInstance
project = CreateTestProject(projectBody);
608
ProjectInstance
project = CreateTestProject(projectBody);
639
ProjectInstance
project = CreateTestProject(projectBody);
669
ProjectInstance
project = CreateTestProject(projectBody);
694
ProjectInstance
project = CreateTestProject(projectBody);
729
ProjectInstance
project = CreateTestProject(projectBody);
754
ProjectInstance
project = CreateTestProject(projectBody);
780
ProjectInstance
project = CreateTestProject(projectBody);
809
ProjectInstance
project = CreateTestProject(projectBody);
852
ProjectInstance
project = CreateTestProject(projectBody);
878
ProjectInstance
project = CreateTestProject(projectBody);
904
ProjectInstance
project = CreateTestProject(projectBody);
935
ProjectInstance
project = CreateTestProject(projectBody);
1032
ProjectInstance
project = CreateTestProject(projectBody);
1066
ProjectInstance
project = CreateTestProject(projectBody);
1116
ProjectInstance
project = CreateTestProject(projectBody);
1175
ProjectInstance
project = CreateTestProject(projectBody);
1216
ProjectInstance
project = CreateTestProject(projectBody);
1261
ProjectInstance
project = CreateTestProject(projectBody);
1291
ProjectInstance
project = CreateTestProject(projectBody);
1364
ProjectInstance
project = CreateTestProject(projectBody);
1393
var
project = CreateTestProject(projectContents, string.Empty, "Build");
1420
var
project = CreateTestProject(projectContents, string.Empty, "Build");
1538
private Lookup CreateStandardLookup(
ProjectInstance
project)
1548
private
ProjectInstance
CreateTestProject()
1616
private
ProjectInstance
CreateTestProject(string projectBodyContents)
1624
private
ProjectInstance
CreateTestProject(string projectBodyContents, string initialTargets, string defaultTargets)
1672
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);
998
private void ExecuteEntry(
ProjectInstance
project, TargetEntry entry)
1021
private TargetEntry CreateStandardTargetEntry(
ProjectInstance
project, string targetName)
1039
private TargetEntry CreateStandardTargetEntry(
ProjectInstance
project, string target, TargetEntry baseEntry)
1052
private
ProjectInstance
CreateTestProject(bool returnsAttributeEnabled)
BackEnd\TargetUpToDateChecker_Tests.cs (4)
137
ProjectInstance
project = ProjectHelpers.CreateEmptyProjectInstance();
174
ProjectInstance
project = ProjectHelpers.CreateEmptyProjectInstance();
218
ProjectInstance
project = ProjectHelpers.CreateEmptyProjectInstance();
569
ProjectInstance
p = project.CreateProjectInstance();
BackEnd\TaskBuilder_Tests.cs (2)
46
private
ProjectInstance
_testProject;
1170
private
ProjectInstance
CreateTestProject()
BackEnd\TaskExecutionHost_Tests.cs (4)
986
ProjectInstance
project = CreateTestProject();
1014
ProjectInstance
project = CreateTestProject();
1240
ProjectInstance
project = CreateTestProject();
1502
private
ProjectInstance
CreateTestProject()
BackEnd\TaskHostFactory_Tests.cs (2)
45
ProjectInstance
projectInstance = new(project.Path);
193
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)
137
ProjectInstance
[] instances = SolutionProjectGenerator.Generate(solution, null, null, _buildEventContext, mockLogger);
Construction\SolutionProjectGenerator_Tests.cs (41)
74
ProjectInstance
[] instances = SolutionProjectGenerator.Generate(SolutionFile.Parse(sln.Path), null, null, _buildEventContext, CreateMockLoggingService());
360
ProjectInstance
[] instances = SolutionProjectGenerator.Generate(solution, null, "3.5", _buildEventContext, CreateMockLoggingService());
395
ProjectInstance
[] instances = SolutionProjectGenerator.Generate(solution, null, "3.5", _buildEventContext, CreateMockLoggingService());
424
ProjectInstance
[] instances = SolutionProjectGenerator.Generate(solution, null, null, _buildEventContext, CreateMockLoggingService());
466
ProjectInstance
[] instances = SolutionProjectGenerator.Generate(solution, null, null, _buildEventContext, CreateMockLoggingService());
501
ProjectInstance
[] instances = SolutionProjectGenerator.Generate(solution, null, null, _buildEventContext, CreateMockLoggingService());
613
ProjectInstance
[] instances = SolutionProjectGenerator.Generate(sp, null, null, _buildEventContext, CreateMockLoggingService());
635
ProjectInstance
[] instances1 = SolutionProjectGenerator.Generate(sp1, null, null, _buildEventContext, CreateMockLoggingService());
699
ProjectInstance
[] instances = SolutionProjectGenerator.Generate(sp, null, null, _buildEventContext, CreateMockLoggingService());
760
ProjectInstance
[] instances = SolutionProjectGenerator.Generate(sp, null, null, _buildEventContext, CreateMockLoggingService());
1027
var
projectBravoMetaProject = instances[1];
1240
var
instance = SolutionProjectGenerator.Generate(solution, null, ObjectModelHelpers.MSBuildDefaultToolsVersion, _buildEventContext, CreateMockLoggingService())[0];
1306
ProjectInstance
[] instances = SolutionProjectGenerator.Generate(solution, null, ObjectModelHelpers.MSBuildDefaultToolsVersion, _buildEventContext, CreateMockLoggingService());
1309
foreach (
ProjectInstance
instance in instances)
1444
ProjectInstance
[] instances = SolutionProjectGenerator.Generate(solution, null, "invalid", _buildEventContext, CreateMockLoggingService());
1485
ProjectInstance
[] instances = SolutionProjectGenerator.Generate(solution, null, null, BuildEventContext.Invalid, CreateMockLoggingService());
1563
ProjectInstance
[] instances = SolutionProjectGenerator.Generate(solution, null, null, BuildEventContext.Invalid, CreateMockLoggingService());
1593
ProjectInstance
[] instances = SolutionProjectGenerator.Generate(solution, null, null, BuildEventContext.Invalid, CreateMockLoggingService());
1618
ProjectInstance
msbuildProject = CreateVenusSolutionProject(globalProperties);
1647
ProjectInstance
msbuildProject = CreateVenusSolutionProject();
1684
ProjectInstance
msbuildProject = CreateVenusSolutionProject("2.0");
1710
ProjectInstance
msbuildProject = CreateVenusSolutionProject();
1736
ProjectInstance
msbuildProject = CreateVenusSolutionProject();
1840
ProjectInstance
[] instances = SolutionProjectGenerator.Generate(solution, null, null, BuildEventContext.Invalid, CreateMockLoggingService());
1895
ProjectInstance
[] instances = SolutionProjectGenerator.Generate(solution, null, null, BuildEventContext.Invalid, CreateMockLoggingService());
1973
ProjectInstance
[] instances = SolutionProjectGenerator.Generate(solution, globalProperties, null, BuildEventContext.Invalid, CreateMockLoggingService());
1974
ProjectInstance
msbuildProject = instances[0];
2236
ProjectInstance
[] instances = SolutionProjectGenerator.Generate(solution, globalProperties, null, BuildEventContext.Invalid, collection.LoggingService);
2278
ProjectInstance
[] instances = SolutionProjectGenerator.Generate(solution, null, null, BuildEventContext.Invalid, CreateMockLoggingService(), new List<string> { "One" });
2329
ProjectInstance
[] instances = SolutionProjectGenerator.Generate(solution, null, null, BuildEventContext.Invalid, CreateMockLoggingService(), null);
2374
ProjectInstance
[] instances;
2457
ProjectInstance
projectInstance = SolutionProjectGenerator.Generate(solutionFile, null, null, BuildEventContext.Invalid, CreateMockLoggingService(), new[] { "MyTarget" }).FirstOrDefault();
2515
ProjectInstance
projectInstance = SolutionProjectGenerator.Generate(solutionFile, null, null, BuildEventContext.Invalid, CreateMockLoggingService(), targetsToBuild).FirstOrDefault();
2625
ProjectInstance
projectInstance = SolutionProjectGenerator.Generate(solutionFile, globalProperties, null, BuildEventContext.Invalid, CreateMockLoggingService(), new[] { "Build" }).FirstOrDefault();
2666
private
ProjectInstance
CreateVenusSolutionProject()
2674
private
ProjectInstance
CreateVenusSolutionProject(IDictionary<string, string> globalProperties)
2682
private
ProjectInstance
CreateVenusSolutionProject(string toolsVersion)
2693
private
ProjectInstance
CreateVenusSolutionProject(IDictionary<string, string> globalProperties, string toolsVersion)
2732
ProjectInstance
[] instances = SolutionProjectGenerator.Generate(solution, globalProperties, toolsVersion, BuildEventContext.Invalid, CreateMockLoggingService());
2750
private void AssertProjectContainsItem(
ProjectInstance
msbuildProject, string itemType, string include)
2770
private void AssertProjectItemNameCount(
ProjectInstance
msbuildProject, string itemType, int count)
Definition\ItemDefinitionGroup_Tests.cs (3)
579
ProjectInstance
pi = p.CreateProjectInstance();
614
ProjectInstance
pi = p.CreateProjectInstance();
655
ProjectInstance
pi = p.CreateProjectInstance();
Definition\ProjectEvaluationContext_Tests.cs (3)
152
var
projectInstance =
ProjectInstance
.FromFile(
247
ProjectInstance
.FromProjectRootElement(
Definition\ProjectHelpers.cs (2)
22
internal static
ProjectInstance
CreateEmptyProjectInstance()
30
ProjectInstance
instance = project.CreateProjectInstance();
Definition\ToolsVersion_Tests.cs (4)
605
ProjectInstance
pi = project.CreateProjectInstance();
674
ProjectInstance
pi = project.CreateProjectInstance();
757
ProjectInstance
pi = new ProjectInstance(project.Xml, null /* no global properties */, null /* don't explicitly set the toolsversion */, p);
865
ProjectInstance
pi = new ProjectInstance(project.Xml, null /* no global properties */, null /* don't explicitly set the toolsversion */, p);
EscapingInProjects_Tests.cs (1)
650
ProjectInstance
projectInstance = project.CreateProjectInstance();
Evaluation\Evaluator_Tests.cs (5)
429
ProjectInstance
project = new ProjectInstance(subdirProjPath);
1399
ProjectInstance
instance = project.CreateProjectInstance();
2265
ProjectInstance
instance = project.CreateProjectInstance();
2289
ProjectInstance
instance = project.CreateProjectInstance();
2312
ProjectInstance
instance = project.CreateProjectInstance();
Evaluation\Expander_Tests.cs (23)
84
ProjectInstance
project = ProjectHelpers.CreateEmptyProjectInstance();
137
ProjectInstance
project = ProjectHelpers.CreateEmptyProjectInstance();
172
ProjectInstance
project = ProjectHelpers.CreateEmptyProjectInstance();
192
ProjectInstance
project = ProjectHelpers.CreateEmptyProjectInstance();
212
ProjectInstance
project = ProjectHelpers.CreateEmptyProjectInstance();
233
ProjectInstance
project = ProjectHelpers.CreateEmptyProjectInstance();
250
ProjectInstance
project = ProjectHelpers.CreateEmptyProjectInstance();
276
ProjectInstance
project = ProjectHelpers.CreateEmptyProjectInstance();
649
ProjectInstance
project = ProjectHelpers.CreateEmptyProjectInstance();
687
ProjectInstance
project = ProjectHelpers.CreateEmptyProjectInstance();
707
ProjectInstance
project = ProjectHelpers.CreateEmptyProjectInstance();
727
ProjectInstance
project = ProjectHelpers.CreateEmptyProjectInstance();
745
ProjectInstance
project = ProjectHelpers.CreateEmptyProjectInstance();
794
ProjectInstance
project = ProjectHelpers.CreateEmptyProjectInstance();
1302
ProjectInstance
project = ProjectHelpers.CreateEmptyProjectInstance();
1515
ProjectInstance
project = ProjectHelpers.CreateEmptyProjectInstance();
3856
ProjectInstance
project = ProjectHelpers.CreateEmptyProjectInstance();
4742
ProjectInstance
projectInstance = new ProjectInstance(projectFile.Path);
4786
ProjectInstance
projectInstance = new ProjectInstance(projectFile.Path);
4815
ProjectInstance
projectInstance = new ProjectInstance(projectFile.Path);
4862
ProjectInstance
projectInstance = new ProjectInstance(projectFile.Path);
4903
ProjectInstance
projectInstance = new ProjectInstance(projectFile.Path);
4937
ProjectInstance
projectInstance = new ProjectInstance(projectFile.Path);
Evaluation\ItemSpec_Tests.cs (1)
97
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)
70
ProjectInstance
project = new Project(ProjectRootElement.Create(XmlReader.Create(new StringReader(projectFileContent)))).CreateProjectInstance();
117
ProjectInstance
project = new Project(ProjectRootElement.Create(XmlReader.Create(new StringReader(projectFileContent)))).CreateProjectInstance();
142
ProjectInstance
project = new Project(ProjectRootElement.Create(XmlReader.Create(new StringReader(projectFileContent)))).CreateProjectInstance();
170
ProjectInstance
p = GetProjectInstance(content);
208
ProjectInstance
p = GetProjectInstance(content);
254
ProjectInstance
p = GetSampleProjectInstance();
265
ProjectInstance
p = GetSampleProjectInstance();
277
ProjectInstance
p = GetSampleProjectInstance();
285
var
projectInstance = new ProjectInstance(
300
ProjectInstance
first = GetSampleProjectInstance(null, null, projectCollection, toolsVersion: "TESTTV");
301
ProjectInstance
second = first.DeepCopy();
319
ProjectInstance
p = GetSampleProjectInstance(null, null, new ProjectCollection());
352
ProjectInstance
p = GetSampleProjectInstance(null, null, new ProjectCollection());
379
ProjectInstance
p = GetSampleProjectInstance(null, globalProperties, new ProjectCollection());
418
ProjectInstance
p = new ProjectInstance(xml, globalProperties, ObjectModelHelpers.MSBuildDefaultToolsVersion, "ABCDEF", new ProjectCollection(projectCollectionGlobalProperties));
436
ProjectInstance
p = GetSampleProjectInstance();
447
ProjectInstance
p = GetSampleProjectInstance();
460
ProjectInstance
first = GetSampleProjectInstance(hostServices);
461
ProjectInstance
second = first.DeepCopy();
480
ProjectInstance
first = GetSampleProjectInstance();
481
ProjectInstance
second = first.DeepCopy();
493
ProjectInstance
first = GetSampleProjectInstance();
494
ProjectInstance
second = first.DeepCopy();
506
ProjectInstance
first = GetSampleProjectInstance();
507
ProjectInstance
second = first.DeepCopy();
518
ProjectInstance
first = GetSampleProjectInstance();
519
ProjectInstance
second = first.DeepCopy();
530
ProjectInstance
first = GetSampleProjectInstance();
531
ProjectInstance
second = first.DeepCopy();
542
ProjectInstance
first = GetSampleProjectInstance();
545
ProjectInstance
second = first.DeepCopy();
573
ProjectInstance
projectInstance = GetProjectInstance(projectFileContent);
682
var
original = new ProjectInstance(ProjectRootElement.Create(XmlReader.Create(new StringReader(ObjectModelHelpers.CleanupFileContents(projectContents)))));
687
var
copy =
ProjectInstance
.FactoryForDeserialization(TranslationHelpers.GetReadTranslator());
692
public delegate
ProjectInstance
ProjectInstanceFactory(string file, ProjectRootElement xml, ProjectCollection collection);
705
(f, xml, c) =>
ProjectInstance
.FromFile(f, new ProjectOptions { ProjectCollection = c })
729
(f, xml, c) =>
ProjectInstance
.FromProjectRootElement(xml, new ProjectOptions { ProjectCollection = c })
737
var
pi = new ProjectInstance(f, null, null, c);
742
var
copy =
ProjectInstance
.FactoryForDeserialization(TranslationHelpers.GetReadTranslator());
761
var
projectInstance = projectInstanceFactory.Invoke(file, xml, projectCollection);
774
ProjectInstance
projectInstance = new ProjectInstance(rootElement);
809
ProjectInstance
projectInstance = new ProjectInstance(rootElement);
852
ProjectInstance
projectInstance = useDirectConstruction
886
ProjectInstance
projectInstance =
ProjectInstance
.FromFile(
914
ProjectInstance
projectInstance =
ProjectInstance
.FromProjectRootElement(
929
private static
ProjectInstance
GetProjectInstance(string content)
937
private static
ProjectInstance
GetProjectInstance(string content, HostServices hostServices)
945
private static
ProjectInstance
GetProjectInstance(string content, HostServices hostServices, IDictionary<string, string> globalProperties, ProjectCollection projectCollection, string toolsVersion = null)
959
ProjectInstance
instance = project.CreateProjectInstance();
967
private static
ProjectInstance
GetSampleProjectInstance()
975
private static
ProjectInstance
GetSampleProjectInstance(HostServices hostServices)
983
private static
ProjectInstance
GetSampleProjectInstance(HostServices hostServices, IDictionary<string, string> globalProperties, ProjectCollection projectCollection, string toolsVersion = null)
1008
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.UnitTests (9)
AssignLinkMetadata_Tests.cs (1)
181
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)
1474
var
p =
ProjectInstance
.FromFile(testProjectFile, new ProjectOptions());
Microsoft.Build.Utilities.UnitTests (7)
MuxLogger_Tests.cs (7)
53
ProjectInstance
project = (new Project(XmlReader.Create(new StringReader(projectBody)))).CreateProjectInstance();
95
ProjectInstance
project = (new Project(XmlReader.Create(new StringReader(projectBody)), null, ObjectModelHelpers.MSBuildDefaultToolsVersion, projectCollection)).CreateProjectInstance();
142
ProjectInstance
project = (new Project(XmlReader.Create(new StringReader(projectBody)))).CreateProjectInstance();
193
ProjectInstance
project1 = (new Project(XmlReader.Create(new StringReader(projectBody1)))).CreateProjectInstance();
194
ProjectInstance
project2 = (new Project(XmlReader.Create(new StringReader(projectBody2)))).CreateProjectInstance();
248
ProjectInstance
project = (new Project(XmlReader.Create(new StringReader(projectBody)))).CreateProjectInstance();
296
ProjectInstance
project = (new Project(XmlReader.Create(new StringReader(projectBody)))).CreateProjectInstance();
MSBuild (2)
JsonOutputFormatter.cs (1)
46
internal void AddItemInstancesInJsonFormat(string[] itemNames,
ProjectInstance
project)
XMake.cs (1)
1097
ProjectInstance
builtProject = result.ProjectStateAfterBuild;