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

Swashbuckle looking for .Net6 while my app use .Net7 #2696

Closed
llgjermeni opened this issue Aug 25, 2023 · 5 comments
Closed

Swashbuckle looking for .Net6 while my app use .Net7 #2696

llgjermeni opened this issue Aug 25, 2023 · 5 comments

Comments

@llgjermeni
Copy link

Hello,

Running from azure pipeline with:

      - script: >-
          dotnet swagger tofile --serializeasv2 --output swagger.json app.dll v1

I have the following error:

You must install or update .NET to run this application.
App: C:\Users\AzDevOps\.nuget\packages\swashbuckle.aspnetcore.cli\6.4.0\tools\net6.0\any\dotnet-swagger.dll
Architecture: x64
Framework: 'Microsoft.NETCore.App', version '6.0.0-rc.2.21480.5' (x64)
.NET location: C:\a\_tool\dotnet\

The following frameworks were found:
  7.0.10 at [C:\a\_tool\dotnet\shared\Microsoft.NETCore.App]

Learn about framework resolution:
https://aka.ms/dotnet/app-launch-failed

To install missing framework, download:
https://aka.ms/dotnet-core-applaunch?framework=Microsoft.NETCore.App&framework_version=6.0.0-rc.2.21480.5&arch=x64&rid=win10-x64
##[error]Cmd.exe exited with code '-2147450730'.

.Net7
Swashbuckle.AspNetCore Version="6.4.0"

In our case I can't install both of sdks 7 and 6.

@vdekercd
Copy link

Hi, there,

There has already been an issue on this subject: #2539.

The fix is in version 6.5.0 : #2539 (comment)

@llgjermeni
Copy link
Author

Hi @vdekercd,

thanks for the replay. I cannot use the 6.5.0 because of this issue

@zahalzel
Copy link

Running into a similar problem with .NET 8:

dotnet swagger tofile --serializeasv2 --output "C:\Users\zahalzel\source\repos\WebApplication1010\WebApplication1010\bin\Debug\net8.0\swagger.json" "C:\Users\zahalzel\source\repos\WebApplication1010\WebApplication1010\bin\Debug\net8.0\WebApplication1010.dll" v1

You must install or update .NET to run this application.
App: C:\Users\zahalzel\.nuget\packages\swashbuckle.aspnetcore.cli\6.5.0\tools\net7.0\any\dotnet-swagger.dll
Architecture: x64
Framework: 'Microsoft.NETCore.App', version '7.0.0' (x64)
.NET location: C:\Program Files\dotnet\
The following frameworks were found:
  8.0.0-rc.1.23419.4 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Learn more:
https://aka.ms/dotnet/app-launch-failed
To install missing framework, download:
https://aka.ms/dotnet-core-applaunch?framework=Microsoft.NETCore.App&framework_version=7.0.0&arch=x64&rid=win-x64&os=win10

@Havunen
Copy link

Havunen commented Feb 18, 2024

This is fixed in DotSwashbuckle, can you test using it please.
https://github.com/Havunen/DotSwashbuckle
https://www.nuget.org/packages/DotSwashbuckle.AspNetCore

@martincostello
Copy link
Collaborator

I'm going to close this in favour of #2792, as going through triaging the open issues I'm spotting a common theme and it's easier to manage one issue. Please track that issue for further updates.

If this issue isn't resolved once we have added support for net8.0, please open a new issue.

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

5 participants