Skip to content

Commit f3fb4bf

Browse files
[feature/10.0] Update dependencies from dotnet/sdk (#8125)
* Update dependencies from https://github.com/dotnet/sdk build 20250417.28 VS.Redist.Common.NetCore.SdkPlaceholder.x64.10.0 From Version 10.0.100-preview.4.25216.30 -> To Version 10.0.100-preview.4.25217.28 Dependency coherency updates Microsoft.AspNetCore.App.Runtime.win-x64,Microsoft.NETCore.App.Runtime.win-x64,VS.Redist.Common.AspNetCore.SharedFramework.x64.10.0,VS.Redist.Common.NetCore.SharedFramework.x64.10.0 From Version 10.0.0-preview.4.25215.10 -> To Version 10.0.0-preview.4.25216.9 (parent: VS.Redist.Common.NetCore.SdkPlaceholder.x64.10.0 * Update dependencies from https://github.com/dotnet/sdk build 20250418.11 VS.Redist.Common.NetCore.SdkPlaceholder.x64.10.0 From Version 10.0.100-preview.4.25216.30 -> To Version 10.0.100-preview.4.25218.11 Dependency coherency updates Microsoft.AspNetCore.App.Runtime.win-x64,Microsoft.NETCore.App.Runtime.win-x64,VS.Redist.Common.AspNetCore.SharedFramework.x64.10.0,VS.Redist.Common.NetCore.SharedFramework.x64.10.0 From Version 10.0.0-preview.4.25215.10 -> To Version 10.0.0-preview.4.25217.3 (parent: VS.Redist.Common.NetCore.SdkPlaceholder.x64.10.0 * Update dependencies from https://github.com/dotnet/sdk build 20250419.3 VS.Redist.Common.NetCore.SdkPlaceholder.x64.10.0 From Version 10.0.100-preview.4.25216.30 -> To Version 10.0.100-preview.4.25219.3 * Update dependencies from https://github.com/dotnet/sdk build 20250420.1 VS.Redist.Common.NetCore.SdkPlaceholder.x64.10.0 From Version 10.0.100-preview.4.25216.30 -> To Version 10.0.100-preview.4.25220.1 Dependency coherency updates Microsoft.AspNetCore.App.Runtime.win-x64,VS.Redist.Common.AspNetCore.SharedFramework.x64.10.0 From Version 10.0.0-preview.4.25215.10 -> To Version 10.0.0-preview.4.25218.4 (parent: VS.Redist.Common.NetCore.SdkPlaceholder.x64.10.0 * Use IOpenApiDocumentProvider keyed service --------- Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com> Co-authored-by: Justin Anderson <[email protected]>
1 parent f1f2cb9 commit f3fb4bf

File tree

3 files changed

+18
-33
lines changed

3 files changed

+18
-33
lines changed

eng/Version.Details.xml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<Dependencies>
22
<ProductDependencies>
3-
<Dependency Name="Microsoft.AspNetCore.App.Runtime.win-x64" Version="10.0.0-preview.4.25215.10" CoherentParentDependency="VS.Redist.Common.NetCore.SdkPlaceholder.x64.10.0">
3+
<Dependency Name="Microsoft.AspNetCore.App.Runtime.win-x64" Version="10.0.0-preview.4.25218.4" CoherentParentDependency="VS.Redist.Common.NetCore.SdkPlaceholder.x64.10.0">
44
<Uri>https://github.com/dotnet/aspnetcore</Uri>
5-
<Sha>a94ba4b6c94e09433b586db219bd854e70021e5a</Sha>
5+
<Sha>efe40be07df5055d0d52810899349612e88c89a3</Sha>
66
</Dependency>
77
<Dependency Name="Microsoft.Diagnostics.Monitoring" Version="9.0.0-preview.25220.1">
88
<Uri>https://github.com/dotnet/diagnostics</Uri>
@@ -46,21 +46,21 @@
4646
<Uri>https://github.com/dotnet/diagnostics</Uri>
4747
<Sha>22431fb5bfe047454e652a7274f4b4bc4b367527</Sha>
4848
</Dependency>
49-
<Dependency Name="Microsoft.NETCore.App.Runtime.win-x64" Version="10.0.0-preview.4.25215.12" CoherentParentDependency="VS.Redist.Common.NetCore.SdkPlaceholder.x64.10.0">
49+
<Dependency Name="Microsoft.NETCore.App.Runtime.win-x64" Version="10.0.0-preview.4.25217.10" CoherentParentDependency="VS.Redist.Common.NetCore.SdkPlaceholder.x64.10.0">
5050
<Uri>https://github.com/dotnet/runtime</Uri>
51-
<Sha>d06c2f6ec8228addc77cb7b7856c3fe07c3d1f02</Sha>
51+
<Sha>e1702c393a1ef71b211f51d00beedec0151c9f25</Sha>
5252
</Dependency>
53-
<Dependency Name="VS.Redist.Common.AspNetCore.SharedFramework.x64.10.0" Version="10.0.0-preview.4.25215.10" CoherentParentDependency="VS.Redist.Common.NetCore.SdkPlaceholder.x64.10.0">
53+
<Dependency Name="VS.Redist.Common.AspNetCore.SharedFramework.x64.10.0" Version="10.0.0-preview.4.25218.4" CoherentParentDependency="VS.Redist.Common.NetCore.SdkPlaceholder.x64.10.0">
5454
<Uri>https://github.com/dotnet/aspnetcore</Uri>
55-
<Sha>a94ba4b6c94e09433b586db219bd854e70021e5a</Sha>
55+
<Sha>efe40be07df5055d0d52810899349612e88c89a3</Sha>
5656
</Dependency>
57-
<Dependency Name="VS.Redist.Common.NetCore.SdkPlaceholder.x64.10.0" Version="10.0.100-preview.4.25216.30">
57+
<Dependency Name="VS.Redist.Common.NetCore.SdkPlaceholder.x64.10.0" Version="10.0.100-preview.4.25220.1">
5858
<Uri>https://github.com/dotnet/sdk</Uri>
59-
<Sha>e34f97525c55801ff129ad8236aaa4b5638eb4a9</Sha>
59+
<Sha>f4de547215d995985f21f195b29909d8569bcf46</Sha>
6060
</Dependency>
61-
<Dependency Name="VS.Redist.Common.NetCore.SharedFramework.x64.10.0" Version="10.0.0-preview.4.25215.12" CoherentParentDependency="VS.Redist.Common.NetCore.SdkPlaceholder.x64.10.0">
61+
<Dependency Name="VS.Redist.Common.NetCore.SharedFramework.x64.10.0" Version="10.0.0-preview.4.25217.10" CoherentParentDependency="VS.Redist.Common.NetCore.SdkPlaceholder.x64.10.0">
6262
<Uri>https://github.com/dotnet/runtime</Uri>
63-
<Sha>d06c2f6ec8228addc77cb7b7856c3fe07c3d1f02</Sha>
63+
<Sha>e1702c393a1ef71b211f51d00beedec0151c9f25</Sha>
6464
</Dependency>
6565
</ToolsetDependencies>
6666
</Dependencies>

eng/Versions.props

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@
5252
<MicrosoftDotNetCodeAnalysisVersion>10.0.0-beta.25217.1</MicrosoftDotNetCodeAnalysisVersion>
5353
<MicrosoftDotNetXUnitExtensionsVersion>10.0.0-beta.25217.1</MicrosoftDotNetXUnitExtensionsVersion>
5454
<!-- dotnet/aspnetcore references -->
55-
<MicrosoftAspNetCoreAppRuntimewinx64Version>10.0.0-preview.4.25215.10</MicrosoftAspNetCoreAppRuntimewinx64Version>
56-
<VSRedistCommonAspNetCoreSharedFrameworkx64100Version>10.0.0-preview.4.25215.10</VSRedistCommonAspNetCoreSharedFrameworkx64100Version>
55+
<MicrosoftAspNetCoreAppRuntimewinx64Version>10.0.0-preview.4.25218.4</MicrosoftAspNetCoreAppRuntimewinx64Version>
56+
<VSRedistCommonAspNetCoreSharedFrameworkx64100Version>10.0.0-preview.4.25218.4</VSRedistCommonAspNetCoreSharedFrameworkx64100Version>
5757
<!-- dotnet/command-line-api references -->
5858
<SystemCommandLineVersion>2.0.0-beta5.25218.1</SystemCommandLineVersion>
5959
<!-- dotnet/diagnostics references -->
@@ -62,10 +62,10 @@
6262
<!-- dotnet/roslyn-analyzers -->
6363
<MicrosoftCodeAnalysisNetAnalyzersVersion>9.0.0-preview.25076.3</MicrosoftCodeAnalysisNetAnalyzersVersion>
6464
<!-- dotnet/runtime references -->
65-
<MicrosoftNETCoreAppRuntimewinx64Version>10.0.0-preview.4.25215.12</MicrosoftNETCoreAppRuntimewinx64Version>
66-
<VSRedistCommonNetCoreSharedFrameworkx64100Version>10.0.0-preview.4.25215.12</VSRedistCommonNetCoreSharedFrameworkx64100Version>
65+
<MicrosoftNETCoreAppRuntimewinx64Version>10.0.0-preview.4.25217.10</MicrosoftNETCoreAppRuntimewinx64Version>
66+
<VSRedistCommonNetCoreSharedFrameworkx64100Version>10.0.0-preview.4.25217.10</VSRedistCommonNetCoreSharedFrameworkx64100Version>
6767
<!-- dotnet/sdk references -->
68-
<VSRedistCommonNetCoreSdkPlaceholderx64100Version>10.0.100-preview.4.25216.30</VSRedistCommonNetCoreSdkPlaceholderx64100Version>
68+
<VSRedistCommonNetCoreSdkPlaceholderx64100Version>10.0.100-preview.4.25220.1</VSRedistCommonNetCoreSdkPlaceholderx64100Version>
6969
<!-- dotnet/symstore references -->
7070
<MicrosoftFileFormatsVersion>1.0.622001</MicrosoftFileFormatsVersion>
7171
</PropertyGroup>

src/Tests/Microsoft.Diagnostics.Monitoring.OpenApiGen/Program.cs

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
using Microsoft.AspNetCore.Builder;
55
using Microsoft.AspNetCore.Hosting;
6+
using Microsoft.AspNetCore.OpenApi;
67
using Microsoft.Diagnostics.Monitoring.WebApi;
78
using Microsoft.Diagnostics.Tools.Monitor;
89
using Microsoft.Diagnostics.Tools.Monitor.Auth;
@@ -15,7 +16,6 @@
1516
using Microsoft.OpenApi.Writers;
1617
using System;
1718
using System.IO;
18-
using System.Reflection;
1919
using System.Threading;
2020
using System.Threading.Tasks;
2121

@@ -61,29 +61,14 @@ private static async Task Main(string[] args)
6161
var corsOptions = host.Services.GetRequiredService<IOptions<CorsConfigurationOptions>>();
6262
Startup.Configure(appBuilder, env, corsOptions);
6363

64-
var openApiDocument = await GetOpenApiDocument(host);
64+
IOpenApiDocumentProvider documentProvider = host.Services.GetRequiredKeyedService<IOpenApiDocumentProvider>("v1");
65+
OpenApiDocument openApiDocument = await documentProvider.GetOpenApiDocumentAsync(CancellationToken.None);
6566

6667
// Serialize the OpenApi document
6768
using FileStream stream = File.Create(outputPath);
6869
using StreamWriter writer = new(stream);
6970
var openApiWriter = new OpenApiJsonWriter(writer);
7071
openApiDocument.SerializeAsV3(openApiWriter);
7172
}
72-
73-
private static object GetDocumentService(IServiceProvider serviceProvider)
74-
{
75-
var serviceType = Type.GetType("Microsoft.AspNetCore.OpenApi.OpenApiDocumentService, Microsoft.AspNetCore.OpenApi", throwOnError: true)!;
76-
return serviceProvider.GetRequiredKeyedService(serviceType, "v1")!;
77-
}
78-
79-
private static async Task<OpenApiDocument> GetOpenApiDocument(IHost host)
80-
{
81-
var documentService = GetDocumentService(host.Services);
82-
var methodInfo = documentService.GetType().GetMethod("GetOpenApiDocumentAsync", BindingFlags.Public | BindingFlags.Instance)!;
83-
84-
object result = methodInfo.Invoke(documentService, new object?[] { host.Services, null, default(CancellationToken) })!;
85-
86-
return await (Task<OpenApiDocument>)result;
87-
}
8873
}
8974
}

0 commit comments

Comments
 (0)