On our project we updated solution from .Net 6.0 to .Net 8.0. Everything went smooth. Now I wanted to generate a client for our application. Before we used NSwagStudio 13.20.0.0 tool for such generation - I build the project and selected it through .NET Assembly option in NSwagStudio.
Now I see on official NSwag site that .Net 8.0 support was added in NSwagStudio 14.0.0-preview8 version, so I updated it. And now I see that there is no .NET Assembly option anymore.
And when I try to open old nswag config file, I get error
Error text:
Error setting value to 'SelectedSwaggerGeneratorRaw' on 'NSwag.Commands.NSwagDocument'.
Newtonsoft.Json.JsonSerializationException: Error setting value to 'SelectedSwaggerGeneratorRaw' on 'NSwag.Commands.NSwagDocument'. ---> System.NullReferenceException NSwag.Commands.NSwagDocumentBase.set_SelectedSwaggerGeneratorRaw(JObject value)
в Newtonsoft.Json.Serialization.DynamicValueProvider.SetValue(Object target, Object value)
If I try to generate client via console command, I get another error
Error text:
System.InvalidOperationException: The command 'run c:/git/workplacer/mapeditor/mapeditor.integrationtests/client/nswag.json /runtime:net80' could not be found.
в NConsole.CommandLineProcessor.<ProcessSingleAsync>d__12.MoveNext()
So I am kinda blocked and don't know what to do, other than just wait for official 14.0 version release. Does anyone know how to fix this issue? Thanks in advance.
See this discussion https://github.com/RicoSuter/NSwag/issues/4524
v14 is not supporting an assembly anymore
besides, .NET8 runtime (CLI) will be fixed in 14.0.1