After upgrading to dotnet core 3 I get a build error
GenerateOpenApiDocuments:
dotnet "C:\Users\joakim.lindqvist\.nuget\packages\microsoft.extensions.apidescription.server\0.3.0-preview7.19365.7\build\/../tools/dotnet-getdocument.dll" --assembly "foo.dll" --file-list "obj\foo.OpenApiFiles.cache" --framework ".NETCoreApp,Version=v3.0" --output "obj" --project "Foo" --assets-file "...\obj\project.assets.json" --platform "AnyCPU"
2>Assembly 'foo.dll' does not contain an entry point.
This assembly is a class library and as such can not define an entrypoint (and a error is produced if I try to ad it), but it contains code shared between multiple aspnet web api projects (all of whom generate swagger documentation).
While this GenerateOpenApiDocuments step fails, my assembly generates just fine so if I do another build the up to date check determine there is no work to do and my build succeeds.
I did not see this issue using dotnet core 3 preview 7.
Steps to reproduce the behavior:
Project Sdk="Microsoft.NET.Sdk.Web">
No build errors.
I confirm this error occurs whenever you add Swashbuckle.AspnetCore to a class project.
I had the same problem also. A quick fix for the build is to not generate the openApi documents. Add this to your project's propertyGroup (in the .csproj):
<OpenApiGenerateDocuments>false</OpenApiGenerateDocuments>
Most helpful comment
I had the same problem also. A quick fix for the build is to not generate the openApi documents. Add this to your project's propertyGroup (in the .csproj):