Skip to content

Commit e7ec325

Browse files
authored
Merge pull request #10235 from NuGet/dev
[ReleasePrep][2024.10.23]RI of dev into main
2 parents 11a6d8b + 92f6412 commit e7ec325

12 files changed

Lines changed: 189 additions & 72 deletions

File tree

Directory.Packages.props

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@
5252
<PackageVersion Include="Microsoft.AspNet.WebPages.Data" Version="3.2.9" />
5353
<PackageVersion Include="Microsoft.AspNet.WebPages.WebData" Version="3.2.9" />
5454
<PackageVersion Include="Microsoft.AspNet.WebPages" Version="3.2.9" />
55-
<PackageVersion Include="Microsoft.AspNetCore.Cryptography.Internal" Version="1.0.0" />
56-
<PackageVersion Include="Microsoft.AspNetCore.Cryptography.KeyDerivation" Version="1.0.0" />
55+
<PackageVersion Include="Microsoft.AspNetCore.Cryptography.Internal" Version="8.0.10" />
56+
<PackageVersion Include="Microsoft.AspNetCore.Cryptography.KeyDerivation" Version="8.0.10" />
5757
<PackageVersion Include="Microsoft.AspNetCore.Http" Version="2.2.2" />
5858
<PackageVersion Include="Microsoft.Azure.Kusto.Data" Version="12.2.3" />
5959
<PackageVersion Include="Microsoft.Azure.Storage.DataMovement" Version="0.9.0" />
@@ -63,22 +63,22 @@
6363
<PackageVersion Include="Microsoft.Data.Services.Client" Version="5.8.4" />
6464
<PackageVersion Include="Microsoft.Data.Services" Version="5.8.4" />
6565
<PackageVersion Include="Microsoft.Extensions.CommandLineUtils" Version="1.1.1" />
66-
<PackageVersion Include="Microsoft.Extensions.Configuration.Abstractions" Version="2.2.0" />
67-
<PackageVersion Include="Microsoft.Extensions.Configuration.Binder" Version="2.2.0" />
68-
<PackageVersion Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="2.2.0" />
69-
<PackageVersion Include="Microsoft.Extensions.Configuration.FileExtensions" Version="2.2.0" />
70-
<PackageVersion Include="Microsoft.Extensions.Configuration.Json" Version="2.2.0" />
71-
<PackageVersion Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="8.0.0" />
72-
<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="8.0.0" />
73-
<PackageVersion Include="Microsoft.Extensions.Http.Polly" Version="2.2.0" />
74-
<PackageVersion Include="Microsoft.Extensions.Http" Version="2.2.0" />
75-
<PackageVersion Include="Microsoft.Extensions.Logging.Abstractions" Version="2.2.0" />
76-
<PackageVersion Include="Microsoft.Extensions.Logging" Version="2.2.0" />
77-
<PackageVersion Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="2.2.0" />
78-
<PackageVersion Include="Microsoft.Extensions.Options" Version="2.2.0" />
79-
<PackageVersion Include="Microsoft.Extensions.Primitives" Version="2.2.0" />
66+
<PackageVersion Include="Microsoft.Extensions.Configuration.Abstractions" Version="8.0.0" />
67+
<PackageVersion Include="Microsoft.Extensions.Configuration.Binder" Version="8.0.2" />
68+
<PackageVersion Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="8.0.0" />
69+
<PackageVersion Include="Microsoft.Extensions.Configuration.FileExtensions" Version="8.0.1" />
70+
<PackageVersion Include="Microsoft.Extensions.Configuration.Json" Version="8.0.1" />
71+
<PackageVersion Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="8.0.2" />
72+
<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="8.0.1" />
73+
<PackageVersion Include="Microsoft.Extensions.Http.Polly" Version="8.0.8" />
74+
<PackageVersion Include="Microsoft.Extensions.Http" Version="8.0.0" />
75+
<PackageVersion Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.2" />
76+
<PackageVersion Include="Microsoft.Extensions.Logging" Version="8.0.1" />
77+
<PackageVersion Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="8.0.0" />
78+
<PackageVersion Include="Microsoft.Extensions.Options" Version="8.0.2" />
79+
<PackageVersion Include="Microsoft.Extensions.Primitives" Version="8.0.0" />
8080
<PackageVersion Include="Microsoft.Identity.Client" Version="4.65.0" />
81-
<PackageVersion Include="Microsoft.IdentityModel.JsonWebTokens" Version="7.3.1" />
81+
<PackageVersion Include="Microsoft.Identity.Web" Version="3.2.2" />
8282
<PackageVersion Include="Microsoft.Net.Http" Version="2.2.29" />
8383
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.10.0" />
8484
<PackageVersion Include="Microsoft.Owin.Host.SystemWeb" Version="4.2.2" />
@@ -134,7 +134,6 @@
134134
<PackageVersion Include="System.Diagnostics.Debug" Version="4.3.0" />
135135
<PackageVersion Include="System.Drawing.Common" Version="4.7.2" />
136136
<PackageVersion Include="System.Formats.Asn1" Version="8.0.1" />
137-
<PackageVersion Include="System.IdentityModel.Tokens.Jwt" Version="5.7.0" />
138137
<PackageVersion Include="System.Linq.Expressions" Version="4.3.0" />
139138
<PackageVersion Include="System.Net.Http" Version="4.3.4" />
140139
<PackageVersion Include="System.Reflection.Metadata" Version="1.7.0-preview1-26717-04" />

