26 instantiations of TargetFrameworkInformation
aspire-managed (1)
NuGet\Commands\RestoreCommand.cs (1)
352
var tfInfo = new
TargetFrameworkInformation
Microsoft.Build.NuGetSdkResolver (1)
RestoreRunnerEx.cs (1)
59
frameworks.Add(new
TargetFrameworkInformation
NuGet.Build.Tasks (1)
GetReferenceNearestTargetFrameworkTask.cs (1)
149
targetFrameworkInformations.Add(new
TargetFrameworkInformation
()
NuGet.Build.Tasks.Console (1)
MSBuildStaticGraphRestore.cs (1)
764
var targetFrameworkInformation = new
TargetFrameworkInformation
()
NuGet.Build.Tasks.Pack (1)
PackTaskLogic.cs (1)
1015
framework = new
TargetFrameworkInformation
(framework) { Dependencies = newFrameworkDependencies };
NuGet.CommandLine.XPlat (1)
Commands\PackageReferenceCommands\AddPackageReferenceCommandRunner.cs (1)
388
project.TargetFrameworks[originalIndex] = new
TargetFrameworkInformation
(frameworkInfo) { Dependencies = newDependencies };
NuGet.Commands (9)
RestoreCommand\Utility\MSBuildRestoreUtility.cs (7)
485
var targetFrameworkInfo = new
TargetFrameworkInformation
()
610
spec.TargetFrameworks[index] = new
TargetFrameworkInformation
(frameworkInfo) { DownloadDependencies = newDownloadDependencies };
627
spec.TargetFrameworks[index] = new
TargetFrameworkInformation
(frameworkInfo) { Dependencies = dependencies.Add(dependency) };
765
spec.TargetFrameworks[i] = new
TargetFrameworkInformation
(spec.TargetFrameworks[i]) { PackagesToPrune = prunePackageReferences[spec.TargetFrameworks[i].TargetAlias] };
859
spec.TargetFrameworks[index] = new
TargetFrameworkInformation
(frameworkInfo) { FrameworkReferences = newFrameworkReferences };
897
new
TargetFrameworkInformation
()
1239
spec.TargetFrameworks[index] = new
TargetFrameworkInformation
(frameworkInfo)
RestoreCommand\Utility\PackageSpecFactory.cs (1)
417
var targetFrameworkInformation = new
TargetFrameworkInformation
()
RestoreCommand\Utility\ToolRestoreUtility.cs (1)
36
new
TargetFrameworkInformation
NuGet.PackageManagement (3)
BuildIntegration\BuildIntegratedRestoreUtility.cs (1)
187
lockFile.PackageSpec.TargetFrameworks[i] = new
TargetFrameworkInformation
(frameworkInfo) { Dependencies = newDependencies };
Projects\MSBuildNuGetProject.cs (1)
665
new
TargetFrameworkInformation
()
Projects\ProjectJsonNuGetProject.cs (1)
217
packageSpec.TargetFrameworks[0] = new
TargetFrameworkInformation
(tfi) { FrameworkName = nuGetFramework };
NuGet.ProjectModel (8)
JsonPackageSpecReader.cs (1)
90
targetFrameworkInformation = new
TargetFrameworkInformation
(targetFrameworkInformation) { FrameworkName = updatedFramework };
JsonPackageSpecReader.Utf8JsonStreamReader.cs (1)
1524
var targetFrameworkInformation = new
TargetFrameworkInformation
()
PackageSpecExtensions.cs (2)
26
return frameworkInfo ?? new
TargetFrameworkInformation
();
139
return new
TargetFrameworkInformation
();
PackageSpecOperations.cs (4)
66
spec.TargetFrameworks[i] = new
TargetFrameworkInformation
(targetFramework) { Dependencies = newDependenciesImmutable };
77
spec.TargetFrameworks[i] = new
TargetFrameworkInformation
(framework) { Dependencies = newDependencies };
171
return new
TargetFrameworkInformation
(targetFramework) { Dependencies = newDependencies, CentralPackageVersions = newCentralPackageVersions };
254
spec.TargetFrameworks[i] = new
TargetFrameworkInformation
(framework) { Dependencies = remainingDependenciesImmutable };
138 references to TargetFrameworkInformation
aspire-managed (1)
NuGet\Commands\RestoreCommand.cs (1)
352
var
tfInfo = new TargetFrameworkInformation
Microsoft.Build.NuGetSdkResolver (1)
RestoreRunnerEx.cs (1)
55
var frameworks = new List<
TargetFrameworkInformation
>(TargetFrameworks.Count);
NuGet.Build.Tasks (2)
GetReferenceNearestTargetFrameworkTask.cs (2)
145
var targetFrameworkInformations = new List<
TargetFrameworkInformation
>();
161
var
nearestNuGetFramework = packageSpec.GetNearestTargetFramework(projectNuGetFramework, CurrentProjectTargetFrameworkProperty);
NuGet.Build.Tasks.Console (10)
MSBuildStaticGraphRestore.cs (10)
490
internal static List<ProjectRestoreMetadataFrameworkInfo> GetProjectRestoreMetadataFrameworkInfos(List<
TargetFrameworkInformation
> targetFrameworkInfos, IReadOnlyDictionary<string, IMSBuildProject> projects)
494
foreach (
var
targetFrameworkInfo in targetFrameworkInfos)
727
internal static List<
TargetFrameworkInformation
> GetTargetFrameworkInfos(IReadOnlyDictionary<string, IMSBuildProject> projectInnerNodes, bool isCpvmEnabled, bool isPruningEnabledGlobally)
729
var targetFrameworkInfos = new List<
TargetFrameworkInformation
>(projectInnerNodes.Count);
746
var assetTargetFallbackEnum = MSBuildStringUtility.Split(msBuildProjectInstance.GetProperty(nameof(
TargetFrameworkInformation
.AssetTargetFallback))).Select(NuGetFramework.Parse).ToList();
764
var
targetFrameworkInformation = new TargetFrameworkInformation()
774
RuntimeIdentifierGraphPath = msBuildProjectInstance.GetProperty(nameof(
TargetFrameworkInformation
.RuntimeIdentifierGraphPath)),
973
(ProjectRestoreMetadata restoreMetadata, List<
TargetFrameworkInformation
> targetFrameworkInfos) = GetProjectRestoreMetadataAndTargetFrameworkInformation(project, projectsByTargetFramework, settings);
1013
private (ProjectRestoreMetadata RestoreMetadata, List<
TargetFrameworkInformation
> TargetFrameworkInfos) GetProjectRestoreMetadataAndTargetFrameworkInformation(IMSBuildProject project, IReadOnlyDictionary<string, IMSBuildProject> projectsByTargetFramework, ISettings settings)
1026
List<
TargetFrameworkInformation
> targetFrameworkInfos = GetTargetFrameworkInfos(projectsByTargetFramework, isCentralPackageManagementEnabled, isPruningEnabledGlobally);
NuGet.Build.Tasks.Pack (6)
PackTaskLogic.cs (6)
380
foreach (
var
tfm in assetsFile.PackageSpec.TargetFrameworks)
446
foreach (
var
framework in assetsFile.PackageSpec.TargetFrameworks)
1006
var
framework = frameworks[i];
1050
TargetFrameworkInformation
framework,
1072
TargetFrameworkInformation
framework,
1098
TargetFrameworkInformation
framework,
NuGet.CommandLine.XPlat (3)
Commands\Package\Update\PackageUpdateCommandRunner.cs (2)
494
foreach (
var
tfm in project.TargetFrameworks)
617
foreach (
var
tfm in project.TargetFrameworks)
Utility\MSBuildAPIUtility.cs (1)
789
TargetFrameworkInformation
tfmInformation;
NuGet.Commands (64)
PackagesLockFileBuilder.cs (1)
35
TargetFrameworkInformation
? framework = assetsFile.PackageSpec.GetTargetFramework(target.TargetAlias);
RestoreCommand\CompatibilityChecker.cs (2)
307
var
targetFrameworkInformation = (
TargetFrameworkInformation
)frameworkInfoObject;
RestoreCommand\DependencyGraphResolver.cs (6)
169
TargetFrameworkInformation
projectTargetFramework = _request.Project.GetTargetFramework(frameworkRuntimeDefinition.TargetAlias)!;
887
/// <param name="projectTargetFramework">The <see cref="
TargetFrameworkInformation
" /> of the project.</param>
889
private Dictionary<LibraryDependencyIndex, VersionRange>? IndexPinnedPackageVersions(bool isCentralPackageTransitivePinningEnabled,
TargetFrameworkInformation
? projectTargetFramework)
911
TargetFrameworkInformation
projectTargetFramework,
1424
/// <param name="projectTargetFramework">The <see cref="
TargetFrameworkInformation
" /> containing target framework information for the project.</param>
1427
private bool TryGetRuntimeGraph(List<NuGetv3LocalRepository> localRepositories, Dictionary<string, RestoreTargetGraph> graphsByTargetAlias, FrameworkRuntimeDefinition frameworkRuntimeDefinition,
TargetFrameworkInformation
? projectTargetFramework, [NotNullWhen(true)] out RuntimeGraph? runtimeGraph)
RestoreCommand\LockFileBuilder.cs (5)
185
var
tfi = project.GetTargetFramework(targetGraph.Framework);
431
foreach (
var
frameworkInfo in project.TargetFrameworks
491
TargetFrameworkInformation
targetFrameworkInformation = project.TargetFrameworks.FirstOrDefault(i => i.FrameworkName.Equals(targetGraph.Framework));
518
/// <param name="targetFrameworkInformation">The <see cref="
TargetFrameworkInformation
" /> for the target framework to get centrally defined transitive dependencies for.</param>
521
private IEnumerable<LibraryDependency> GetLibraryDependenciesForCentralTransitiveDependencies(RestoreTargetGraph targetGraph,
TargetFrameworkInformation
targetFrameworkInformation, ILogger logger)
RestoreCommand\Logging\PackageSpecificWarningProperties.cs (2)
37
foreach (
var
framework in packageSpec.TargetFrameworks)
60
var
targetFrameworkInformation = packageSpec.GetTargetFramework(framework);
RestoreCommand\Logging\TransitiveNoWarnUtils.cs (1)
115
TargetFrameworkInformation
targetFrameworkInformation = nodeProjectSpec.GetTargetFramework(parentTargetFramework);
RestoreCommand\ProjectRestoreCommand.cs (2)
223
foreach (
TargetFrameworkInformation
targetFrameworkInformation in packageSpec.TargetFrameworks.NoAllocEnumerate())
236
async Task<DownloadDependencyResolutionResult> ResolveDownloadDependenciesAsync(RemoteWalkContext context,
TargetFrameworkInformation
targetFrameworkInformation, CancellationToken token)
RestoreCommand\RestoreCommand.cs (14)
422
foreach (
var
framework in project.TargetFrameworks.NoAllocEnumerate())
888
foreach (
TargetFrameworkInformation
framework in project.TargetFrameworks)
952
foreach (
TargetFrameworkInformation
framework in project.TargetFrameworks)
991
foreach (
var
framework in project.TargetFrameworks)
1025
foreach (
var
framework in project.TargetFrameworks.NoAllocEnumerate())
1039
foreach (
var
framework in project.TargetFrameworks)
1047
static bool ContainsPackage(KeyValuePair<string, List<string>> prunedPackage,
TargetFrameworkInformation
framework)
1079
foreach (
var
frameworkInfo in _request.Project.TargetFrameworks)
1141
foreach (
TargetFrameworkInformation
targetFrameworkInformation in _request.Project.TargetFrameworks)
1301
internal static string GetTargetFrameworksAsString(IList<
TargetFrameworkInformation
> targetFrameworks)
1305
foreach (
TargetFrameworkInformation
targetFramework in targetFrameworks)
2125
foreach (
TargetFrameworkInformation
tfi in project.TargetFrameworks)
2264
foreach (
TargetFrameworkInformation
framework in packageSpec.TargetFrameworks.NoAllocEnumerate())
2270
foreach (
TargetFrameworkInformation
framework in packageSpec.TargetFrameworks.NoAllocEnumerate())
RestoreCommand\Utility\AuditUtility.cs (4)
29
private readonly IList<
TargetFrameworkInformation
> _targetFrameworks;
67
IList<
TargetFrameworkInformation
> targetFrameworks,
94
foreach (
var
targetFramework in _targetFrameworks.NoAllocEnumerate())
133
foreach (
var
targetFramework in _targetFrameworks.NoAllocEnumerate())
RestoreCommand\Utility\IncludeFlagUtils.cs (1)
43
var
specFramework = spec.GetTargetFramework(targetGraph.Framework);
RestoreCommand\Utility\LockFileUtils.cs (2)
507
var
targetFrameworkInformation = (
TargetFrameworkInformation
)frameworkInfoObject;
RestoreCommand\Utility\MSBuildRestoreUtility.cs (12)
435
private static IEnumerable<
TargetFrameworkInformation
> GetTargetFrameworkInformation(string filePath, ProjectStyle restoreType, IEnumerable<IMSBuildItem> items)
485
var
targetFrameworkInfo = new TargetFrameworkInformation()
578
TargetFrameworkInformation
targetFrameworkInformation = spec.TargetFrameworks.Single(e => e.TargetAlias.Equals(frameworkPair.Key, StringComparison.Ordinal));
605
var
frameworkInfo = spec.TargetFrameworks[index];
620
var
frameworkInfo = spec.TargetFrameworks[index];
642
var dict = new Dictionary<string,
TargetFrameworkInformation
>(StringComparer.OrdinalIgnoreCase);
643
foreach (
var
targetFramework in spec.TargetFrameworks)
672
dict.TryGetValue(framework, out
TargetFrameworkInformation
frameworkInfo);
708
foreach (
var
targetFramework in spec.TargetFrameworks)
850
TargetFrameworkInformation
frameworkInfo = spec.TargetFrameworks[index];
1157
IList<
TargetFrameworkInformation
> specFrameworks)
1237
var
frameworkInfo = spec.TargetFrameworks[index];
RestoreCommand\Utility\NoOpRestoreUtilities.cs (1)
282
foreach (
var
targetFrameworkInformation in request.Project.TargetFrameworks)
RestoreCommand\Utility\PackageSpecFactory.cs (10)
68
(ProjectRestoreMetadata? restoreMetadata, List<
TargetFrameworkInformation
>? targetFrameworkInfos) = GetProjectRestoreMetadataAndTargetFrameworkInformation(project);
277
private static (ProjectRestoreMetadata? RestoreMetadata, List<
TargetFrameworkInformation
>? TargetFrameworkInfos) GetProjectRestoreMetadataAndTargetFrameworkInformation(IProject project)
291
List<
TargetFrameworkInformation
> targetFrameworkInfos = GetTargetFrameworkInfos(project, isCentralPackageManagementEnabled, isPruningEnabledGlobally);
379
internal static List<
TargetFrameworkInformation
> GetTargetFrameworkInfos(IProject project, bool isCpvmEnabled, bool isPruningEnabledGlobally)
381
var targetFrameworkInfos = new List<
TargetFrameworkInformation
>(project.TargetFrameworks.Count);
398
var assetTargetFallbackEnum = MSBuildStringUtility.Split(msBuildProjectInstance.GetProperty(nameof(
TargetFrameworkInformation
.AssetTargetFallback))).Select(NuGetFramework.Parse).ToList();
417
var
targetFrameworkInformation = new TargetFrameworkInformation()
427
RuntimeIdentifierGraphPath = msBuildProjectInstance.GetProperty(nameof(
TargetFrameworkInformation
.RuntimeIdentifierGraphPath)),
726
internal static List<ProjectRestoreMetadataFrameworkInfo> GetProjectRestoreMetadataFrameworkInfos(List<
TargetFrameworkInformation
> targetFrameworkInfos, IReadOnlyDictionary<string, ITargetFramework> projects)
730
foreach (
var
targetFrameworkInfo in targetFrameworkInfos)
RestoreCommand\Utility\SpecValidationUtility.cs (1)
154
foreach (
var
framework in spec.TargetFrameworks)
NuGet.PackageManagement (5)
BuildIntegration\BuildIntegratedRestoreUtility.cs (1)
171
var
frameworkInfo = lockFile.PackageSpec.TargetFrameworks[i];
NuGetPackageManager.cs (2)
3221
foreach (
var
framework in packageSpec.TargetFrameworks)
3336
TargetFrameworkInformation
matchingTfi = projectAction.RestoreResult.LockFile.PackageSpec.TargetFrameworks.Count == 1 ?
Projects\MSBuildNuGetProject.cs (1)
663
packageSpec = new PackageSpec(new List<
TargetFrameworkInformation
>
Projects\ProjectJsonNuGetProject.cs (1)
205
var
tfi = packageSpec.TargetFrameworks[0];
NuGet.ProjectModel (46)
JsonPackageSpecReader.cs (1)
68
private static void AddTargetFramework(PackageSpec packageSpec, NuGetFramework frameworkName, NuGetFramework secondaryFramework,
TargetFrameworkInformation
targetFrameworkInformation)
JsonPackageSpecReader.Utf8JsonStreamReader.cs (1)
1524
var
targetFrameworkInformation = new TargetFrameworkInformation()
LockFile\Utf8JsonStreamLockFileConverter.cs (1)
149
lockFile.PackageSpec = new PackageSpec(Array.Empty<
TargetFrameworkInformation
>());
PackageSpec.cs (5)
24
public PackageSpec(IList<
TargetFrameworkInformation
> frameworks)
29
public PackageSpec() : this(new List<
TargetFrameworkInformation
>())
34
IList<
TargetFrameworkInformation
> frameworks,
63
public IList<
TargetFrameworkInformation
> TargetFrameworks { get; private set; }
125
List<
TargetFrameworkInformation
> targetFrameworks;
PackageSpecExtensions.cs (14)
16
public static
TargetFrameworkInformation
GetTargetFramework(this PackageSpec project, NuGetFramework targetFramework)
18
var
frameworkInfo = project.TargetFrameworks.FirstOrDefault(f => NuGetFramework.Comparer.Equals(targetFramework, f.FrameworkName));
37
var
projectFrameworkInfo = GetTargetFramework(project, targetFramework);
49
/// Get the <see cref="
TargetFrameworkInformation
"/> for the given target alias.
54
/// <returns>The <see cref="
TargetFrameworkInformation
"/> if it exists, <see langword="null"/> otherwise. </returns>
55
public static
TargetFrameworkInformation
? GetTargetFramework(this PackageSpec project, string? targetAlias)
57
foreach (
var
framework in project.TargetFrameworks.NoAllocEnumerate())
98
public static
TargetFrameworkInformation
GetNearestTargetFramework(this PackageSpec project, NuGetFramework targetFramework, string? targetAlias)
100
TargetFrameworkInformation
? result = null;
101
List<
TargetFrameworkInformation
>? frameworks = null;
130
foreach (
var
framework in frameworks)
141
static void FindMatchingFrameworks(PackageSpec project, NuGetFramework targetFramework, ref
TargetFrameworkInformation
? matchedFramework, ref List<
TargetFrameworkInformation
>? matchingFrameworks)
143
foreach (
TargetFrameworkInformation
framework in project.TargetFrameworks.NoAllocEnumerate())
PackageSpecOperations.cs (9)
24
/// then the <see cref="
TargetFrameworkInformation
"/> will be updated,
41
var
targetFramework = spec.TargetFrameworks[i];
73
var
framework = spec.TargetFrameworks[i];
86
/// then the <see cref="
TargetFrameworkInformation
"/> will be updated,
127
var
targetFramework = spec.TargetFrameworks[i];
153
var
targetFramework = spec.TargetFrameworks[i];
162
private static
TargetFrameworkInformation
GetTargetFrameworkInformationWithAddedDependency(PackageSpec spec, PackageDependency dependency,
TargetFrameworkInformation
targetFramework)
236
var
framework = spec.TargetFrameworks[i];
PackageSpecReferenceDependencyProvider.cs (6)
218
var
targetFrameworkInfo = GetNearestTargetFrameworkWithFallbacks(packageSpec, targetFramework, alias);
238
var
targetFrameworkInfo = packageSpec.GetNearestTargetFramework(targetFramework, targetAlias);
302
private static
TargetFrameworkInformation
GetNearestTargetFrameworkWithFallbacks(
306
TargetFrameworkInformation
initialResult = null)
308
var
targetFrameworkInfo = initialResult ?? packageSpec.GetNearestTargetFramework(targetFramework, targetAlias);
370
TargetFrameworkInformation
targetFrameworkInfo)
PackageSpecWriter.cs (2)
520
private static void SetFrameworks(IObjectWriter writer, IList<
TargetFrameworkInformation
> frameworks, bool hashing, bool useTargetFrameworkAsKey)
526
foreach (
var
framework in frameworks.OrderBy(c => c.TargetAlias, StringComparer.OrdinalIgnoreCase))
ProjectLockFile\PackagesLockFileUtilities.cs (3)
140
foreach (
var
framework in project.TargetFrameworks)
180
var
targetFrameworkInformation = project.TargetFrameworks.FirstOrDefault(e => e.TargetAlias == restoreMetadataFramework.TargetAlias);
222
TargetFrameworkInformation
p2pSpecTargetFrameworkInformation = default;
TargetFrameworkInformation.cs (4)
19
public class TargetFrameworkInformation : IEquatable<
TargetFrameworkInformation
>
133
public TargetFrameworkInformation(
TargetFrameworkInformation
cloneFrom)
176
return Equals(obj as
TargetFrameworkInformation
);
179
public bool Equals(
TargetFrameworkInformation
other)