Closed rene-descartes2021 closed 9 months ago
Thank you for the detailed report and sorry for inconvenience.
I am currently working on other tasks and it may take several days to research and respond this issue.
Until then, try it with the option --load-reflection-only
.
list-api --load-reflection-only Your.App.dll
But list-api
is behind from newest updates, so this may not work either.
Alternatively, Smdn.Reflection.ReverseGenerating.ListApi.MSBuild.Tasks
is updated, so you can try this instead.
I would like to update the list-api
first, so please wait.
I appreciate your prompt reply. I did try --load-reflection-only
but that didn't work, with different and similar error message.
I experimented and found a way to get list-api
working as expected using DOTNET_ROLL_FORWARD=Major list-api
.
So instead of:
$ tar xzf dotnet-sdk-8.0.101-linux-arm64.tar.gz -C ~/.dotnet
$ tar xzf dotnet-sdk-6.0.418-linux-arm64.tar.gz -C ~/.dotnet
$ dotnet tool install -g Smdn.Reflection.ReverseGenerating.ListApi
I just do version 8, not version 6:
$ tar xzf dotnet-sdk-8.0.101-linux-arm64.tar.gz -C ~/.dotnet
$ dotnet tool install -g Smdn.Reflection.ReverseGenerating.ListApi
Originally I had this problem on launching list-api
:
You must install or update .NET to run this application.
App: /home/user/.dotnet/tools/list-api
Architecture: arm64
Framework: 'Microsoft.NETCore.App', version '6.0.0' (arm64)
.NET location: /home/user/.dotnet
The following frameworks were found:
8.0.1 at [/home/user/.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=6.0.0&arch=arm64&rid=linux-arm64&os=debian.12
But the advice from searching that problem was to install the missing version. Also the output says exactly that "To install missing framework, download [...]", which misled me.
On reading documentation I thought to remove version 6 and try DOTNET_ROLL_FORWARD=Major list-api
. Everything now works as expected. If it should have worked with version 6, maybe that is an error in the SDK?
Documentation on DOTNET_ROLL_FORWARD
:
https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-environment-variables#dotnet_roll_forward
I think I saw a document somewhere that app/tool authors can override the default version roll forward logic.
Thank you for this useful tool! Closing since I got it working.
Thanks for digging into the issue and how to resolve it! And I'm glad to see that the problem has been resolved.
I will continue to work on updating the list-api
.
If I release it, I will let you know here in the comments.
list-api
version 1.3.0 is now available, including recent changes.
https://github.com/smdn/Smdn.Reflection.ReverseGenerating/releases/tag/releases%2FSmdn.Reflection.ReverseGenerating.ListApi-1.3.0
This version does not include the workaround for this issue, but it includes some improvements related to assembly loading. Please update it if you would like.
By the way, the target framework 'net8.0' has been added from version 1.3.0. If you need to specify the target framework when updating, use the following command to update.
dotnet tool update --framework net6.0 -g Smdn.Reflection.ReverseGenerating.ListApi
dotnet tool update --framework net8.0 -g Smdn.Reflection.ReverseGenerating.ListApi
Once again, thanks for reporting the issue!
Description
I run list-api on DLL built by project. list-api doesn't find DLLs in other directories, but does for the same directory. I think that is what occurs. I might be doing something wrong?
Here list-api is run on a dotnet 8 DLL I built:
Reproduction steps
Run list-api on a dll in the dotnet SDK:
Expected behavior
list-api should find other DLLs like System.Runtime in the SDK.
Actual behavior
In this case no System.CommandLine.apilist.cs output. But others give just header:
Configuration
I installed dotnet SDK 6 in order to get list-api to run.
The environment is unusual. Termux on arm64 Android, and
proot
(likechroot
) into Debian system. Could be my environment, or maybe I don't use list-api correctly? I will try on x86_64 desktop in a few days to try a different environment.Other information
First time trying list-api. List-api works as expected on other DLLs in
~/.dotnet/sdk/8.0.101/
I think because System.Runtime is in same directory.