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

OpenApi document generation is broken #60026

Closed
1 task done
eerhardt opened this issue Jan 24, 2025 · 0 comments · Fixed by #60055
Closed
1 task done

OpenApi document generation is broken #60026

eerhardt opened this issue Jan 24, 2025 · 0 comments · Fixed by #60055
Assignees
Labels
area-minimal Includes minimal APIs, endpoint filters, parameter binding, request delegate generator etc feature-openapi
Milestone

Comments

@eerhardt
Copy link
Member

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

When publishing the TodosApi benchmark in https://github.com/aspnet/Benchmarks/tree/main/src/BenchmarksApps/TodosApi I'm getting the following build error:

❯ \git\aspnetcore\.dotnet\dotnet.exe publish TodosApi.csproj -c Release --disable-build-servers /p:MicrosoftNETCoreAppPackageVersion=10.0.0-alpha.1.25072.13 /p:MicrosoftAspNetCoreAppPackageVersion=10.0.0-alpha.2.25073.4 /p:GenerateErrorForMissingTargetingPacks=false /p:RestoreNoCache=true /p:MicrosoftWindowsDesktopAppPackageVersion=10.0.0-alpha.1.25073.1 /p:MicrosoftNETPlatformLibrary=Microsoft.NETCore.App /p:PublishAot=false /p:EnableRequestDelegateGenerator=false --framework net10.0 --self-contained -r win-x64 /bl
You are using a preview version of .NET. See: https://aka.ms/dotnet-support-policy
  TodosApi net10.0 failed with 2 error(s) (0.6s) → bin\Release\net10.0\win-x64\TodosApi.dll
    D:\packages\NuGet\cache\microsoft.extensions.apidescription.server\10.0.0-alpha.2.25073.4\build\Microsoft.Extensions.ApiDescription.Server.targets(68,5): error : Could not execute because the specified command or file was not found.
    D:\packages\NuGet\cache\microsoft.extensions.apidescription.server\10.0.0-alpha.2.25073.4\build\Microsoft.Extensions.ApiDescription.Server.targets(68,5): error MSB3073: The command "dotnet "D:\packages\NuGet\cache\microsoft.extensions.apidescription.server\10.0.0-alpha.2.25073.4\build\../tools/dotnet-getdocument.dll" --assembly "D:\git\Benchmarks\src\BenchmarksApps\TodosApi\bin\Release\net10.0\win-x64\TodosApi.dll" --file-list "obj\TodosApi.OpenApiFiles.cache" --framework ".NETCoreApp,Version=v10.0" --output "D:\git\Benchmarks\src\BenchmarksApps\TodosApi" --project "TodosApi" --assets-file "D:\git\Benchmarks\src\BenchmarksApps\TodosApi\obj\project.assets.json" --platform "x64" --runtime "win-x64 --self-contained" " exited with code 1.

The problem appears to be that the dotnet-getdocument.dll file is not found in the microsoft.extensions.apidescription.server nuget package under tools directory. This may have been caused by d4880ed.

cc @captainsafia

Expected Behavior

The TodosApi project should publish successfully.

Steps To Reproduce

  1. Clone and cd into https://github.com/aspnet/Benchmarks/tree/main/src/BenchmarksApps/TodosApi
  2. Change the TargetFramework of the project to net10.0
  3. Get the latest .NET 10 SDK daily build
  4. Run the following command:
dotnet.exe publish TodosApi.csproj -c Release --disable-build-servers /p:MicrosoftNETCoreAppPackageVersion=10.0.0-alpha.1.25072.13 /p:MicrosoftAspNetCoreAppPackageVersion=10.0.0-alpha.2.25073.4 /p:GenerateErrorForMissingTargetingPacks=false /p:RestoreNoCache=true /p:MicrosoftWindowsDesktopAppPackageVersion=10.0.0-alpha.1.25073.1 /p:MicrosoftNETPlatformLibrary=Microsoft.NETCore.App /p:PublishAot=false /p:EnableRequestDelegateGenerator=false --framework net10.0 --self-contained -r win-x64 /bl

Exceptions (if any)

No response

.NET Version

No response

Anything else?

Here is a binlog of the build error:

msbuild.binlog.zip

@dotnet-issue-labeler dotnet-issue-labeler bot added the area-infrastructure Includes: MSBuild projects/targets, build scripts, CI, Installers and shared framework label Jan 24, 2025
@captainsafia captainsafia self-assigned this Jan 24, 2025
@captainsafia captainsafia added this to the 10.0-preview1 milestone Jan 24, 2025
@eerhardt eerhardt added feature-openapi area-minimal Includes minimal APIs, endpoint filters, parameter binding, request delegate generator etc and removed NativeAOT area-infrastructure Includes: MSBuild projects/targets, build scripts, CI, Installers and shared framework labels Jan 24, 2025
eerhardt added a commit to eerhardt/Benchmarks that referenced this issue Jan 24, 2025
eerhardt added a commit to eerhardt/Benchmarks that referenced this issue Jan 25, 2025
eerhardt added a commit to aspnet/Benchmarks that referenced this issue Jan 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-minimal Includes minimal APIs, endpoint filters, parameter binding, request delegate generator etc feature-openapi
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants