Open daniel-mizsak opened 2 weeks ago
In .NET SDK 8, dotnet tool install
supports the --allow-roll-forward
option, which would let you run dotnet-suggest
on the .NET 8.0 runtime.
Thank you for your comment @KalleOlaviNiemitalo.
I was able to make it work the following way:
dotnet-suggest
with the following command: dotnet tool install --global dotnet-suggest --version 1.1.415701 --allow-roll-forward
and adding it to PATHdotnet-suggest script bash >~/.dotnet-suggest-shim.bash
work, and now even copying the content did not help (maybe it is something to do with to with the base docker image?), so I ran sed -i 's/\r//' ~/.dotnet-suggest-shim.bash
learned from here and that way I was able to source ~/.bashrc
dotnet8.0
as framework.But does this also mean that it is not possible to make dotnet-suggest
work with dotnet6?
dotnet-suggest 1.1.327201 targets .NET 6.0; you could still install that version if you don't want to use .NET 8.0. That version was built from commit 209b724a3c843253d3071e8348c353b297b0b8b5, which has tag 2.0.0-beta4.22272.1 in this repository.
I tried running the same steps as I was using for dotnet8 with dotnet6, but I believe that since I am not able to use the latest dotnet-suggest
version (as it is not compatible with dotnet6) there is something broken with the older version.
It behaves the same as I describen in the original issue.
I was trying to follow this tutorial to see if I was able to create a CLI tool with tab completion, but I had a few issues along the way.
1. dotnet-suggest might not be compatible with dotnet8
I am using
Ubuntu 22.04
withDocker version 27.0.3, build 7d4bcd8
. Downloaded dotnet8 docker image from here. Created the container and made sure dotnet8 was installed:Installed the latest dotnet-suggest, which is including dotnet7, but should be compatible with dotnet8. However, running
dotnet-suggest
results in:It might be just me having insufficient understanding on how nuget compatibility works.
2. dotnet-suggest-shim.bash wrong line ending
I was doing the same as before, only with dotnet6.
Installed the second most recent dotnet-suggest as it is compatible with dotnet6.
The package installs fine, but when I add script to bashrc, it looks like that the line endings are not following the unix standard:
Just copying the content of the file into
~/.dotnet-suggest-shim.bash'
seems to fix the issue.3. No suggestion for app created with System.CommandLine
I recreated the example solution shown here.
I tried to get inspired from this, this and this issue, but could not make it work.
It looks like autocomplete does work with
dotnet-suggest
itself:But not with
scl
:Also does not return anything.
I did not do any in-depth debugging with the method descripted here, but I can give it a try if needed. I appreciate any help! :)