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

NJsonSchema 10.0.1 not compability with NSwag 12.3.0 #974

Closed
lukapor opened this issue May 21, 2019 · 9 comments
Closed

NJsonSchema 10.0.1 not compability with NSwag 12.3.0 #974

lukapor opened this issue May 21, 2019 · 9 comments

Comments

@lukapor
Copy link

lukapor commented May 21, 2019

I updated asp net core web application with new NSwag.AspNetCore, NSwag.MSBuild to version 12.3.0 and NJsonSchema to 10.0.1.

I got error when web server started. Here is stack trace
Unhandled Exception: System.TypeLoadException: Could not load type 'NJsonSchema.ReferenceTypeNullHandling' from assembly 'NJsonSchema, Version=10.0.1.0, Culture=neutral, PublicKeyToken=c2f9c3bdfae56102'.
at LoopWebApi.Startup.ConfigureServices(IServiceCollection services)
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.AspNetCore.Hosting.ConventionBasedStartup.ConfigureServices(IServiceCollection services)
at Microsoft.AspNetCore.Hosting.Internal.WebHost.EnsureApplicationServices()
at Microsoft.AspNetCore.Hosting.Internal.WebHost.Initialize()
at Microsoft.AspNetCore.Hosting.WebHostBuilder.Build()
at Shared.WebServiceHelper.WebServiceHelper.GetHost[Startup](String pathToContentRoot, IConfiguration configuration) in C:\Marg\4O_Backend\src\Lib.Shared\WebServiceHelper\WebServiceHelper.cs:line 154
at LoopWebApi.Program.Main(String[] args) in C:\Marg\4O_Backend\src\apps\LoopWebApi\Program.cs:line 32
Services initialized.

I revert NJsonSchema to version 9.14.1, now works.

@RicoSuter
Copy link
Owner

Yep v10.0.1 will be used in v13 which is released soon

@OpusKrokus
Copy link

Hi @RicoSuter,
You mentioned that it will be released "soon". Do you have a rough timeline? If it is very long at all, have you considered publishing a prerelease?

@RicoSuter
Copy link
Owner

Next days... i wonder if i should do the big rename in this release (Swagger* => OpenApi* classes)

@RicoSuter
Copy link
Owner

RicoSuter commented May 23, 2019

I've setup a preview nuget feed for NSwag: https://www.myget.org/feed/Packages/nswag
But because v13 is still in a PR (RicoSuter/NSwag#2178) it is not available as preview yet - but will merge tomorrow then you'll have at least a preview for now...

@OpusKrokus
Copy link

Next days... i wonder if i should do the big rename in this release (Swagger* => OpenApi* classes)

My personal opinion is that it would be a good idea to make that change since there is a major version number change with it.

Because of the nature of the error thrown, I thought there were some hidden dependencies and was trying DLL redirects and such. It ended up costing about half a day. Whether you make the change or not, I would also recommend updating the current NJasonSchema package (10.#) with a dependency on NSwag >= v13. Maybe also put a note on the project page. It would save people some grief.

@OpusKrokus
Copy link

I've setup a preview nuget feed for NSwag: https://www.myget.org/feed/Packages/nswag
But because v13 is still in a PR (RicoSuter/NSwag#2178) it is not available as preview yet - but will merge tomorrow then you'll have at least a preview for now...

Thanks so much! I really appreciate this software and I know it takes a lot of work to keep things going. I was introduced to Swashbuckler, but switched to NSwag as soon as I found out about it and never looked back.

@RicoSuter
Copy link
Owner

I would also recommend updating the current NJasonSchema package (10.#) with a dependency on NSwag >= v13.

What do you mean by that? NJsonSchema and NSwag are developed in tandem and NSwag v13 will be breaking also because of the upgrade to NJS v10 :-)

@RicoSuter
Copy link
Owner

NSwag v13 preview should be available soon.

@RicoSuter
Copy link
Owner

v13 is now available in the preview stream

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

3 participants