Quantcast
Channel: Active questions tagged ubuntu - Stack Overflow
Viewing all articles
Browse latest Browse all 7072

swagger (from Swashbuckle.AspNetCore.Cli) Could not load file or assembly 'Swashbuckle.AspNetCore.Swagger in WSL2

$
0
0

Installed for cli in ubuntu 22.04.2 under WSL2 to generate openApi spec

dotnet tool install Swashbuckle.AspNetCore.Cli -g

I can see that it is installed using

dotnet tool list -g

However when I try and generate any file, I get a file not found exception:

Unhandled exception. System.IO.FileNotFoundException: Could not load file or assembly 'Swashbuckle.AspNetCore.Swagger, Version=6.5.0.0, Culture=neutral, PublicKeyToken=62657d7474907593'. The system cannot find the file specified.File name: 'Swashbuckle.AspNetCore.Swagger, Version=6.5.0.0, Culture=neutral, PublicKeyToken=62657d7474907593'   at Swashbuckle.AspNetCore.Cli.Program.<>c.<Main>b__0_4(IDictionary`2 namedArgs)   at Swashbuckle.AspNetCore.Cli.CommandRunner.Run(IEnumerable`1 args) in C:\projects\ahoy\src\Swashbuckle.AspNetCore.Cli\CommandRunner.cs:line 68   at Swashbuckle.AspNetCore.Cli.CommandRunner.Run(IEnumerable`1 args) in C:\projects\ahoy\src\Swashbuckle.AspNetCore.Cli\CommandRunner.cs:line 59   at Swashbuckle.AspNetCore.Cli.Program.Main(String[] args) in C:\projects\ahoy\src\Swashbuckle.AspNetCore.Cli\Program.cs:line 121

Prior to this I also had the issue of swaager command not found, after installing, but adding

# set PATH for dotnetif [ -d "$HOME/.dotnet/tools" ] ; then    PATH="$PATH:$HOME/.dotnet/tools"fi

to ~/.profile fixed the pathing problem


Viewing all articles
Browse latest Browse all 7072

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>