-
Notifications
You must be signed in to change notification settings - Fork 36
Unable to use swagger open api #47
Comments
I am getting the same error. |
@SteveSandersonMS Is there any suggestion that you can provide on this |
Perhaps that assembly is loaded dynamically instead of being a proper assembly reference. I'm not sure. One thing you could try is referencing it directly. If that doesn't work I'd recommend working with the owners of that package to make sense of what it's doing to load it that isn't just a normal assembly reference. |
Thanks. It is referenced directly. The project was created with dotnet new webapi --use-program-main. I made the changes to use wasi and this is the error I get. It does work if I use dotnet new web --use-program-main. |
Thanks for the extra info. I'm unsure why it's not working, though suspect it's something specific to how MVC is trying to load that assembly via reflection (based on your stack trace). Since we're now switching over to the WASI support in .NET 8 Preview 4 and later, I'd recommend for any further prototyping you attempt to use that (i.e., the new |
Got it. I will test with .net 8 preview latest. Thanks. |
@SteveSandersonMS ,
I tried to use basic minimal api as a wasm. I had enabled swagger. But unfortunately, it is failing with the below error
The sample code is attached herewith.
wasm.api.csproj.zip
Could you please help?
The text was updated successfully, but these errors were encountered: