Can't build netcoreapp2.2 project with 5.0.0-rc3
See original GitHub issueFeel free to check out my travis output.
dotnet “/home/travis/.nuget/packages/microsoft.extensions.apidescription.server/0.3.0-preview7.19365.7/build//…/tools/dotnet-getdocument.dll” --assembly “/home/travis/build/JustArchiNET/ArchiSteamFarm/ArchiSteamFarm/out/source/ArchiSteamFarm.dll” --file-list “obj/ArchiSteamFarm.OpenApiFiles.cache” --framework “.NETCoreApp,Version=v2.2” --output “obj” --project “ArchiSteamFarm” --assets-file “/home/travis/build/JustArchiNET/ArchiSteamFarm/ArchiSteamFarm/obj/project.assets.json” --platform “AnyCPU” No method ‘BuildWebHost’, ‘CreateHostBuilder’ or ‘CreateWebHostBuilder’ found in type ‘ArchiSteamFarm.Program’ with expected signatures.
I have a rather specific project in which I use kestrel and MVC with your library, but it’s not asp.net core project. Therefore I don’t have any generic host builders, but rather I create and start kestrel on as-needed basis.
I’m not sure what I’m supposed to do here. Of course everything worked fine with rc2, but I feel like this can be a blocker for me once 5.0.0 is released, and I don’t want to miss out on the opportunity of using your awesome library. I’m not sure what is the apidescription step here (the core program builds fine, this is post-compilation step) and whether it can be ignored/fixed on your side, or perhaps we need to forward to the upstream, I believe you know better in this regard and will make the right call. From my side, the error mentioned in this issue is the direct result of upgrading to rc3, so I’m reporting to you.
Thank you in advance for looking into my issue. Feel free to use the project referenced by me above for reproducing the problem.
Update
Hey, thank you all for your responses.
I can confirm that <OpenApiGenerateDocuments>false</OpenApiGenerateDocuments>
has solved the issue for me with no visible drawbacks, thank you a lot for that workaround.
In regards to me, I consider this issue resolved and it can be closed, but I’ll keep it open in case @domaindrivendev would want it to stay to help people with similar issues. If by any chance you decide it’s no longer relevant/needed, feel free to close it anytime you wish.
Thanks again for your help.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:16
- Comments:8 (6 by maintainers)
The above looks like a bug in ASP.NET Core 3.0, which I’ve reported here: https://github.com/aspnet/AspNetCore/issues/14232
The macOS build failure can be fixed by setting the following MSBuild property:
I can confirm I have a similar build issue from when I upgraded from
rc2
torc3
. Any projects that targetednetcoreapp2.2
would get the following build error (net48
works fine):I tried bumping both the net core sdk from
2.2.402
to3.0.100
andmicrosoft.extensions.apidescription.server
from0.3.0-preview7.19365.7
to both3.0.0-rc1.19457.4
and3.0.0
but with no luck.Only solution that worked was by setting the property as above: