27 instantiations of ProjectCollection
dotnet (18)
CliCompletion.cs (1)
73new ProjectCollection(),
Commands\New\MSBuildEvaluation\MSBuildEvaluator.cs (1)
17private readonly ProjectCollection _projectCollection = new();
Commands\Project\Convert\ProjectConvertCommand.cs (2)
50var projectCollection = new ProjectCollection(); 422using var outputProjectCollection = new ProjectCollection();
Commands\Reference\Add\ReferenceAddCommand.cs (1)
25using var projects = new ProjectCollection();
Commands\Reference\List\ReferenceListCommand.cs (1)
28var msbuildProj = MsbuildProject.FromFileOrDirectory(new ProjectCollection(), _fileOrDirectory, false);
Commands\Reference\Remove\ReferenceRemoveCommand.cs (1)
31var msbuildProj = MsbuildProject.FromFileOrDirectory(new ProjectCollection(), _fileOrDirectory, false);
Commands\Run\Api\RunApiCommand.cs (1)
76new ProjectCollection(),
Commands\Run\RunCommand.cs (2)
613var collection = new ProjectCollection(globalProperties: globalProperties, loggers: binaryLogger is null ? null : [binaryLogger], toolsetDefinitionLocations: ToolsetDefinitionLocations.Default); 1121using var collection = new ProjectCollection(globalProperties: globalProperties);
Commands\Run\RunCommandSelector.cs (2)
187_collection = new ProjectCollection( 235_restoreCollection = new ProjectCollection(
Commands\Run\VirtualProjectBuildingCommand.cs (1)
290var projectCollection = new ProjectCollection(
Commands\Test\MTP\MicrosoftTestingPlatformTestCommand.cs (1)
167using var collection = new ProjectCollection(globalProperties);
Commands\Test\MTP\MSBuildUtility.cs (3)
70using var collection = new ProjectCollection(globalProperties, loggers: logger is null ? null : [logger], toolsetDefinitionLocations: ToolsetDefinitionLocations.Default); 101using var collection = new ProjectCollection(globalProperties: CommonRunHelpers.GetGlobalPropertiesFromArgs(msbuildArgs), logger is null ? null : [logger], toolsetDefinitionLocations: ToolsetDefinitionLocations.Default); 166using var collection = new ProjectCollection(
Commands\Test\MTP\SolutionAndProjectUtility.cs (1)
341using var ownedCollection = projectCollection is null ? new ProjectCollection(globalProperties) : null;
Microsoft.Build (3)
Construction\Solution\SolutionProjectGenerator.cs (1)
1043new ProjectCollection(),
Definition\ProjectCollection.cs (2)
306/// 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. 462var local = new ProjectCollection(null, null, null, ToolsetDefinitionLocations.Default,
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (1)
Build\ProjectBuildManager.cs (1)
85_projectCollection = new MSB.Evaluation.ProjectCollection(allProperties, loggers: [], MSB.Evaluation.ToolsetDefinitionLocations.Default);
Microsoft.DotNet.Arcade.Sdk (1)
src\InstallDotNetCore.cs (1)
86var proj = Project.FromFile(VersionsPropsPath, new Build.Definition.ProjectOptions() { ProjectCollection = new ProjectCollection() });
Microsoft.DotNet.HotReload.Watch (1)
Build\ProjectGraphFactory.cs (1)
30private readonly ProjectCollection _collection = new(
MSBuild (2)
XMake.cs (2)
824using (ProjectCollection collection = new(globalProperties, loggers, ToolsetDefinitionLocations.Default)) 1421projectCollection = new ProjectCollection(
NuGet.Build.Tasks.Console (1)
MSBuildStaticGraphRestore.cs (1)
1258using var projectCollection = new ProjectCollection(
214 references to ProjectCollection
dotnet (38)
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)
24public ProjectRootElement CreateProjectRootElement(string entryPointFilePath, ProjectCollection projectCollection)
Commands\Project\Convert\ProjectConvertCommand.cs (2)
50var projectCollection = new ProjectCollection(); 422using var outputProjectCollection = new ProjectCollection();
Commands\Reference\Add\ReferenceAddCommand.cs (1)
25using var projects = new ProjectCollection();
Commands\Run\RunCommand.cs (7)
179Func<ProjectCollection, ProjectInstance>? projectFactory = null; 237internal ICommand GetTargetCommand(LaunchProfile? launchSettings, Func<ProjectCollection, ProjectInstance>? projectFactory, RunProperties? cachedRunProperties, FacadeLogger? logger) 468private void EnsureProjectIsBuilt(out Func<ProjectCollection, ProjectInstance>? projectFactory, out RunProperties? cachedRunProperties, out VirtualProjectBuildingCommand? projectBuilder, string? intermediateOutputPath, bool hasRuntimeEnvironmentVariableSupport) 564private ICommand GetTargetCommandForProject(ProjectLaunchProfile? launchSettings, Func<ProjectCollection, ProjectInstance>? projectFactory, RunProperties? cachedRunProperties, FacadeLogger? logger) 610static ProjectInstance EvaluateProject(string? projectFilePath, Func<ProjectCollection, ProjectInstance>? projectFactory, MSBuildArgs msbuildArgs, ILogger? binaryLogger) 613var collection = new ProjectCollection(globalProperties: globalProperties, loggers: binaryLogger is null ? null : [binaryLogger], toolsetDefinitionLocations: ToolsetDefinitionLocations.Default); 1121using var collection = new ProjectCollection(globalProperties: globalProperties);
Commands\Run\RunCommandSelector.cs (2)
33private ProjectCollection? _collection; 37private ProjectCollection? _restoreCollection;
Commands\Run\VirtualProjectBuildingCommand.cs (6)
290var projectCollection = new ProjectCollection( 581void PrintBuildInformation(ProjectCollection projectCollection, ProjectInstance projectInstance, BuildResult? buildOrRestoreResult) 1175public ProjectInstance CreateProjectInstance(ProjectCollection projectCollection) 1180public ProjectInstance CreateProjectInstance(ProjectCollection projectCollection, Action<IDictionary<string, string>>? addGlobalProperties) 1206ProjectCollection projectCollection, 1213ProjectCollection projectCollection,
Commands\Test\MTP\MicrosoftTestingPlatformTestCommand.cs (1)
167using var collection = new ProjectCollection(globalProperties);
Commands\Test\MTP\MSBuildUtility.cs (4)
70using var collection = new ProjectCollection(globalProperties, loggers: logger is null ? null : [logger], toolsetDefinitionLocations: ToolsetDefinitionLocations.Default); 101using var collection = new ProjectCollection(globalProperties: CommonRunHelpers.GetGlobalPropertiesFromArgs(msbuildArgs), logger is null ? null : [logger], toolsetDefinitionLocations: ToolsetDefinitionLocations.Default); 166using var collection = new ProjectCollection( 377ProjectCollection projectCollection,
Commands\Test\MTP\SolutionAndProjectUtility.cs (5)
170ProjectCollection collection, 237ProjectCollection projectCollection, 321ProjectCollection? projectCollection = null, 341using var ownedCollection = projectCollection is null ? new ProjectCollection(globalProperties) : null; 342var collection = projectCollection ?? ownedCollection!;
MsbuildProject.cs (6)
39private 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) 275private static ProjectRootElement TryOpenProject(ProjectCollection projects, string filename)
ReleasePropertyProjectLocator.cs (1)
102.CreateProjectInstance(ProjectCollection.GlobalProjectCollection);
Microsoft.Build (124)
BackEnd\BuildManager\BuildManager.cs (5)
1143_buildTelemetry.BuildEngineVersion = ProjectCollection.Version; 1144_buildTelemetry.BuildEngineDisplayVersion = ProjectCollection.DisplayVersion; 1250ProjectCollection.Version?.ToString(), 1272BuildEngineVersion = ProjectCollection.Version?.ToString(), 2158ProjectCollection.GlobalProjectCollection,
BackEnd\BuildManager\BuildParameters.cs (1)
257public BuildParameters(ProjectCollection projectCollection)
BackEnd\Components\SdkResolution\SdkResolverService.cs (1)
321SdkResolverContext context = new SdkResolverContext(buildEngineLogger, projectPath, solutionPath, ProjectCollection.Version, interactive, isRunningInVisualStudio)
BackEnd\Node\OutOfProcNode.cs (2)
754ProjectCollection.GlobalProjectCollection.RemoveAllToolsets(); 758ProjectCollection.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)
22using ProjectCollection = Microsoft.Build.Evaluation.ProjectCollection;
Definition\Project.cs (26)
115internal Project(ProjectCollection projectCollection, ProjectLink link) 140: this(ProjectRootElement.Create(ProjectCollection.GlobalProjectCollection, newProjectFileOptions)) 149public Project(ProjectCollection projectCollection) 159public Project(ProjectCollection projectCollection, NewProjectFileOptions newProjectFileOptions) 172public Project(IDictionary<string, string> globalProperties, string toolsVersion, ProjectCollection projectCollection) 186public Project(IDictionary<string, string> globalProperties, string toolsVersion, ProjectCollection projectCollection, NewProjectFileOptions newProjectFileOptions) 215: this(xml, globalProperties, toolsVersion, ProjectCollection.GlobalProjectCollection) 230public Project(ProjectRootElement xml, IDictionary<string, string> globalProperties, string toolsVersion, ProjectCollection projectCollection) 247public Project(ProjectRootElement xml, IDictionary<string, string> globalProperties, string toolsVersion, ProjectCollection projectCollection, ProjectLoadSettings loadSettings) 265public Project(ProjectRootElement xml, IDictionary<string, string> globalProperties, string toolsVersion, string subToolsetVersion, ProjectCollection projectCollection, ProjectLoadSettings loadSettings) 270private Project(ProjectRootElement xml, IDictionary<string, string> globalProperties, string toolsVersion, string subToolsetVersion, ProjectCollection projectCollection, ProjectLoadSettings loadSettings, 309: this(xmlReader, globalProperties, toolsVersion, ProjectCollection.GlobalProjectCollection) 324public Project(XmlReader xmlReader, IDictionary<string, string> globalProperties, string toolsVersion, ProjectCollection projectCollection) 341public Project(XmlReader xmlReader, IDictionary<string, string> globalProperties, string toolsVersion, ProjectCollection projectCollection, ProjectLoadSettings loadSettings) 359public Project(XmlReader xmlReader, IDictionary<string, string> globalProperties, string toolsVersion, string subToolsetVersion, ProjectCollection projectCollection, ProjectLoadSettings loadSettings) 364private Project(XmlReader xmlReader, IDictionary<string, string> globalProperties, string toolsVersion, string subToolsetVersion, ProjectCollection projectCollection, ProjectLoadSettings loadSettings, 402: this(projectFile, globalProperties, toolsVersion, ProjectCollection.GlobalProjectCollection) 418public Project(string projectFile, IDictionary<string, string> globalProperties, string toolsVersion, ProjectCollection projectCollection) 436public Project(string projectFile, IDictionary<string, string> globalProperties, string toolsVersion, ProjectCollection projectCollection, ProjectLoadSettings loadSettings) 455public Project(string projectFile, IDictionary<string, string> globalProperties, string toolsVersion, string subToolsetVersion, ProjectCollection projectCollection, ProjectLoadSettings loadSettings) 460private Project(string projectFile, IDictionary<string, string> globalProperties, string toolsVersion, string subToolsetVersion, ProjectCollection projectCollection, ProjectLoadSettings loadSettings, 506options.ProjectCollection ?? ProjectCollection.GlobalProjectCollection, 525options.ProjectCollection ?? ProjectCollection.GlobalProjectCollection, 544options.ProjectCollection ?? ProjectCollection.GlobalProjectCollection, 581public ProjectCollection ProjectCollection { get; } 1979private ProjectCollection ProjectCollection => Owner.ProjectCollection;
Definition\ProjectCollection.cs (4)
101private static ProjectCollection s_globalProjectCollection; 454public static ProjectCollection GlobalProjectCollection 462var local = new ProjectCollection(null, null, null, ToolsetDefinitionLocations.Default, 495var versionInfo = FileVersionInfo.GetVersionInfo(typeof(ProjectCollection).GetAssemblyPath());
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)
34/// The <see cref="ProjectCollection"/> the project is added to. Default is <see cref="ProjectCollection.GlobalProjectCollection"/>. 36public 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)
1134private static readonly string CachedFileVersion = ProjectCollection.Version.ToString(); 1152SetBuiltInProperty(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; 66ProjectCollection projectCollection, 643ProjectCollection 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, 838ProjectCollection projectCollection) 852ProjectCollection projectCollection,
Graph\ProjectInterpretation.cs (1)
75public IEnumerable<ReferenceInfo> GetReferences(ProjectGraphNode projectGraphNode, ProjectCollection projectCollection, ProjectGraph.ProjectInstanceFactoryFunc projectInstanceFactory)
Instance\ProjectInstance.cs (13)
227: this(projectFile, globalProperties, toolsVersion, ProjectCollection.GlobalProjectCollection) 243public ProjectInstance(string projectFile, IDictionary<string, string> globalProperties, string toolsVersion, ProjectCollection projectCollection) 261public ProjectInstance(string projectFile, IDictionary<string, string> globalProperties, string toolsVersion, string subToolsetVersion, ProjectCollection projectCollection) 278internal ProjectInstance(string projectFile, IDictionary<string, string> globalProperties, string toolsVersion, string subToolsetVersion, ProjectCollection projectCollection, EvaluationContext context, bool interactive = false) 301private ProjectInstance(string projectFile, IDictionary<string, string> globalProperties, string toolsVersion, string subToolsetVersion, ProjectCollection projectCollection, 332: this(xml, null, null, ProjectCollection.GlobalProjectCollection) 348public ProjectInstance(ProjectRootElement xml, IDictionary<string, string> globalProperties, string toolsVersion, ProjectCollection projectCollection) 367public ProjectInstance(ProjectRootElement xml, IDictionary<string, string> globalProperties, string toolsVersion, string subToolsetVersion, ProjectCollection projectCollection) 543private ProjectInstance(ProjectRootElement xml, IDictionary<string, string> globalProperties, string toolsVersion, string subToolsetVersion, ProjectCollection projectCollection, 619internal ProjectInstance(ProjectRootElement xml, IDictionary<string, string> globalProperties, string toolsVersion, int visualStudioVersionFromSolution, ProjectCollection projectCollection, ISdkResolverService sdkResolverService, int submissionId) 634internal ProjectInstance(ProjectRootElement xml, IDictionary<string, string> globalProperties, string toolsVersion, ILoggingService loggingService, int visualStudioVersionFromSolution, ProjectCollection projectCollection, ISdkResolverService sdkResolverService, int submissionId) 925options.ProjectCollection ?? ProjectCollection.GlobalProjectCollection, 944options.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)
61private readonly MSB.Evaluation.ProjectCollection _projectCollection;
Microsoft.DotNet.Cli.Utils (1)
MSBuildForwardingAppWithoutLogging.cs (1)
18get => Build.Evaluation.ProjectCollection.DisplayVersion;
Microsoft.DotNet.HotReload.Watch (7)
Build\LoadedProjectGraph.cs (2)
11internal sealed class LoadedProjectGraph(ProjectGraph graph, ProjectCollection collection, ILogger logger, GlobalOptions globalOptions, EnvironmentOptions environmentOptions) 29public ProjectCollection ProjectCollection => collection;
Build\ProjectBuildManager.cs (2)
11internal sealed class ProjectBuildManager(ProjectCollection collection, BuildReporter reporter) 20public readonly ProjectCollection Collection = collection;
Build\ProjectGraphFactory.cs (3)
25/// Reuse <see cref="ProjectCollection"/> with XML element caching to improve performance. 30private readonly ProjectCollection _collection = new( 114private ProjectInstance CreateProjectInstance(string projectPath, Dictionary<string, string> globalProperties, ProjectCollection projectCollection, string virtualProjectTargetFramework, ILogger logger)
Microsoft.DotNet.ProjectTools (4)
VirtualProjectBuilder.cs (4)
268ProjectCollection projectCollection, 284ProjectCollection projectCollection, 442ProjectCollection projectCollection, 484ProjectRootElement CreateProjectRootElement(string projectFileText, ProjectCollection projectCollection)
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 (10)
XMake.cs (10)
824using (ProjectCollection collection = new(globalProperties, loggers, ToolsetDefinitionLocations.Default)) 1119ProjectCollection.Version?.ToString(), 1341ProjectCollection projectCollection = null; 1755private static bool PrintTargets(string projectFile, string toolsVersion, Dictionary<string, string> globalProperties, TextWriter targetsWriter, ProjectCollection projectCollection) 1804ProjectCollection.DisplayVersion), 3676Assembly engineAssembly = typeof(ProjectCollection).GetTypeInfo().Assembly; 3735Assembly engineAssembly = typeof(ProjectCollection).GetTypeInfo().Assembly; 4196Console.WriteLine(ResourceUtilities.FormatResourceStringStripCodeAndKeyword("MSBuildVersionMessage", ProjectCollection.DisplayVersion, NativeMethods.FrameworkName)); 4254Console.WriteLine(ProjectCollection.Version.ToString()); 4258Console.Write(ProjectCollection.Version.ToString());
NuGet.Build.Tasks.Console (1)
MSBuildStaticGraphRestore.cs (1)
1258using 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)
178ProjectCollection.GlobalProjectCollection.UnloadProject(project.Project); 189ProjectCollection.GlobalProjectCollection.UnloadProject(project.Project); 276ProjectCollection.GlobalProjectCollection.UnloadProject(project); 295ProjectCollection.GlobalProjectCollection.UnloadProject(project.Project); 315ProjectCollection.GlobalProjectCollection.UnloadProject(project.Project); 934var newProject = new ProjectInstance(project.Xml, globalProperties, null, ProjectCollection.GlobalProjectCollection); 999ProjectCollection.GlobalProjectCollection.UnloadProject(projectPerFramework); 1068var element = VirtualProjectBuilder.CreateProjectRootElement(fullPath, ProjectCollection.GlobalProjectCollection); 1074return (ProjectRootElement.Open(filename, ProjectCollection.GlobalProjectCollection, preserveFormatting: true), false);