1 write to _loadedProject
Microsoft.CodeAnalysis.Workspaces.MSBuild (1)
MSBuild\ProjectFile\ProjectFile.cs (1)
35
_loadedProject
= loadedProject;
52 references to _loadedProject
Microsoft.CodeAnalysis.Workspaces.MSBuild (52)
MSBuild\ProjectFile\ProjectFile.cs (52)
29
public virtual string FilePath =>
_loadedProject
?.FullPath ?? string.Empty;
49
if (
_loadedProject
is null)
51
return ImmutableArray.Create(ProjectFileInfo.CreateEmpty(Language,
_loadedProject
?.FullPath, Log));
54
var targetFrameworkValue =
_loadedProject
.GetPropertyValue(PropertyNames.TargetFramework);
55
var targetFrameworksValue =
_loadedProject
.GetPropertyValue(PropertyNames.TargetFrameworks);
66
if (!
_loadedProject
.GlobalProperties.TryGetValue(PropertyNames.TargetFramework, out var initialGlobalTargetFrameworkValue))
71
_loadedProject
.SetGlobalProperty(PropertyNames.TargetFramework, targetFramework);
72
_loadedProject
.ReevaluateIfNecessary();
81
_loadedProject
.RemoveGlobalProperty(PropertyNames.TargetFramework);
85
_loadedProject
.SetGlobalProperty(PropertyNames.TargetFramework, initialGlobalTargetFrameworkValue);
88
_loadedProject
.ReevaluateIfNecessary();
95
projectFileInfo ??= ProjectFileInfo.CreateEmpty(Language,
_loadedProject
?.FullPath, Log);
102
if (
_loadedProject
is null)
104
return ProjectFileInfo.CreateEmpty(Language,
_loadedProject
?.FullPath, Log);
107
var project = await _buildManager.BuildProjectAsync(
_loadedProject
, Log, cancellationToken).ConfigureAwait(false);
111
: ProjectFileInfo.CreateEmpty(Language,
_loadedProject
.FullPath, Log);
246
if (
_loadedProject
is null)
251
foreach (var item in
_loadedProject
.GetItems(ItemNames.Compile))
300
if (
_loadedProject
is null)
305
var relativePath = PathUtilities.GetRelativePath(
_loadedProject
.DirectoryPath, filePath);
318
_loadedProject
.AddItem(ItemNames.Compile, relativePath, metadata);
323
if (
_loadedProject
is null)
328
var relativePath = PathUtilities.GetRelativePath(
_loadedProject
.DirectoryPath, filePath);
330
var items =
_loadedProject
.GetItems(ItemNames.Compile);
335
_loadedProject
.RemoveItem(item);
341
if (
_loadedProject
is null)
358
_loadedProject
.AddItem(ItemNames.Reference, identity.GetDisplayName(), metadata);
364
_loadedProject
.AddItem(ItemNames.Reference, fileName, metadata);
368
var relativePath = PathUtilities.GetRelativePath(
_loadedProject
.DirectoryPath, peRef.FilePath);
371
_loadedProject
.AddItem(ItemNames.Reference, fileName, metadata);
403
if (
_loadedProject
is null)
413
_loadedProject
.RemoveItem(item);
420
if (
_loadedProject
is null)
425
var references =
_loadedProject
.GetItems(ItemNames.Reference);
445
var relativePath = PathUtilities.GetRelativePath(
_loadedProject
.DirectoryPath, filePath);
472
if (
_loadedProject
is null)
487
var relativePath = PathUtilities.GetRelativePath(
_loadedProject
.DirectoryPath, reference.Path);
488
_loadedProject
.AddItem(ItemNames.ProjectReference, relativePath, metadata);
493
if (
_loadedProject
is null)
501
_loadedProject
.RemoveItem(item);
507
if (
_loadedProject
is null)
512
var references =
_loadedProject
.GetItems(ItemNames.ProjectReference);
513
var relativePath = PathUtilities.GetRelativePath(
_loadedProject
.DirectoryPath, projectFilePath);
529
if (
_loadedProject
is null)
536
var relativePath = PathUtilities.GetRelativePath(
_loadedProject
.DirectoryPath, fileRef.FullPath);
537
_loadedProject
.AddItem(ItemNames.Analyzer, relativePath);
543
if (
_loadedProject
is null)
550
var relativePath = PathUtilities.GetRelativePath(
_loadedProject
.DirectoryPath, fileRef.FullPath);
552
var analyzers =
_loadedProject
.GetItems(ItemNames.Analyzer);
557
_loadedProject
.RemoveItem(item);
564
if (
_loadedProject
is null)
569
_loadedProject
.Save();