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

Error running nswag for http client generation in C# #5097

Open
rene-titulaer opened this issue Jan 27, 2025 · 0 comments
Open

Error running nswag for http client generation in C# #5097

rene-titulaer opened this issue Jan 27, 2025 · 0 comments

Comments

@rene-titulaer
Copy link

rene-titulaer commented Jan 27, 2025

Describe the bug

I run this command:
dotnet "C:\Users\XXX.nuget\packages\nswag.msbuild\14.0.7\buildTransitive../tools/Net80/dotnet-nswag.dll" run nswag.json /variables:Configuration=IncludeClient

Error:
---> System.InvalidOperationException: NSwag requires the assembly XXX.Api, Version=XXX, Culture=neutral, PublicKeyToken=null to have either an BuildWebHost or CreateWebHostBuilder/CreateHostBuilder method

Version used

14.0.7

To Reproduce

It only fails on the build server

Expected behavior

Generated client

Additional context

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant