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

.Net 6 support. #3627

Closed
YvonneArnoldus opened this issue Sep 14, 2021 · 18 comments
Closed

.Net 6 support. #3627

YvonneArnoldus opened this issue Sep 14, 2021 · 18 comments

Comments

@YvonneArnoldus
Copy link

I can run the project in VS 2022 just fine and everything works.

Except when I tried to build for my release with:

dotnet publish C:\project.csproj --runtime win-x64 --configuration Release --self-contained false

I get the flowing error:

``
error NU1605: error NU1605: Detected package downgrade: System.IO.FileSystem.Primitives from 4.3.0 to 4.0.1. Reference the package directly from the project to select a different version.

From:
NSwag.Generation 13.13.2 -> Newtonsoft.Json 9.0.1 -> System.Xml.ReaderWriter 4.0.11 -> System.IO.FileSystem 4.0.1 -> runtime.win.System.IO.FileSystem 4.3.0 -> System.IO.FileSystem.Primitives (>= 4.3.0)
NSwag.Generation 13.13.2 -> Newtonsoft.Json 9.0.1 -> System.Xml.ReaderWriter 4.0.11 -> System.IO.FileSystem.Primitives (>= 4.0.1)

error NU1605: Detected package downgrade: System.Text.Encoding.Extensions from 4.3.0 to 4.0.11.

From:
NSwag.Generation 13.13.2 -> Newtonsoft.Json 9.0.1 -> System.Xml.ReaderWriter 4.0.11 -> System.IO.FileSystem 4.0.1 -> runtime.win.System.IO.FileSystem 4.3.0 -> System.Text.Encoding.Extensions (>= 4.3.0)
NSwag.Generation 13.13.2 -> Newtonsoft.Json 9.0.1 -> System.Text.Encoding.Extensions (>= 4.0.11)
``

Will this be resolved by the time .Net 6 is released or should I not use NSwag in .Net 6

@Simonl9l
Copy link

Are there plans to support Minimal API (as swagger does)
https://dotnetthoughts.net/openapi-support-for-aspnetcore-minimal-webapi/

@RicoSuter
Copy link
Owner

Working on .NET 6 support (PR open) and minimal APIs... hopefully i can release a new version in the next days.

@marinasundstrom
Copy link

marinasundstrom commented Nov 15, 2021

When will this be ready?

The WithName and WithTags etc is not working in the latest package. Does not affect the schema.

app.MapGet("/person", () => {
    return new Person("Scott", 42);
})
.WithName("GetPerson")
.WithTags("Person");

@RicoSuter
Copy link
Owner

RicoSuter commented Nov 16, 2021

@RobertSundstrom Couldnt find the WithTags extension method (?)

@RicoSuter
Copy link
Owner

RicoSuter commented Nov 16, 2021

Support for .NET 6 and minimal API is released btw.

@marinasundstrom
Copy link

@RicoSuter Do you mean that you cannot find it? It should be there. https://docs.microsoft.com/en-us/aspnet/core/fundamentals/minimal-apis?view=aspnetcore-6.0

OK. When will there be a new package? 🙂

@marinasundstrom
Copy link

marinasundstrom commented Nov 16, 2021

@RicoSuter
Screenshot 2021-11-16 at 21 04 25

RicoSuter added a commit that referenced this issue Nov 17, 2021
@marinasundstrom
Copy link

@RicoSuter When will this change be released? So I can set the tags that control what clients will be generated? Right now, we just have a "default" group in Swagger UI.

@RicoSuter
Copy link
Owner

@RobertSundstrom hopefully tomorrow as we need to first fix the release pipelines.

@seriouz
Copy link

seriouz commented Dec 1, 2021

@RicoSuter Did you get the pipelines fixed?

@marinasundstrom
Copy link

@RicoSuter Thank you, I have noticed that the changes have been published. 😊

@8BitAron
Copy link

Any update on when this might get published, we have a few developers on Apple Silicon and would like to use the .Net6 Runtime to build.

no other .net SDKs are supported on M1 macs

Thanks

@lahma
Copy link
Collaborator

lahma commented Jan 13, 2022

@8BitAron what version have you tried?

@8BitAron
Copy link

@lahma on the M1 mac, we have .net6 sdk installed, on our intel macs we have 3.1 and 6 sdks and pass in the /runtime:NetCore31 flag to nswag run

@lahma
Copy link
Collaborator

lahma commented Jan 14, 2022

Try with the latest release and pass Net60.

@YvonneArnoldus
Copy link
Author

Any time line on this?

@RicoSuter
Copy link
Owner

NSwag supports .NET 6 - closing this issue.

@YvonneArnoldus
Copy link
Author

For people who have the same problem, I used the worked around:
https://docs.microsoft.com/en-us/nuget/reference/errors-and-warnings/nu1605#example-2
In my project file.

Not optimal but it now builds

lahma pushed a commit to lahma/NSwag that referenced this issue Dec 25, 2022
lahma pushed a commit to lahma/NSwag that referenced this issue Jan 20, 2024
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

7 participants