Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to latest client SDK to bring .NET 7 support onto the frameworks tab #9312

Merged
merged 2 commits into from
Nov 16, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="NuGet.Build.Tasks.Pack">
<Version>6.0.0</Version>
<Version>6.4.0</Version>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
Expand Down
14 changes: 5 additions & 9 deletions src/NuGet.Services.Entities/NuGet.Services.Entities.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,11 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="EntityFramework">
<Version>6.4.0-preview3-19553-01</Version>
</PackageReference>
<PackageReference Include="Newtonsoft.Json">
<Version>13.0.1</Version>
</PackageReference>
<PackageReference Include="NuGet.Frameworks">
<Version>6.0.0</Version>
</PackageReference>
<PackageReference Include="EntityFramework" Version="6.4.0-preview3-19553-01" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
<PackageReference Include="NuGet.Frameworks" Version="6.4.0" />
<!-- This was lifted to a top-level dependency to resolve a Component Governance alert. -->
<PackageReference Include="System.Data.SqlClient" Version="4.8.5" />
</ItemGroup>

<ItemGroup>
Expand Down
11 changes: 10 additions & 1 deletion src/NuGetGallery.Core/Frameworks/SupportedFrameworks.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,13 @@ public static class SupportedFrameworks
public static readonly NuGetFramework Net60Tizen = new NuGetFramework(FrameworkIdentifiers.NetCoreApp, Version6, "tizen", EmptyVersion);
public static readonly NuGetFramework Net60TvOs = new NuGetFramework(FrameworkIdentifiers.NetCoreApp, Version6, "tvos", EmptyVersion);
public static readonly NuGetFramework Net60Windows = new NuGetFramework(FrameworkIdentifiers.NetCoreApp, Version6, "windows", EmptyVersion);
public static readonly NuGetFramework Net70Android = new NuGetFramework(FrameworkIdentifiers.NetCoreApp, Version7, "android", EmptyVersion);
public static readonly NuGetFramework Net70Ios = new NuGetFramework(FrameworkIdentifiers.NetCoreApp, Version7, "ios", EmptyVersion);
public static readonly NuGetFramework Net70MacOs = new NuGetFramework(FrameworkIdentifiers.NetCoreApp, Version7, "macos", EmptyVersion);
public static readonly NuGetFramework Net70MacCatalyst = new NuGetFramework(FrameworkIdentifiers.NetCoreApp, Version7, "maccatalyst", EmptyVersion);
public static readonly NuGetFramework Net70Tizen = new NuGetFramework(FrameworkIdentifiers.NetCoreApp, Version7, "tizen", EmptyVersion);
public static readonly NuGetFramework Net70TvOs = new NuGetFramework(FrameworkIdentifiers.NetCoreApp, Version7, "tvos", EmptyVersion);
public static readonly NuGetFramework Net70Windows = new NuGetFramework(FrameworkIdentifiers.NetCoreApp, Version7, "windows", EmptyVersion);
public static readonly NuGetFramework NetCore = new NuGetFramework(FrameworkIdentifiers.NetCore, EmptyVersion);
public static readonly NuGetFramework NetMf = new NuGetFramework(FrameworkIdentifiers.NetMicro, EmptyVersion);
public static readonly NuGetFramework UAP = new NuGetFramework(FrameworkIdentifiers.UAP, EmptyVersion);
Expand All @@ -51,7 +58,9 @@ static SupportedFrameworks()
MonoAndroid, MonoMac, MonoTouch,
Native,
Net11, Net2, Net35, Net4, Net403, Net45, Net451, Net452, Net46, Net461, Net462, Net463, Net47, Net471, Net472, Net48,
Net50, Net50Windows, Net60, Net60Android, Net60Ios, Net60MacCatalyst, Net60MacOs, Net60TvOs, Net60Windows,
Net50, Net50Windows,
Net60, Net60Android, Net60Ios, Net60MacCatalyst, Net60MacOs, Net60TvOs, Net60Windows,
Net70, Net70Android, Net70Ios, Net70MacCatalyst, Net70MacOs, Net70TvOs, Net70Windows,
NetCore, NetCore45, NetCore451,
NetCoreApp10, NetCoreApp11, NetCoreApp20, NetCoreApp21, NetCoreApp22, NetCoreApp30, NetCoreApp31,
NetMf,
Expand Down
2 changes: 1 addition & 1 deletion src/NuGetGallery.Core/NuGetGallery.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
<Version>5.2.6</Version>
</PackageReference>
<PackageReference Include="NuGet.Packaging">
<Version>6.0.0</Version>
<Version>6.4.0</Version>
</PackageReference>
<PackageReference Include="NuGet.Services.FeatureFlags">
<Version>2.106.0</Version>
Expand Down
27 changes: 19 additions & 8 deletions src/NuGetGallery.Core/Services/AssetFrameworkHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,12 @@ public static IEnumerable<NuGetFramework> GetAssetFrameworks(string packageId, I
var conventions = new ManagedCodeConventions(runtimeGraph);

// Let's test for tools packages first--they're a special case
var groups = Enumerable.Empty<ContentItemGroup>();
var groups = new List<ContentItemGroup>();
if (packageTypes.Count == 1 && (packageTypes[0] == PackageType.DotnetTool ||
packageTypes[0] == PackageType.DotnetCliTool))
{
// Only a package that is a tool package (and nothing else) will be matched against tools pattern set
groups = items.FindItemGroups(conventions.Patterns.ToolsAssemblies);
items.PopulateItemGroups(conventions.Patterns.ToolsAssemblies, groups);
}
else
{
Expand All @@ -67,14 +67,25 @@ public static IEnumerable<NuGetFramework> GetAssetFrameworks(string packageId, I
};

// We'll create a set of "groups" --these are content items which satisfy file pattern sets
var standardGroups = patterns
.SelectMany(p => items.FindItemGroups(p));
foreach (var pattern in patterns)
{
items.PopulateItemGroups(pattern, groups);
}

// Filter out MSBuild assets that don't match the package ID and append to groups we already have
var msbuildGroups = msbuildPatterns
.SelectMany(p => items.FindItemGroups(p))
.Where(g => HasBuildItemsForPackageId(g.Items, packageId));
groups = standardGroups.Concat(msbuildGroups);
var msbuildGroups = new List<ContentItemGroup>();
foreach (var pattern in msbuildPatterns)
{
items.PopulateItemGroups(pattern, msbuildGroups);
}

foreach (var group in msbuildGroups)
{
if (HasBuildItemsForPackageId(group.Items, packageId))
{
groups.Add(group);
}
}
}

// Now that we have a collection of groups which have made it through the pattern set filter, let's transform them into TFMs
Expand Down
2 changes: 1 addition & 1 deletion src/NuGetGallery.Services/NuGetGallery.Services.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
<Version>4.2.2</Version>
</PackageReference>
<PackageReference Include="NuGet.Protocol">
<Version>6.0.0</Version>
<Version>6.4.0</Version>
</PackageReference>
<PackageReference Include="NuGet.Services.Configuration">
<Version>2.106.0</Version>
Expand Down
10 changes: 9 additions & 1 deletion src/NuGetGallery/Web.config
Original file line number Diff line number Diff line change
Expand Up @@ -576,6 +576,14 @@
</system.diagnostics>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="NuGet.Versioning" publicKeyToken="31BF3856AD364E35" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-6.4.0.123" newVersion="6.4.0.123"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="NuGet.Packaging" publicKeyToken="31BF3856AD364E35" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-6.4.0.123" newVersion="6.4.0.123"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.IdentityModel.Tokens" publicKeyToken="31BF3856AD364E35" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-6.7.1.0" newVersion="6.7.1.0"/>
Expand Down Expand Up @@ -674,4 +682,4 @@
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
</configuration>