17 instantiations of ProjectInstance
Microsoft.Build (15)
BackEnd\BuildManager\BuildManager.cs (1)
2468
return new
ProjectInstance
(
BackEnd\Shared\BuildRequestConfiguration.cs (1)
575
return new
ProjectInstance
(
Construction\Solution\SolutionProjectGenerator.cs (2)
1045
var traversalInstance = new
ProjectInstance
(
1282
ProjectInstance metaprojectInstance = new
ProjectInstance
(EscapingUtilities.UnescapeAll(GetMetaprojectName(project)), traversalProject, GetMetaprojectGlobalProperties(traversalProject));
Definition\Project.cs (1)
3592
return new
ProjectInstance
(_data, DirectoryPath, FullPath, ProjectCollection.HostServices, ProjectCollection.EnvironmentProperties, settings);
Graph\ProjectGraph.cs (1)
989
return new
ProjectInstance
(
Instance\ProjectInstance.cs (9)
206
/// of another ProjectInstance. <seealso cref="
ProjectInstance
(ProjectInstance, bool, RequestedProjectState)"/>
931
return new
ProjectInstance
(
951
return new
ProjectInstance
(
972
return new
ProjectInstance
(project, fastItemLookupNeeded);
1360
/// of another ProjectInstance. <seealso cref="
ProjectInstance
(ProjectInstance, bool, RequestedProjectState)"/>
2211
return new
ProjectInstance
(this, true, filter);
2227
return new
ProjectInstance
(this, isImmutable);
2827
return new
ProjectInstance
(translator);
3173
ProjectInstance instance =
new
(projectRootElement, globalProperties, toolsVersion, buildParameters, loggingService, projectBuildEventContext, sdkResolverService, submissionId);
Microsoft.DotNet.HotReload.Watch (1)
Build\ProjectGraphFactory.cs (1)
149
return new
ProjectInstance
(
NuGet.CommandLine.XPlat (1)
Utility\MSBuildAPIUtility.cs (1)
937
var newProject = new
ProjectInstance
(project.Xml, globalProperties, null, ProjectCollection.GlobalProjectCollection);
296 references to ProjectInstance
dotnet-aot (11)
parent\dotnet\Extensions\ProjectInstanceExtensions.cs (7)
11
public static string GetProjectId(this
ProjectInstance
projectInstance)
20
public static string GetDefaultProjectTypeGuid(this
ProjectInstance
projectInstance)
30
public static IEnumerable<string> GetPlatforms(this
ProjectInstance
projectInstance)
38
public static IEnumerable<string> GetConfigurations(this
ProjectInstance
projectInstance)
52
public static IEnumerable<string> GetRuntimeIdentifiers(this
ProjectInstance
projectInstance)
61
public static IEnumerable<NuGetFramework> GetTargetFrameworks(this
ProjectInstance
projectInstance)
74
public static IEnumerable<string> GetPropertyCommaSeparatedValues(this
ProjectInstance
projectInstance, string propertyName)
parent\dotnet\MsbuildProject.cs (4)
42
private
ProjectInstance
_cachedEvaluatedProject;
149
var
project = GetEvaluatedProject();
183
private
ProjectInstance
GetEvaluatedProject()
215
return _cachedEvaluatedProject =
ProjectInstance
.FromFile(ProjectRootElement.FullPath, options);
Microsoft.Build (177)
BackEnd\BuildManager\BuildManager.cs (6)
193
private readonly Dictionary<
ProjectInstance
, string> _unnamedProjectInstanceToNames;
321
_unnamedProjectInstanceToNames = new Dictionary<
ProjectInstance
, string>();
1072
public
ProjectInstance
GetProjectInstanceForBuild(Project project)
1781
ProjectInstance
? projectInstance = submission.BuildRequestData.ProjectInstance;
2026
var instances =
ProjectInstance
.LoadSolutionForBuild(
2071
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)
92
public BuildRequestData(
ProjectInstance
projectInstance, string[] targetsToBuild, HostServices? hostServices, BuildRequestDataFlags flags, IEnumerable<string>? propertiesToTransfer, RequestedProjectState requestedProjectState)
172
public
ProjectInstance
? ProjectInstance
BackEnd\Components\ProjectCache\ProjectCacheService.cs (1)
177
private IEnumerable<ProjectCacheDescriptor> GetProjectCacheDescriptors(
ProjectInstance
projectInstance)
BackEnd\Components\RequestBuilder\IntrinsicTask.cs (3)
24
protected IntrinsicTask(TargetLoggingContext loggingContext,
ProjectInstance
projectInstance, bool logTaskInputs)
43
internal
ProjectInstance
Project
66
internal static IntrinsicTask InstantiateTask(ProjectTargetInstanceChild taskInstance, TargetLoggingContext loggingContext,
ProjectInstance
projectInstance, bool logTaskInputs)
BackEnd\Components\RequestBuilder\IntrinsicTasks\ItemGroupIntrinsicTask.cs (1)
43
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)
1545
ProjectInstance
project = _requestEntry?.RequestConfiguration?.Project;
1585
ProjectInstance
project = _requestEntry?.RequestConfiguration?.Project;
BackEnd\Components\RequestBuilder\TargetBuilder.cs (1)
87
private
ProjectInstance
_projectInstance;
BackEnd\Components\RequestBuilder\TargetUpToDateChecker.cs (2)
57
internal TargetUpToDateChecker(
ProjectInstance
project, ProjectTargetInstance targetToAnalyze, ILoggingService loggingServices, BuildEventContext buildEventContext)
1243
private
ProjectInstance
_project;
BackEnd\Shared\BuildRequestConfiguration.cs (11)
90
private
ProjectInstance
_project;
95
private
ProjectInstance
_transferredState;
283
internal BuildRequestConfiguration(int configId,
ProjectInstance
instance)
463
public
ProjectInstance
Project
498
private void SetProjectBasedState(
ProjectInstance
project)
595
private void InitializeProject(BuildParameters buildParameters, Func<
ProjectInstance
> loadProjectFromFile)
702
/// Keeps the <see cref="
ProjectInstance
"/> in memory while the caller uses it, preventing a concurrent
707
/// <see cref="
ProjectInstance
"/> has independent synchronization and usage tracking.
712
/// Tracks one active <see cref="
ProjectInstance
"/> consumer. Consume with <see langword="using"/>;
1062
translator.Translate(ref _transferredState,
ProjectInstance
.FactoryForDeserialization);
1113
internal void ApplyTransferredState(
ProjectInstance
instance)
BackEnd\Shared\BuildResult.cs (11)
130
/// <see cref="
ProjectInstance
"/> state after the build. This is only provided if <see cref="BuildRequest.BuildRequestDataFlags"/>
134
/// be used to retrieve <see cref="
ProjectInstance
.Properties"/>, <see cref="
ProjectInstance
.GlobalProperties"/> and
135
/// <see cref="
ProjectInstance
.Items"/> from it. No other operation is guaranteed to be supported.
137
private
ProjectInstance
? _projectStateAfterBuild;
423
/// <see cref="
ProjectInstance
"/> state after the build. In general, it may be a non buildable-dummy object, and should only
424
/// be used to retrieve <see cref="
ProjectInstance
.Properties"/>, <see cref="
ProjectInstance
.GlobalProperties"/> and
425
/// <see cref="
ProjectInstance
.Items"/> from it. Any other operation is not guaranteed to be supported.
427
public
ProjectInstance
? ProjectStateAfterBuild
697
translator.Translate(ref _projectStateAfterBuild,
ProjectInstance
.FactoryForDeserialization);
BackEnd\TaskExecutionHost\TaskExecutionHost.cs (3)
94
private
ProjectInstance
_projectInstance;
232
public
ProjectInstance
ProjectInstance => _projectInstance;
279
ProjectInstance
projectInstance,
Construction\Solution\SolutionProjectGenerator.cs (35)
208
internal static
ProjectInstance
[] Generate(
745
private
ProjectInstance
[] Generate()
773
private
ProjectInstance
[] CreateSolutionProject(string wrapperProjectToolsVersion, bool explicitToolsVersionSpecified)
801
var projectInstances = new List<
ProjectInstance
>(projectsInOrder.Count + 1);
804
ProjectInstance
traversalInstance = CreateTraversalInstance(wrapperProjectToolsVersion, explicitToolsVersionSpecified, projectsInOrder);
833
foreach (
ProjectInstance
instance in projectInstances)
844
private void EvaluateAndAddProjects(List<ProjectInSolution> projectsInOrder, List<
ProjectInstance
> projectInstances,
ProjectInstance
traversalInstance, string selectedSolutionConfiguration)
879
ProjectInstance
metaproject = CreateMetaproject(traversalInstance, project, projectConfiguration);
894
private void AddStandardTraversalTargets(
ProjectInstance
traversalInstance, List<ProjectInSolution> projectsInOrder)
910
private
ProjectInstance
CreateTraversalInstance(string wrapperProjectToolsVersion, bool explicitToolsVersionSpecified, List<ProjectInSolution> projectsInOrder)
1045
var
traversalInstance = new ProjectInstance(
1123
private void AddProjectReference(
ProjectInstance
traversalProject,
ProjectInstance
projectInstance, ProjectInSolution projectToAdd, ProjectConfigurationInSolution projectConfiguration, bool direct)
1156
private static string GetToolsVersionMetadataForDirectMSBuildTask(
ProjectInstance
traversalProject)
1173
private static string GetPropertiesMetadataForProjectReference(
ProjectInstance
traversalProject, string configurationAndPlatformProperties)
1212
private bool CanBuildDirectly(
ProjectInstance
traversalProject, ProjectInSolution projectToAdd, ProjectConfigurationInSolution projectConfiguration)
1279
private
ProjectInstance
CreateMetaproject(
ProjectInstance
traversalProject, ProjectInSolution project, ProjectConfigurationInSolution projectConfiguration)
1282
ProjectInstance
metaprojectInstance = new ProjectInstance(EscapingUtilities.UnescapeAll(GetMetaprojectName(project)), traversalProject, GetMetaprojectGlobalProperties(traversalProject));
1384
private void AddMetaprojectReferenceItems(
ProjectInstance
traversalProject,
ProjectInstance
metaprojectInstance, ProjectInSolution project)
1412
private static void AddMetaprojectTargetForManagedProject(
ProjectInstance
traversalProject,
ProjectInstance
metaprojectInstance, ProjectInSolution project, ProjectConfigurationInSolution projectConfiguration, string targetName, string outputItem)
1431
private static void AddProjectBuildTask(
ProjectInstance
traversalProject, ProjectConfigurationInSolution projectConfiguration, ProjectTargetInstance target, string targetToBuild, string sourceItems, string condition, string outputItem)
1929
private void AddMetaprojectTargetForUnknownProjectType(
ProjectInstance
traversalProject,
ProjectInstance
metaprojectInstance, ProjectInSolution project, string targetName, string unknownProjectTypeErrorMessage)
1999
private void AddValidateProjectsTarget(
ProjectInstance
traversalProject, List<ProjectInSolution> projects)
2041
private static void AddTraversalReferencesTarget(
ProjectInstance
traversalProject, string targetName, string outputItem, bool batchBuildTargets)
2093
private void AddTraversalTargetForProject(
ProjectInstance
traversalProject, ProjectInSolution project, ProjectConfigurationInSolution projectConfiguration, string targetToBuild, string outputItem, bool canBuildDirectly)
2138
private IDictionary<string, string> GetMetaprojectGlobalProperties(
ProjectInstance
traversalProject)
2412
private void AddInitialTargets(
ProjectInstance
traversalProject, List<ProjectInSolution> projects)
2423
private void AddValidateSolutionConfigurationTarget(
ProjectInstance
traversalProject)
2458
private static void AddValidateToolsVersionsTarget(
ProjectInstance
traversalProject)
2471
private static void AddGetSolutionConfigurationContentsTarget(
ProjectInstance
traversalProject)
Definition\Project.cs (7)
545
/// evaluation via <see cref="ProjectOptions.EvaluationStage"/>; use <see cref="
ProjectInstance
"/>
1374
public
ProjectInstance
CreateProjectInstance()
1388
public
ProjectInstance
CreateProjectInstance(ProjectInstanceSettings settings)
1399
public
ProjectInstance
CreateProjectInstance(ProjectInstanceSettings settings, EvaluationContext evaluationContext)
3154
public override
ProjectInstance
CreateProjectInstance(ProjectInstanceSettings settings, EvaluationContext evaluationContext)
3226
ProjectInstance
instance = CreateProjectInstance(LoggingService, ProjectInstanceSettings.None, evaluationContext);
3585
private
ProjectInstance
CreateProjectInstance(
Definition\ProjectOptions.cs (1)
63
/// <see cref="Microsoft.Build.Execution.
ProjectInstance
"/>; passing a partial stage to a <see cref="Project"/> factory
Graph\GraphBuilder.cs (4)
56
private ConcurrentDictionary<ConfigurationMetadata, Lazy<
ProjectInstance
>> _platformNegotiationInstancesCache = new();
548
ProjectInstance
projectInstance;
651
private
ProjectInstance
GetInstanceForPlatformNegotiationWithCaching(
658
new Lazy<
ProjectInstance
>(() => _projectInstanceFactory(projectPath, globalProperties, projectCollection))).Value;
Graph\ProjectGraph.cs (9)
34
/// A callback used for constructing a <see cref="
ProjectInstance
" /> for a specific
40
/// <returns>A <see cref="
ProjectInstance
" /> instance. This value must not be null.</returns>
56
public delegate
ProjectInstance
ProjectInstanceFactoryFunc(
178
/// A delegate used for constructing a <see cref="
ProjectInstance
" />, called for each
319
/// A delegate used for constructing a <see cref="
ProjectInstance
" />, called for each
356
/// A delegate used for constructing a <see cref="
ProjectInstance
" />, called for each
397
/// A delegate used for constructing a <see cref="
ProjectInstance
" />, called for each
969
internal
ProjectInstance
DefaultProjectInstanceFactory(
983
internal static
ProjectInstance
StaticProjectInstanceFactory(
Graph\ProjectGraphNode.cs (2)
25
internal ProjectGraphNode(
ProjectInstance
projectInstance)
46
public
ProjectInstance
ProjectInstance { get; }
Graph\ProjectInterpretation.cs (10)
80
ProjectInstance
requesterInstance = projectGraphNode.ProjectInstance;
178
var
projectInstance = projectInstanceFactory(
203
var
projectInstanceForDiscovery = projectInstanceFactory(
251
internal static string GetInnerBuildPropertyValue(
ProjectInstance
project)
256
internal static string GetInnerBuildPropertyName(
ProjectInstance
project)
261
internal static string GetInnerBuildPropertyValues(
ProjectInstance
project)
266
internal static ProjectType GetProjectType(
ProjectInstance
project)
331
private static IEnumerable<ProjectItemInstance> ConstructInnerBuildReferences(
ProjectInstance
outerBuild)
560
public static TargetsToPropagate FromProjectAndEntryTargets(
ProjectInstance
project, string[] entryTargets)
647
ProjectInstance
projectInstance = projectGraphNode.ProjectInstance;
Instance\ProjectInstance.cs (29)
206
/// of another ProjectInstance. <seealso cref="ProjectInstance(
ProjectInstance
, bool, RequestedProjectState)"/>
432
/// The resulting <see cref="
ProjectInstance
"/> object wraps the <see cref="Project"/>
574
internal ProjectInstance(string projectFile,
ProjectInstance
projectToInheritFrom, IDictionary<string, string> globalProperties)
637
/// Initializes a new instance of the <see cref="
ProjectInstance
"/> class directly.
750
private ProjectInstance(
ProjectInstance
that, bool isImmutable, RequestedProjectState filter = null)
929
public static
ProjectInstance
FromFile(string file, ProjectOptions options)
949
public static
ProjectInstance
FromProjectRootElement(ProjectRootElement rootElement, ProjectOptions options)
969
public static
ProjectInstance
FromImmutableProjectSource(Project project, ProjectInstanceSettings settings)
993
ProjectInstance
owningProjectInstance)
1015
ProjectInstance
owningProjectInstance,
1360
/// of another ProjectInstance. <seealso cref="ProjectInstance(
ProjectInstance
, bool, RequestedProjectState)"/>
1440
/// Adds an Environment Variable that was resolved by an <see cref="SdkResolver"/> to the set of properties tracked by this <see cref="
ProjectInstance
"/>.
2194
public
ProjectInstance
DeepCopy()
2209
public
ProjectInstance
FilteredCopy(RequestedProjectState filter)
2219
public
ProjectInstance
DeepCopy(bool isImmutable)
2485
/// from the <see cref="
ProjectInstance
"/> provided.
2487
/// <param name="projectState"><see cref="
ProjectInstance
"/> with the state to use.</param>
2488
public void UpdateStateFrom(
ProjectInstance
projectState)
2505
Assumed.NotNull(TaskRegistry, $"{nameof(TaskRegistry)} Cannot be null after {nameof(
ProjectInstance
)} object creation.");
2686
internal static
ProjectInstance
[] LoadSolutionForBuild(
2704
ProjectInstance
[] projectInstances = null;
2751
private static
ProjectInstance
[] CalculateToolsVersionAndGenerateSolutionWrapper(
2777
ProjectInstance
[] projectInstances = null;
2825
internal static
ProjectInstance
FactoryForDeserialization(ITranslator translator)
3045
private static
ProjectInstance
[] GenerateSolutionWrapper(
3071
ProjectInstance
[] instances = SolutionProjectGenerator.Generate(sp, globalProperties, toolsVersion, projectBuildEventContext, loggingService, targetNames, sdkResolverService, submissionId);
3099
private static
ProjectInstance
[] GenerateSolutionWrapperUsingOldOM(
3173
ProjectInstance
instance = new(projectRootElement, globalProperties, toolsVersion, buildParameters, loggingService, projectBuildEventContext, sdkResolverService, submissionId);
3559
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);
1056
ProjectInstance
.VerifyThrowNotImmutable(_isImmutable);
1154
ProjectInstance
.VerifyThrowNotImmutable(_isImmutable);
1173
ProjectInstance
.VerifyThrowNotImmutable(_isImmutable);
1462
ProjectInstance
.VerifyThrowNotImmutable(_isImmutable);
1473
ProjectInstance
.VerifyThrowNotImmutable(_isImmutable);
1484
ProjectInstance
.VerifyThrowNotImmutable(_isImmutable);
1530
ProjectInstance
.VerifyThrowNotImmutable(destinationAsTaskItem._isImmutable);
1845
ProjectInstance
.VerifyThrowNotImmutable(_isImmutable);
1966
ProjectInstance
.VerifyThrowNotImmutable(_isImmutable);
1983
ProjectInstance
.VerifyThrowNotImmutable(_isImmutable);
2004
ProjectInstance
.VerifyThrowNotImmutable(_isImmutable);
2023
ProjectInstance
.VerifyThrowNotImmutable(_isImmutable);
2034
ProjectInstance
.VerifyThrowNotImmutable(_isImmutable);
2049
ProjectInstance
.VerifyThrowNotImmutable(_isImmutable);
2211
private
ProjectInstance
_project;
2218
internal ProjectItemInstanceFactory(
ProjectInstance
project)
2226
internal ProjectItemInstanceFactory(
ProjectInstance
project, string itemType)
Instance\ProjectPropertyInstance.cs (1)
77
ProjectInstance
.VerifyThrowNotImmutable(IsImmutable);
ObjectModelRemoting\DefinitionObjectsLinks\ProjectLink.cs (1)
235
public abstract
ProjectInstance
CreateProjectInstance(ProjectInstanceSettings settings, EvaluationContext evaluationContext);
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 (42)
Build\ProjectBuildManager.cs (9)
205
public (MSB.Execution.
ProjectInstance
? projectInstance, DiagnosticLog log) LoadProjectInstance(string path, TextReader content, IDictionary<string, string>? additionalGlobalProperties)
226
var
projectInstance = MSB.Execution.
ProjectInstance
.FromProjectRootElement(projectRootElement, new MSB.Definition.ProjectOptions
263
public async Task<MSB.Execution.
ProjectInstance
[]> BuildProjectInstancesAsync(
285
var results = new List<MSB.Execution.
ProjectInstance
>(targetFrameworks.Length);
291
var
projectInstance = await BuildProjectInstanceAsync(project, log, cancellationToken).ConfigureAwait(false);
309
private Task<MSB.Execution.
ProjectInstance
> BuildProjectInstanceAsync(
318
private async Task<MSB.Execution.
ProjectInstance
> BuildProjectInstanceAsync(
323
var
projectInstance = project.CreateProjectInstance();
MSBuild\CSharp\CSharpCommandLineArgumentReader.cs (2)
11
private CSharpCommandLineArgumentReader(MSB.Execution.
ProjectInstance
project)
16
public static string[] Read(MSB.Execution.
ProjectInstance
project)
MSBuild\CSharp\CSharpProjectCommandLineReader.cs (2)
17
public override IEnumerable<MSB.Framework.ITaskItem> GetCompilerCommandLineArgs(MSB.Execution.
ProjectInstance
executedProject)
20
public override string[] ReadCommandLineArgs(MSB.Execution.
ProjectInstance
project)
MSBuild\ProjectFile\CommandLineArgumentReader.cs (2)
15
protected readonly MSB.Execution.
ProjectInstance
Project;
18
protected CommandLineArgumentReader(MSB.Execution.
ProjectInstance
project)
MSBuild\ProjectFile\Extensions.cs (16)
15
public static IEnumerable<MSB.Framework.ITaskItem> GetAdditionalFiles(this MSB.Execution.
ProjectInstance
executedProject)
18
public static IEnumerable<MSB.Framework.ITaskItem> GetAnalyzers(this MSB.Execution.
ProjectInstance
executedProject)
21
public static IEnumerable<MSB.Framework.ITaskItem> GetDocuments(this MSB.Execution.
ProjectInstance
executedProject)
24
public static IEnumerable<MSB.Framework.ITaskItem> GetEditorConfigFiles(this MSB.Execution.
ProjectInstance
executedProject)
27
public static IEnumerable<MetadataReferenceItem> GetMetadataReferences(this MSB.Execution.
ProjectInstance
project)
38
public static string GetAbsolutePath(this MSB.Execution.
ProjectInstance
project, string path)
45
public static IEnumerable<ProjectFileReference> GetProjectReferences(this MSB.Execution.
ProjectInstance
executedProject)
50
public static PackageReferenceItem[] GetPackageReferences(this MSB.Execution.
ProjectInstance
executedProject)
95
public static string? ReadPropertyString(this MSB.Execution.
ProjectInstance
executedProject, string propertyName)
98
public static bool ReadPropertyBool(this MSB.Execution.
ProjectInstance
executedProject, string propertyName)
101
public static int ReadPropertyInt(this MSB.Execution.
ProjectInstance
executedProject, string propertyName)
104
public static int ReadCodePage(this MSB.Execution.
ProjectInstance
executedProject)
107
public static ulong ReadPropertyULong(this MSB.Execution.
ProjectInstance
executedProject, string propertyName)
110
public static TEnum? ReadPropertyEnum<TEnum>(this MSB.Execution.
ProjectInstance
executedProject, string propertyName, bool ignoreCase)
114
public static string ReadItemsAsString(this MSB.Execution.
ProjectInstance
executedProject, string itemType)
127
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 string[] ReadCommandLineArgs(MSB.Execution.
ProjectInstance
project);
MSBuild\ProjectFile\ProjectInstance.cs (1)
13
MSB.Execution.
ProjectInstance
? projectInstance,
MSBuild\ProjectFile\ProjectInstanceReader.cs (4)
18
public readonly MSB.Execution.
ProjectInstance
_projectInstance;
31
MSB.Execution.
ProjectInstance
projectInstance,
161
private static string[] GetContentFiles(MSB.Execution.
ProjectInstance
project)
170
private string[] TryGetCommandLineArgs(MSB.Execution.
ProjectInstance
project)
MSBuild\VisualBasic\VisualBasicCommandLineArgumentReader.cs (2)
13
public VisualBasicCommandLineArgumentReader(MSB.Execution.
ProjectInstance
project)
18
public static string[] Read(MSB.Execution.
ProjectInstance
project)
MSBuild\VisualBasic\VisualBasicProjectCommandLineReader.cs (2)
17
public override IEnumerable<MSB.Framework.ITaskItem> GetCompilerCommandLineArgs(MSB.Execution.
ProjectInstance
executedProject)
20
public override string[] ReadCommandLineArgs(MSB.Execution.
ProjectInstance
project)
Microsoft.DotNet.HotReload.Watch (35)
Browser\BrowserToolsBuildOutputs.cs (1)
74
public static BrowserToolsBuildOutputs? TryGetFor(
ProjectInstance
projectInstance, ILogger logger)
Build\BuildRequest.cs (4)
9
internal readonly struct BuildRequest<T>(
ProjectInstance
projectInstance, ImmutableArray<string> targets, T data)
11
public
ProjectInstance
ProjectInstance { get; } = projectInstance;
18
public static BuildRequest<object?> Create(
ProjectInstance
instance, ImmutableArray<string> targets)
21
public static BuildRequest<T> Create<T>(
ProjectInstance
instance, ImmutableArray<string> targets, T data)
Build\BuildResult.cs (2)
8
internal readonly struct BuildResult<T>(IReadOnlyDictionary<string, TargetResult> targetResults,
ProjectInstance
projectInstance, T data)
11
public
ProjectInstance
ProjectInstance { get; } = projectInstance;
Build\EvaluationResult.cs (4)
15
IReadOnlyDictionary<ProjectInstanceId,
ProjectInstance
> restoredProjectInstances,
29
public IReadOnlyDictionary<ProjectInstanceId,
ProjectInstance
> RestoredProjectInstances
167
var
projectInstance = buildResult.ProjectInstance;
236
private static string[] GetBuildTargets(
ProjectInstance
projectInstance, bool suppressStaticWebAssets)
Build\ProjectBuildManager.cs (3)
36
Func<
ProjectInstance
, bool> onFailure,
73
var
projectInstance = (
ProjectInstance
)submission.AsyncContext!;
Build\ProjectGraphFactory.cs (1)
115
private
ProjectInstance
CreateProjectInstance(string projectPath, Dictionary<string, string> globalProperties, ProjectCollection projectCollection, string virtualProjectTargetFramework, ILogger logger)
Build\ProjectGraphUtilities.cs (9)
19
public static string GetDisplayName(this
ProjectInstance
project)
22
public static string GetTargetFramework(this
ProjectInstance
project)
25
public static IReadOnlyList<string> GetTargetFrameworks(this
ProjectInstance
project)
58
public static string? GetOutputDirectory(this
ProjectInstance
project)
61
public static string GetAssemblyName(this
ProjectInstance
project)
67
public static string? GetIntermediateOutputDirectory(this
ProjectInstance
project)
86
public static IReadOnlyList<string> GetStringListPropertyValue(this
ProjectInstance
project, string propertyName)
92
public static bool GetBooleanPropertyValue(this
ProjectInstance
project, string propertyName, bool defaultValue = false)
149
public static ProjectInstanceId GetId(this
ProjectInstance
project)
HotReload\HotReloadDotNetWatcher.cs (5)
671
var
projectInstance = restoredProjectInstance.DeepCopy();
715
var
projectInstance = result.ProjectInstance;
1067
var
rootProject = projectGraph.Graph.GraphRoots.Single().ProjectInstance;
1197
ProjectInstance
rootProject,
1209
var
projectInstance = projectNode.ProjectInstance.DeepCopy();
HotReload\ManagedCodeSnapshot.cs (1)
13
public ImmutableDictionary<string, ImmutableArray<
ProjectInstance
>> ProjectInstances { get; init; }
HotReload\ManagedCodeWorkspace.cs (3)
26
private ImmutableDictionary<string, ImmutableArray<
ProjectInstance
>> _projectInstances
27
= ImmutableDictionary<string, ImmutableArray<
ProjectInstance
>>.Empty.WithComparers(PathUtilities.OSSpecificPathComparer);
94
private static ImmutableDictionary<string, ImmutableArray<
ProjectInstance
>> CreateProjectInstanceMap(ProjectGraph graph)
HotReload\ProjectUpdatesBuilder.cs (1)
204
private
ProjectInstance
GetProjectInstance(Project project)
HotReload\ProjectUpdatesBuilder.StaticWebAssets.cs (1)
42
private static bool HasScopedCssTargets(
ProjectInstance
projectInstance)
Microsoft.DotNet.ProjectTools (5)
BuildService.cs (5)
43
extension(Microsoft.Build.Execution.
ProjectInstance
projectInstance)
61
public Microsoft.Build.Execution.
ProjectInstance
Unwrap()
88
sealed file class ProjectInstance(Microsoft.Build.Execution.
ProjectInstance
inner) : IProjectInstance
105
return new(Microsoft.Build.Execution.
ProjectInstance
.FromProjectRootElement(projectRoot.Inner, new()
112
public Microsoft.Build.Execution.
ProjectInstance
Inner => inner;
MSBuild (5)
JsonOutputFormatter.cs (1)
45
internal void AddItemInstancesInJsonFormat(string[] itemNames,
ProjectInstance
project)
XMake.cs (4)
1138
ProjectInstance
project =
ProjectInstance
.FromFile(projectFile, new ProjectOptions
1451
private static ExitType OutputPropertiesAfterEvaluation(string[] getProperty, string[] getItem,
ProjectInstance
project, TextWriter outputStream)
1473
ProjectInstance
builtProject = result.ProjectStateAfterBuild;
NuGet.Build.Tasks.Console (15)
MSBuildProjectInstance.cs (3)
22
private readonly
ProjectInstance
_projectInstance;
28
public MSBuildProjectInstance(
ProjectInstance
projectInstance)
43
public static implicit operator MSBuildProjectInstance(
ProjectInstance
projectInstance)
MSBuildStaticGraphRestore.cs (10)
831
createProjectFactory: static (string projectPath, (
ProjectInstance
projectInstance, string targetFramework) args) =>
837
updateProjectFactory: static (string projectPath, RestoreProjectAdapter project, (
ProjectInstance
projectInstance, string targetFramework) args) =>
871
createProjectFactory: static (string projectPath, (
ProjectInstance
projectInstance, string targetFramework) args) =>
873
updateProjectFactory: static (string projectPath, ProjectWithInnerNodes project, (
ProjectInstance
projectInstance, string targetFramework) args) =>
958
Func<string, (
ProjectInstance
, string), TProject> createProjectFactory,
959
Func<string, TProject, (
ProjectInstance
, string), TProject> updateProjectFactory,
1261
Func<string, (
ProjectInstance
, string), TProject> createProjectFactory,
1262
Func<string, TProject, (
ProjectInstance
, string), TProject> updateProjectFactory,
1318
return
ProjectInstance
.FromFile(path, projectOptions);
1340
ProjectInstance
projectInstance = projectGraphItem.ProjectInstance;
TargetFrameworkAdapter.cs (2)
14
private
ProjectInstance
_projectInstance;
16
public TargetFrameworkAdapter(
ProjectInstance
projectInstance)
NuGet.CommandLine.XPlat (1)
Utility\MSBuildAPIUtility.cs (1)
937
var
newProject = new ProjectInstance(project.Xml, globalProperties, null, ProjectCollection.GlobalProjectCollection);
SelectTests (3)
GraphAffectedProjects.cs (3)
70
/// in every project's <see cref="
ProjectInstance
.ImportPaths"/> and Layer 1 already attributes a change
77
/// linking projects), plus <see cref="
ProjectInstance
.ImportPaths"/> (which captures repo hook files
293
var
instance = node.ProjectInstance;