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