src/AccountDeleter/app.config

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
55
<dependentAssembly>
66
<assemblyIdentity name="Microsoft.Extensions.DependencyInjection" publicKeyToken="adb9793829ddae60" culture="neutral" />
7-
<bindingRedirect oldVersion="0.0.0.0-8.0.0.0" newVersion="8.0.0.0" />
7+
<bindingRedirect oldVersion="0.0.0.0-8.0.0.1" newVersion="8.0.0.1" />
88
</dependentAssembly>
99
</assemblyBinding>
1010
</runtime>
11-
</configuration>
11+
</configuration>

src/NuGet.Services.Storage/AzureStorage.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,11 +332,11 @@ await blob.UploadAsync(
332332
{
333333
using (Stream stream = content.GetContentStream())
334334
{
335-
await blob.SetHttpHeadersAsync(headers);
336335
await blob.UploadAsync(
337336
stream,
338337
options: null,
339338
cancellationToken: cancellationToken);
339+
await blob.SetHttpHeadersAsync(headers);
340340

341341
if (Verbose)
342342
{

src/NuGetCDNRedirect/Web.config

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,10 @@
8989
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30AD4FE6B2A6AEED" culture="neutral"/>
9090
<bindingRedirect oldVersion="0.0.0.0-13.0.0.0" newVersion="13.0.0.0"/>
9191
</dependentAssembly>
92+
<dependentAssembly>
93+
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31BF3856AD364E35" culture="neutral"/>
94+
<bindingRedirect oldVersion="0.0.0.0-5.2.9.0" newVersion="5.2.9.0"/>
95+
</dependentAssembly>
9296
</assemblyBinding>
9397
</runtime>
94-
</configuration>
98+
</configuration>

src/NuGetGallery.Services/NuGetGallery.Services.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,12 @@
4242

4343
<ItemGroup>
4444
<PackageReference Include="Microsoft.ApplicationInsights" />
45+
<PackageReference Include="Microsoft.Identity.Web" />
4546
</ItemGroup>
4647

4748
<ItemGroup Condition="'$(TargetFramework)' == 'net472'">
4849
<PackageReference Include="Microsoft.AspNet.Mvc" />
4950
<PackageReference Include="Microsoft.AspNetCore.Cryptography.KeyDerivation" />
50-
<PackageReference Include="Microsoft.IdentityModel.JsonWebTokens" />
5151
<PackageReference Include="Microsoft.Owin" />
5252
<PackageReference Include="Microsoft.Owin.Host.SystemWeb" />
5353
<PackageReference Include="Microsoft.Owin.Security" />

src/NuGetGallery.Services/Providers/RuntimeServiceProvider.cs

Lines changed: 39 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
1-
// Copyright (c) .NET Foundation. All rights reserved.
1+
// Copyright (c) .NET Foundation. All rights reserved.
22
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
33

44
using System;
55
using System.Collections.Generic;
66
using System.ComponentModel.Composition;
77
using System.ComponentModel.Composition.Hosting;
8+
using System.Diagnostics;
89
using System.IO;
910
using System.Linq;
11+
using System.Reflection;
1012

1113
namespace NuGetGallery
1214
{
@@ -69,7 +71,41 @@ public IEnumerable<T> GetExportedValues<T>()
6971
throw new ObjectDisposedException(nameof(RuntimeServiceProvider));
7072
}
7173

72-
return _compositionContainer.GetExportedValues<T>();
74+
try
75+
{
76+
return _compositionContainer.GetExportedValues<T>();
77+
}
78+
catch (Exception ex)
79+
{
80+
try
81+
{
82+
var tracePrefix = $"Error in {nameof(RuntimeServiceProvider)}.{nameof(GetExportedValues)}<{typeof(T).Name}>().";
83+
84+
// We use Trace instead of the ILogger or TelemetryClient because they may be unavailable at this point.
85+
Trace.TraceError("{0} Failed with {1}:{2}{3}", tracePrefix, ex.GetType().Name, Environment.NewLine, ex);
86+
var currentEx = ex;
87+
var loaderExceptionCount = 0;
88+
while (currentEx is not null)
89+
{
90+
if (ex is ReflectionTypeLoadException rex)
91+
{
92+
foreach (var loaderException in rex.LoaderExceptions)
93+
{
94+
loaderExceptionCount++;
95+
Trace.TraceError("{0} Loader exception {1}:{2}{3}", tracePrefix, loaderExceptionCount, Environment.NewLine, loaderException);
96+
}
97+
}
98+
99+
currentEx = currentEx.InnerException;
100+
}
101+
}
102+
catch
103+
{
104+
// best effort
105+
}
106+
107+
throw;
108+
}
73109
}
74110

75111
// Runtime loadable services are only allowed from subdirectories of the base directory path.
@@ -97,4 +133,4 @@ private static CompositionContainer CreateCompositionContainer(string baseDirect
97133
return new CompositionContainer(catalog);
98134
}
99135
}
100-
}
136+
}

