25 instantiations of ProjectCollection
dotnet (15)
CliCompletion.cs (1)
73new ProjectCollection(),
Commands\New\MSBuildEvaluation\MSBuildEvaluator.cs (1)
17private readonly ProjectCollection _projectCollection = new();
Commands\Project\Convert\ProjectConvertCommand.cs (2)
53var projectCollection = new ProjectCollection().Wrap(); 424using var outputProjectCollection = new ProjectCollection();
Commands\Reference\Add\ReferenceAddCommand.cs (1)
33using var projects = new ProjectCollection();
Commands\Reference\List\ReferenceListCommand.cs (1)
45var msbuildProj = MsbuildProject.FromFileOrDirectory(new ProjectCollection(), _fileOrDirectory, false);
Commands\Reference\Remove\ReferenceRemoveCommand.cs (1)
49var msbuildProj = MsbuildProject.FromFileOrDirectory(new ProjectCollection(), _fileOrDirectory, false);
Commands\Run\Api\RunApiCommand.cs (1)
80new ProjectCollection().Wrap(),
Commands\Run\RunCommand.cs (2)
582var collection = new ProjectCollection(globalProperties: globalProperties, loggers: binaryLogger is null ? null : [binaryLogger], toolsetDefinitionLocations: ToolsetDefinitionLocations.Default); 1100using var collection = new ProjectCollection(globalProperties: globalProperties);
Commands\Run\RunCommandSelector.cs (1)
188?? (_ownedCollection ??= new ProjectCollection(
Commands\Run\VirtualProjectBuildingCommand.cs (1)
217var projectCollection = new ProjectCollection(
Commands\Test\MTP\MicrosoftTestingPlatformTestCommand.cs (1)
758using var collection = new ProjectCollection(
Commands\Test\MTP\MSBuildUtility.cs (1)
388using var collection = new ProjectCollection(globalProperties);
MSBuildSession.cs (1)
64ProjectCollection = new ProjectCollection(
dotnet-aot (1)
src\sdk\src\Cli\dotnet\CliCompletion.cs (1)
73new ProjectCollection(),
Microsoft.Build (3)
Construction\Solution\SolutionProjectGenerator.cs (1)
1048new ProjectCollection(),
Definition\ProjectCollection.cs (2)
314/// This constructor disables target output logging, so TerminalLogger and other loggers may not work well. Prefer <see cref="ProjectCollection(IDictionary{string, string}, IEnumerable{ILogger}, IEnumerable{ForwardingLoggerRecord}, ToolsetDefinitionLocations, int, bool, bool, bool, bool, bool)"/> instead to control this behavior. 494var local = new ProjectCollection(null, null, ToolsetDefinitionLocations.Default,
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (1)
Build\ProjectBuildManager.cs (1)
98_projectCollection = new MSB.Evaluation.ProjectCollection(allProperties, loggers: [], MSB.Evaluation.ToolsetDefinitionLocations.Default);
Microsoft.DotNet.Arcade.Sdk (1)
src\InstallDotNetCore.cs (1)
94var proj = Project.FromFile(VersionsPropsPath, new Build.Definition.ProjectOptions() { ProjectCollection = new ProjectCollection() });
Microsoft.DotNet.HotReload.Watch (1)
Build\ProjectGraphFactory.cs (1)
31private readonly ProjectCollection _collection = new(
MSBuild (2)
XMake.cs (2)
1049using (ProjectCollection collection = new(globalProperties, loggers, ToolsetDefinitionLocations.Default)) 1695projectCollection = new ProjectCollection(
NuGet.Build.Tasks.Console (1)
MSBuildStaticGraphRestore.cs (1)
1288using var projectCollection = new ProjectCollection(
220 references to ProjectCollection
dotnet (35)
CommandFactory\CommandResolution\MSBuildProject.cs (1)
128_project = ProjectCollection.GlobalProjectCollection.LoadProject(
Commands\New\MSBuildEvaluation\MSBuildEvaluator.cs (1)
17private readonly ProjectCollection _projectCollection = new();
Commands\NuGet\NuGetVirtualProjectBuilder.cs (1)
25public ProjectRootElement CreateProjectRootElement(string entryPointFilePath, ProjectCollection projectCollection)
Commands\Project\Convert\ProjectConvertCommand.cs (1)
424using var outputProjectCollection = new ProjectCollection();
Commands\Reference\Add\ReferenceAddCommand.cs (2)
33using var projects = new ProjectCollection(); 113private int ExecuteForFileBasedApp(ProjectCollection projects, bool interactive)
Commands\Run\RunCommand.cs (7)
175Func<ProjectCollection, ProjectInstance>? projectFactory = null; 236internal ICommand GetTargetCommand(LaunchProfile? launchSettings, Func<ProjectCollection, ProjectInstance>? projectFactory, RunProperties? cachedRunProperties, bool runPropertiesFromEvaluation, FacadeLogger? logger) 424private void EnsureProjectIsBuilt(out Func<ProjectCollection, ProjectInstance>? projectFactory, out RunProperties? cachedRunProperties, out VirtualProjectBuildingCommand? projectBuilder, string? intermediateOutputPath, bool hasRuntimeEnvironmentVariableSupport) 520private ICommand GetTargetCommandForProject(ProjectLaunchProfile? launchSettings, Func<ProjectCollection, ProjectInstance>? projectFactory, RunProperties? cachedRunProperties, bool runPropertiesFromEvaluation, FacadeLogger? logger) 579static ProjectInstance EvaluateProject(string? projectFilePath, Func<ProjectCollection, ProjectInstance>? projectFactory, MSBuildArgs msbuildArgs, ILogger? binaryLogger) 582var collection = new ProjectCollection(globalProperties: globalProperties, loggers: binaryLogger is null ? null : [binaryLogger], toolsetDefinitionLocations: ToolsetDefinitionLocations.Default); 1100using var collection = new ProjectCollection(globalProperties: globalProperties);
Commands\Run\RunCommandSelector.cs (2)
38private ProjectCollection? _ownedCollection; 186private ProjectCollection Collection
Commands\Run\VirtualProjectBuildingCommand.cs (4)
217var projectCollection = new ProjectCollection( 512void PrintBuildInformation(ProjectCollection projectCollection, ProjectInstance projectInstance, BuildResult? buildOrRestoreResult) 722public ProjectInstance CreateProjectInstance(ProjectCollection projectCollection) 728public ProjectInstance CreateProjectInstance(ProjectCollection projectCollection, IDictionary<string, string>? additionalGlobalProperties = null)
Commands\Test\MTP\MicrosoftTestingPlatformTestCommand.cs (1)
758using var collection = new ProjectCollection(
Commands\Test\MTP\MSBuildUtility.cs (4)
75var collection = buildSession.ProjectCollection; 109var collection = buildSession.ProjectCollection; 388using var collection = new ProjectCollection(globalProperties); 417ProjectCollection projectCollection,
Commands\Test\MTP\SolutionAndProjectUtility.cs (3)
170ProjectCollection collection, 254ProjectCollection projectCollection, 444var collection = buildSession.ProjectCollection;
MsbuildProject.cs (6)
38private readonly ProjectCollection _projects; 45private MsbuildProject(ProjectCollection projects, ProjectRootElement project, bool interactive) 53public static MsbuildProject FromFileOrDirectory(ProjectCollection projects, string fileOrDirectory, bool interactive) 65public static MsbuildProject FromFile(ProjectCollection projects, string projectPath, bool interactive) 81public static MsbuildProject FromDirectory(ProjectCollection projects, string projectDirectory, bool interactive) 286private static ProjectRootElement TryOpenProject(ProjectCollection projects, string filename)
MSBuildSession.cs (1)
79public ProjectCollection ProjectCollection { get; }
ReleasePropertyProjectLocator.cs (1)
109.CreateProjectInstance(ProjectCollection.GlobalProjectCollection);
dotnet-aot (6)
src\sdk\src\Cli\dotnet\MsbuildProject.cs (6)
38private readonly ProjectCollection _projects; 45private MsbuildProject(ProjectCollection projects, ProjectRootElement project, bool interactive) 53public static MsbuildProject FromFileOrDirectory(ProjectCollection projects, string fileOrDirectory, bool interactive) 65public static MsbuildProject FromFile(ProjectCollection projects, string projectPath, bool interactive) 81public static MsbuildProject FromDirectory(ProjectCollection projects, string projectDirectory, bool interactive) 286private static ProjectRootElement TryOpenProject(ProjectCollection projects, string filename)
dotnet-openapi (1)
Commands\BaseCommand.cs (1)
127var project = ProjectCollection.GlobalProjectCollection.LoadProject(
Microsoft.Build (127)
BackEnd\BuildManager\BuildManager.cs (5)
1210_buildTelemetry.BuildEngineVersion = ProjectCollection.Version; 1211_buildTelemetry.BuildEngineDisplayVersion = ProjectCollection.DisplayVersion; 1331ProjectCollection.Version?.ToString(), 1353BuildEngineVersion = ProjectCollection.Version?.ToString(), 2252ProjectCollection.GlobalProjectCollection,
BackEnd\BuildManager\BuildParameters.cs (1)
251public BuildParameters(ProjectCollection projectCollection)
BackEnd\Components\SdkResolution\SdkResolverService.cs (1)
333SdkResolverContext context = new SdkResolverContext(buildEngineLogger, projectPath, solutionPath, ProjectCollection.Version, interactive, isRunningInVisualStudio)
BackEnd\Node\OutOfProcNode.cs (2)
758ProjectCollection.GlobalProjectCollection.RemoveAllToolsets(); 762ProjectCollection.GlobalProjectCollection.AddToolset(toolSet);
Construction\ProjectRootElement.cs (22)
401public string EscapedFullPath => _escapedFullPath ?? (_escapedFullPath = ProjectCollection.Escape(FullPath)); 745return Create(ProjectCollection.GlobalProjectCollection, Project.DefaultNewProjectTemplateOptions); 754return Create(ProjectCollection.GlobalProjectCollection, projectFileOptions); 761public static ProjectRootElement Create(ProjectCollection projectCollection) 767/// Initialize an in-memory, empty ProjectRootElement instance that can be saved later using the specified <see cref="ProjectCollection"/> and <see cref="NewProjectFileOptions"/>. 769public static ProjectRootElement Create(ProjectCollection projectCollection, NewProjectFileOptions projectFileOptions) 782return Create(path, ProjectCollection.GlobalProjectCollection, Project.DefaultNewProjectTemplateOptions); 791return Create(path, ProjectCollection.GlobalProjectCollection, newProjectFileOptions); 798public static ProjectRootElement Create(string path, ProjectCollection projectCollection) 807public static ProjectRootElement Create(string path, ProjectCollection projectCollection, NewProjectFileOptions newProjectFileOptions) 827return Create(xmlReader, ProjectCollection.GlobalProjectCollection, preserveFormatting: false); 835public static ProjectRootElement Create(XmlReader xmlReader, ProjectCollection projectCollection) 845public static ProjectRootElement Create(XmlReader xmlReader, ProjectCollection projectCollection, bool preserveFormatting) 860return Open(path, ProjectCollection.GlobalProjectCollection); 868public static ProjectRootElement Open(string path, ProjectCollection projectCollection) 878public static ProjectRootElement Open(string path, ProjectCollection projectCollection, bool? preserveFormatting) 902return TryOpen(path, ProjectCollection.GlobalProjectCollection); 910/// <param name="projectCollection">The <see cref="ProjectCollection"/> to load the project into.</param> 916public static ProjectRootElement TryOpen(string path, ProjectCollection projectCollection) 926/// <param name="projectCollection">The <see cref="ProjectCollection"/> to load the project into.</param> 935public static ProjectRootElement TryOpen(string path, ProjectCollection projectCollection, bool? preserveFormatting) 1781return new ProjectRootElement(document, ProjectCollection.GlobalProjectCollection.ProjectRootElementCache);
Construction\Solution\SolutionProjectGenerator.cs (1)
23using ProjectCollection = Microsoft.Build.Evaluation.ProjectCollection;
Definition\Project.cs (26)
103internal Project(ProjectCollection projectCollection, ProjectLink link) 128: this(ProjectRootElement.Create(ProjectCollection.GlobalProjectCollection, newProjectFileOptions)) 137public Project(ProjectCollection projectCollection) 147public Project(ProjectCollection projectCollection, NewProjectFileOptions newProjectFileOptions) 160public Project(IDictionary<string, string> globalProperties, string toolsVersion, ProjectCollection projectCollection) 174public Project(IDictionary<string, string> globalProperties, string toolsVersion, ProjectCollection projectCollection, NewProjectFileOptions newProjectFileOptions) 203: this(xml, globalProperties, toolsVersion, ProjectCollection.GlobalProjectCollection) 218public Project(ProjectRootElement xml, IDictionary<string, string> globalProperties, string toolsVersion, ProjectCollection projectCollection) 235public Project(ProjectRootElement xml, IDictionary<string, string> globalProperties, string toolsVersion, ProjectCollection projectCollection, ProjectLoadSettings loadSettings) 253public Project(ProjectRootElement xml, IDictionary<string, string> globalProperties, string toolsVersion, string subToolsetVersion, ProjectCollection projectCollection, ProjectLoadSettings loadSettings) 258private Project(ProjectRootElement xml, IDictionary<string, string> globalProperties, string toolsVersion, string subToolsetVersion, ProjectCollection projectCollection, ProjectLoadSettings loadSettings, 297: this(xmlReader, globalProperties, toolsVersion, ProjectCollection.GlobalProjectCollection) 312public Project(XmlReader xmlReader, IDictionary<string, string> globalProperties, string toolsVersion, ProjectCollection projectCollection) 329public Project(XmlReader xmlReader, IDictionary<string, string> globalProperties, string toolsVersion, ProjectCollection projectCollection, ProjectLoadSettings loadSettings) 347public Project(XmlReader xmlReader, IDictionary<string, string> globalProperties, string toolsVersion, string subToolsetVersion, ProjectCollection projectCollection, ProjectLoadSettings loadSettings) 352private Project(XmlReader xmlReader, IDictionary<string, string> globalProperties, string toolsVersion, string subToolsetVersion, ProjectCollection projectCollection, ProjectLoadSettings loadSettings, 390: this(projectFile, globalProperties, toolsVersion, ProjectCollection.GlobalProjectCollection) 406public Project(string projectFile, IDictionary<string, string> globalProperties, string toolsVersion, ProjectCollection projectCollection) 424public Project(string projectFile, IDictionary<string, string> globalProperties, string toolsVersion, ProjectCollection projectCollection, ProjectLoadSettings loadSettings) 443public Project(string projectFile, IDictionary<string, string> globalProperties, string toolsVersion, string subToolsetVersion, ProjectCollection projectCollection, ProjectLoadSettings loadSettings) 448private Project(string projectFile, IDictionary<string, string> globalProperties, string toolsVersion, string subToolsetVersion, ProjectCollection projectCollection, ProjectLoadSettings loadSettings, 495options.ProjectCollection ?? ProjectCollection.GlobalProjectCollection, 515options.ProjectCollection ?? ProjectCollection.GlobalProjectCollection, 535options.ProjectCollection ?? ProjectCollection.GlobalProjectCollection, 587public ProjectCollection ProjectCollection { get; } 1996private ProjectCollection ProjectCollection => Owner.ProjectCollection;
Definition\ProjectCollection.cs (4)
102private static ProjectCollection s_globalProjectCollection; 486public static ProjectCollection GlobalProjectCollection 494var local = new ProjectCollection(null, null, ToolsetDefinitionLocations.Default, 527string fileVersion = typeof(ProjectCollection).Assembly
Definition\ProjectCollectionChangedEventArgs.cs (9)
9/// Properties or other mutable state associated with a <see cref="ProjectCollection"/>. 14/// The <see cref="ProjectCollection.DefaultToolsVersion"/> property changed. 34/// The <see cref="ProjectCollection.IsBuildEnabled"/> property changed. 39/// The <see cref="ProjectCollection.OnlyLogCriticalEvents"/> property changed. 44/// The <see cref="ProjectCollection.HostServices"/> property changed. 49/// The <see cref="ProjectCollection.DisableMarkDirty"/> property changed. 54/// The <see cref="ProjectCollection.SkipEvaluation"/> property changed. 61/// Event arguments for the <see cref="ProjectCollection.ProjectCollectionChanged"/> event. 74/// Gets the nature of the change made to the <see cref="ProjectCollection"/>.
Definition\ProjectOptions.cs (2)
35/// The <see cref="ProjectCollection"/> the project is added to. Default is <see cref="ProjectCollection.GlobalProjectCollection"/>. 37public ProjectCollection ProjectCollection { get; set; }
Definition\Toolset.cs (4)
160public Toolset(string toolsVersion, string toolsPath, ProjectCollection projectCollection, string msbuildOverrideTasksPath) 176public Toolset(string toolsVersion, string toolsPath, IDictionary<string, string> buildProperties, ProjectCollection projectCollection, string msbuildOverrideTasksPath) 193public Toolset(string toolsVersion, string toolsPath, IDictionary<string, string> buildProperties, ProjectCollection projectCollection, IDictionary<string, SubToolset> subToolsets, string msbuildOverrideTasksPath) 294internal Toolset(string toolsVersion, string toolsPath, PropertyDictionary<ProjectPropertyInstance> buildProperties, ProjectCollection projectCollection, DirectoryGetFiles getFiles, LoadXmlFromPath loadXmlFromPath, string msbuildOverrideTasksPath, DirectoryExists directoryExists)
Evaluation\Evaluator.cs (2)
1197private static readonly string CachedFileVersion = ProjectCollection.Version.ToString(); 1215SetBuiltInProperty(ReservedPropertyNames.semanticVersion, ProjectCollection.DisplayVersion);
Evaluation\ProjectChangedEventArgs.cs (1)
9/// Event arguments for the <see cref="ProjectCollection.ProjectChanged"/> event.
Evaluation\ProjectXmlChangedEventArgs.cs (1)
13/// Event arguments for the <see cref="ProjectCollection.ProjectXmlChanged"/> event.
Graph\GraphBuilder.cs (3)
48private readonly ProjectCollection _projectCollection; 67ProjectCollection projectCollection, 646ProjectCollection projectCollection)
Graph\ProjectGraph.cs (19)
38/// <param name="projectCollection">The <see cref="ProjectCollection" /> context for parsing.</param> 58ProjectCollection projectCollection); 116: this(new ProjectGraphEntryPoint(entryProjectFile).AsEnumerable(), ProjectCollection.GlobalProjectCollection, null) 129: this(ProjectGraphEntryPoint.CreateEnumerable(entryProjectFiles), ProjectCollection.GlobalProjectCollection, null) 145public ProjectGraph(string entryProjectFile, ProjectCollection projectCollection) 162public ProjectGraph(IEnumerable<string> entryProjectFiles, ProjectCollection projectCollection) 188public ProjectGraph(string entryProjectFile, ProjectCollection projectCollection, ProjectInstanceFactoryFunc projectInstanceFactory) 206: this(new ProjectGraphEntryPoint(entryProjectFile, globalProperties).AsEnumerable(), ProjectCollection.GlobalProjectCollection, null) 223: this(ProjectGraphEntryPoint.CreateEnumerable(entryProjectFiles, globalProperties), ProjectCollection.GlobalProjectCollection, null) 243public ProjectGraph(string entryProjectFile, IDictionary<string, string> globalProperties, ProjectCollection projectCollection) 264public ProjectGraph(IEnumerable<string> entryProjectFiles, IDictionary<string, string> globalProperties, ProjectCollection projectCollection) 277: this(entryPoint.AsEnumerable(), ProjectCollection.GlobalProjectCollection, null) 289: this(entryPoints, ProjectCollection.GlobalProjectCollection, null) 304public ProjectGraph(ProjectGraphEntryPoint entryPoint, ProjectCollection projectCollection) 335ProjectCollection projectCollection, 375ProjectCollection projectCollection, 419ProjectCollection projectCollection, 971ProjectCollection projectCollection) 985ProjectCollection projectCollection,
Graph\ProjectGraphOptions.cs (3)
46/// The <see cref="ProjectCollection" /> to load projects into when constructing the graph. Defaults to <see cref="ProjectCollection.GlobalProjectCollection" />. 48public ProjectCollection ProjectCollection { get; init; } = ProjectCollection.GlobalProjectCollection;
Graph\ProjectInterpretation.cs (1)
75public IEnumerable<ReferenceInfo> GetReferences(ProjectGraphNode projectGraphNode, ProjectCollection projectCollection, ProjectGraph.ProjectInstanceFactoryFunc projectInstanceFactory, ProjectGraphMode graphMode)
Instance\ProjectInstance.cs (13)
234: this(projectFile, globalProperties, toolsVersion, ProjectCollection.GlobalProjectCollection) 250public ProjectInstance(string projectFile, IDictionary<string, string> globalProperties, string toolsVersion, ProjectCollection projectCollection) 268public ProjectInstance(string projectFile, IDictionary<string, string> globalProperties, string toolsVersion, string subToolsetVersion, ProjectCollection projectCollection) 285internal ProjectInstance(string projectFile, IDictionary<string, string> globalProperties, string toolsVersion, string subToolsetVersion, ProjectCollection projectCollection, EvaluationContext context, bool interactive = false) 309private ProjectInstance(string projectFile, IDictionary<string, string> globalProperties, string toolsVersion, string subToolsetVersion, ProjectCollection projectCollection, 341: this(xml, null, null, ProjectCollection.GlobalProjectCollection) 357public ProjectInstance(ProjectRootElement xml, IDictionary<string, string> globalProperties, string toolsVersion, ProjectCollection projectCollection) 376public ProjectInstance(ProjectRootElement xml, IDictionary<string, string> globalProperties, string toolsVersion, string subToolsetVersion, ProjectCollection projectCollection) 553private ProjectInstance(ProjectRootElement xml, IDictionary<string, string> globalProperties, string toolsVersion, string subToolsetVersion, ProjectCollection projectCollection, 630internal ProjectInstance(ProjectRootElement xml, IDictionary<string, string> globalProperties, string toolsVersion, int visualStudioVersionFromSolution, ProjectCollection projectCollection, ISdkResolverService sdkResolverService, int submissionId) 645internal ProjectInstance(ProjectRootElement xml, IDictionary<string, string> globalProperties, string toolsVersion, ILoggingService loggingService, int visualStudioVersionFromSolution, ProjectCollection projectCollection, ISdkResolverService sdkResolverService, int submissionId) 936options.ProjectCollection ?? ProjectCollection.GlobalProjectCollection, 956options.ProjectCollection ?? ProjectCollection.GlobalProjectCollection,
Logging\ReusableLogger.cs (1)
16/// <see cref="Evaluation.ProjectCollection"/>/<see cref="Evaluation.Project"/> _and_
ObjectModelRemoting\ExternalProjectsProvider.cs (2)
27public virtual void Disconnected(ProjectCollection collection) { } 36public static void SetExternalProjectsProvider(ProjectCollection collection, ExternalProjectsProvider link)
ObjectModelRemoting\LinkedObjectFactory.cs (4)
33private LinkedObjectsFactory(ProjectCollection collection) 42public static LinkedObjectsFactory Get(ProjectCollection collection) 68public ProjectCollection Collection { get; } 73public static IReadOnlyCollection<Project> GetLocalProjects(ProjectCollection collection, string projectFile = null)
Microsoft.Build.Tasks.Git (7)
GitOperations.cs (7)
259var item = new TaskItem(Evaluation.ProjectCollection.Escape(repoRoot)); 261item.SetMetadata(Names.SourceRoot.ScmRepositoryUrl, Evaluation.ProjectCollection.Escape(repositoryUrl)); 263item.SetMetadata(Names.SourceRoot.BranchName, Evaluation.ProjectCollection.Escape(branchName)); 321var item = new TaskItem(Evaluation.ProjectCollection.Escape(submodule.WorkingDirectoryFullPath.EndWithSeparator())); 323item.SetMetadata(Names.SourceRoot.ScmRepositoryUrl, Evaluation.ProjectCollection.Escape(submoduleUri.AbsoluteUri)); 325item.SetMetadata(Names.SourceRoot.ContainingRoot, Evaluation.ProjectCollection.Escape(repoRoot)); 326item.SetMetadata(Names.SourceRoot.NestedRoot, Evaluation.ProjectCollection.Escape(submodule.WorkingDirectoryRelativePath.EndWithSeparator('/')));
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (1)
Build\ProjectBuildManager.cs (1)
62private readonly MSB.Evaluation.ProjectCollection _projectCollection;
Microsoft.DotNet.Cli.Utils (1)
MSBuildForwardingAppWithoutLogging.cs (1)
36get => Build.Evaluation.ProjectCollection.DisplayVersion;
Microsoft.DotNet.HotReload.Watch (7)
Build\LoadedProjectGraph.cs (2)
12internal sealed class LoadedProjectGraph(ProjectGraph graph, ProjectCollection collection, ILogger logger, GlobalOptions globalOptions, EnvironmentOptions environmentOptions) 30public ProjectCollection ProjectCollection => collection;
Build\ProjectBuildManager.cs (2)
11internal sealed class ProjectBuildManager(ProjectCollection collection, BuildReporter reporter) 20public readonly ProjectCollection Collection = collection;
Build\ProjectGraphFactory.cs (3)
26/// Reuse <see cref="ProjectCollection"/> with XML element caching to improve performance. 31private readonly ProjectCollection _collection = new( 115private ProjectInstance CreateProjectInstance(string projectPath, Dictionary<string, string> globalProperties, ProjectCollection projectCollection, string virtualProjectTargetFramework, ILogger logger)
Microsoft.DotNet.ProjectTools (4)
BuildService.cs (4)
33private static readonly ConditionalWeakTable<Microsoft.Build.Evaluation.ProjectCollection, IProjectCollection> s_projectCollections = new(); 35extension(Microsoft.Build.Evaluation.ProjectCollection projectCollection) 68sealed file class ProjectCollection(Microsoft.Build.Evaluation.ProjectCollection inner) : IProjectCollection 80public Microsoft.Build.Evaluation.ProjectCollection Inner => inner;
Microsoft.NET.Build.Tasks (1)
ResolvePackageAssets.cs (1)
1823_writer.Write(ProjectCollection.Escape(itemSpec));
Microsoft.NET.Sdk.Publish.Tasks (1)
Tasks\GenerateEFSQLScripts.cs (1)
60string connectionStringEscaped = ProjectCollection.Escape(dbContext.GetMetadata("Value"));
Microsoft.SourceLink.AzureDevOpsServer.Git (1)
src\sourcelink\src\Common\GitProvider\TranslateRepositoryUrlGitTask.cs (1)
110sourceRoot.SetMetadata(Names.SourceRoot.ScmRepositoryUrl, Evaluation.ProjectCollection.Escape(translatedUrl));
Microsoft.SourceLink.AzureRepos.Git (1)
src\sourcelink\src\Common\GitProvider\TranslateRepositoryUrlGitTask.cs (1)
110sourceRoot.SetMetadata(Names.SourceRoot.ScmRepositoryUrl, Evaluation.ProjectCollection.Escape(translatedUrl));
Microsoft.SourceLink.Bitbucket.Git (1)
src\sourcelink\src\Common\GitProvider\TranslateRepositoryUrlGitTask.cs (1)
110sourceRoot.SetMetadata(Names.SourceRoot.ScmRepositoryUrl, Evaluation.ProjectCollection.Escape(translatedUrl));
Microsoft.SourceLink.Gitea (1)
src\sourcelink\src\Common\GitProvider\TranslateRepositoryUrlGitTask.cs (1)
110sourceRoot.SetMetadata(Names.SourceRoot.ScmRepositoryUrl, Evaluation.ProjectCollection.Escape(translatedUrl));
Microsoft.SourceLink.Gitee (1)
src\sourcelink\src\Common\GitProvider\TranslateRepositoryUrlGitTask.cs (1)
110sourceRoot.SetMetadata(Names.SourceRoot.ScmRepositoryUrl, Evaluation.ProjectCollection.Escape(translatedUrl));
Microsoft.SourceLink.GitHub (1)
src\sourcelink\src\Common\GitProvider\TranslateRepositoryUrlGitTask.cs (1)
110sourceRoot.SetMetadata(Names.SourceRoot.ScmRepositoryUrl, Evaluation.ProjectCollection.Escape(translatedUrl));
Microsoft.SourceLink.GitLab (1)
src\sourcelink\src\Common\GitProvider\TranslateRepositoryUrlGitTask.cs (1)
110sourceRoot.SetMetadata(Names.SourceRoot.ScmRepositoryUrl, Evaluation.ProjectCollection.Escape(translatedUrl));
Microsoft.SourceLink.GitWeb (1)
src\sourcelink\src\Common\GitProvider\TranslateRepositoryUrlGitTask.cs (1)
110sourceRoot.SetMetadata(Names.SourceRoot.ScmRepositoryUrl, Evaluation.ProjectCollection.Escape(translatedUrl));
MSBuild (9)
XMake.cs (9)
1049using (ProjectCollection collection = new(globalProperties, loggers, ToolsetDefinitionLocations.Default)) 1375ProjectCollection.Version?.ToString(), 1615ProjectCollection projectCollection = null; 2025private static bool PrintTargets(string projectFile, string toolsVersion, Dictionary<string, string> globalProperties, TextWriter targetsWriter, ProjectCollection projectCollection) 2074ProjectCollection.DisplayVersion), 4116Assembly engineAssembly = typeof(ProjectCollection).Assembly; 4175Assembly engineAssembly = typeof(ProjectCollection).Assembly; 4636Console.WriteLine(ResourceUtilities.FormatResourceStringStripCodeAndKeyword("MSBuildVersionMessage", ProjectCollection.DisplayVersion, NativeMethods.FrameworkName)); 4691Console.WriteLine(ProjectCollection.Version.ToString());
NuGet.Build.Tasks.Console (1)
MSBuildStaticGraphRestore.cs (1)
1288using var projectCollection = new ProjectCollection(
NuGet.CommandLine.XPlat (11)
Commands\Why\WhyCommandRunner.cs (1)
151ProjectCollection.GlobalProjectCollection.UnloadProject(project);
IVirtualProjectBuilder.cs (1)
32ProjectRootElement CreateProjectRootElement(string entryPointFilePath, ProjectCollection projectCollection);
Utility\MSBuildAPIUtility.cs (9)
179ProjectCollection.GlobalProjectCollection.UnloadProject(project.Project); 190ProjectCollection.GlobalProjectCollection.UnloadProject(project.Project); 277ProjectCollection.GlobalProjectCollection.UnloadProject(project); 296ProjectCollection.GlobalProjectCollection.UnloadProject(project.Project); 316ProjectCollection.GlobalProjectCollection.UnloadProject(project.Project); 937var newProject = new ProjectInstance(project.Xml, globalProperties, null, ProjectCollection.GlobalProjectCollection); 1002ProjectCollection.GlobalProjectCollection.UnloadProject(projectPerFramework); 1071var element = VirtualProjectBuilder.CreateProjectRootElement(fullPath, ProjectCollection.GlobalProjectCollection); 1077return (ProjectRootElement.Open(filename, ProjectCollection.GlobalProjectCollection, preserveFormatting: true), false);