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