src/NuGetGallery/App_Start/DefaultDependenciesModule.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,7 @@ protected override void Load(ContainerBuilder builder)
381381
builder.RegisterType<MarkdownService>()
382382
.As<IMarkdownService>()
383383
.InstancePerLifetimeScope();
384-
384+
385385
builder.RegisterType<ImageDomainValidator>()
386386
.As<IImageDomainValidator>()
387387
.InstancePerLifetimeScope();
@@ -405,7 +405,7 @@ protected override void Load(ContainerBuilder builder)
405405
.AsSelf()
406406
.As<ICertificateService>()
407407
.InstancePerLifetimeScope();
408-
408+
409409
RegisterTyposquattingServiceHelper(builder, loggerFactory);
410410

411411
builder.RegisterType<TyposquattingService>()
@@ -812,7 +812,7 @@ private static void RegisterSwitchingDeleteAccountService(ContainerBuilder build
812812
.Register(c => new TopicClientWrapper(asyncAccountDeleteConnectionString, asyncAccountDeleteTopicName, configuration.ServiceBus.ManagedIdentityClientId))
813813
.SingleInstance()
814814
.Keyed<ITopicClient>(BindingKeys.AccountDeleterTopic)
815-
.OnRelease(x => x.CloseAsync());
815+
.OnRelease(x => _ = x.CloseAsync());
816816

817817
builder
818818
.RegisterType<AsynchronousDeleteAccountService>()
@@ -948,7 +948,7 @@ private static void RegisterAsynchronousEmailMessagingService(ContainerBuilder b
948948
.As<ITopicClient>()
949949
.SingleInstance()
950950
.Keyed<ITopicClient>(BindingKeys.EmailPublisherTopic)
951-
.OnRelease(x => x.CloseAsync());
951+
.OnRelease(x => _ = x.CloseAsync());
952952

953953
builder
954954
.RegisterType<EmailMessageEnqueuer>()
@@ -1103,14 +1103,14 @@ private void RegisterAsynchronousValidation(
11031103
.As<ITopicClient>()
11041104
.SingleInstance()
11051105
.Keyed<ITopicClient>(BindingKeys.PackageValidationTopic)
1106-
.OnRelease(x => x.CloseAsync());
1106+
.OnRelease(x => _ = x.CloseAsync());
11071107

11081108
builder
11091109
.Register(c => new TopicClientWrapper(symbolsValidationConnectionString, symbolsValidationTopicName, configuration.ServiceBus.ManagedIdentityClientId))
11101110
.As<ITopicClient>()
11111111
.SingleInstance()
11121112
.Keyed<ITopicClient>(BindingKeys.SymbolsPackageValidationTopic)
1113-
.OnRelease(x => x.CloseAsync());
1113+
.OnRelease(x => _ = x.CloseAsync());
11141114
}
11151115
else
11161116
{

src/NuGetGallery/NuGetGallery.csproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2239,7 +2239,6 @@
22392239
<PackageReference Include="Strathweb.CacheOutput.WebApi2.StrongName" />
22402240
<PackageReference Include="System.Data.SqlClient" />
22412241
<PackageReference Include="System.Diagnostics.Debug" />
2242-
<PackageReference Include="System.IdentityModel.Tokens.Jwt" />
22432242
<PackageReference Include="System.Linq.Expressions" />
22442243
<PackageReference Include="System.Net.Http" />
22452244
<PackageReference Include="System.Text.Json" />

0 commit comments

Comments
 (0)