You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
AssemblyAnalyzer (at least on Mac OS x64) runs into "The 'dotnet' executable could not be found on the path" when dotnet executable is available on the system path.
Version of dependency-check used
The problem occurs using version 7.3.2 of the maven plugin, but due to its root cause will apply to all integrations
Log file
[ERROR] ----------------------------------------------------
[ERROR] .NET Assembly Analyzer could not be initialized and at least one 'exe' or 'dll' was scanned. The 'dotnet' executable could not be found on the path; either disable the Assembly Analyzer or add the path to dotnet core in the configuration.
[ERROR] ----------------------------------------------------
To Reproduce
Steps to reproduce the behavior:
Install a current dotnet 6.0 core runtime
Scan a project with a dll or exe
See the error reported eventhough dotnet is in the path
Expected behavior
.NET Assembly Analyzer successfully detecting the presence of the dotnet executable in the path.
Additional context
From console output it can be established that the old way of working (dotnet --version) no longer works for at least dotnet 6 core runtime on Mac OS. It appears to nowadays require dotnet --info to get a clean returncode
aikebah@abu suppressions % dotnet --versionThe command could not be loaded, possibly because: * You intended to execute a .NET application: The application '--version' does not exist. * You intended to execute a .NET SDK command: No .NET SDKs were found.Download a .NET SDK:https://aka.ms/dotnet-downloadLearn about SDK resolution:https://aka.ms/dotnet/sdk-not-foundaikebah@abu suppressions % echo$?145aikebah@abu suppressions % dotnet --infoglobal.json file: Not foundHost: Version: 6.0.11 Architecture: x64 Commit: 943474ca16.NET SDKs installed: No SDKs were found..NET runtimes installed: Microsoft.AspNetCore.App 6.0.2 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App] Microsoft.NETCore.App 6.0.2 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App] Microsoft.NETCore.App 6.0.9 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App] Microsoft.NETCore.App 6.0.11 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]Download .NET: https://aka.ms/dotnet-downloadLearn about .NET Runtimes and SDKs: https://aka.ms/dotnet/runtimes-sdk-infoaikebah@abu suppressions % echo$?0
The text was updated successfully, but these errors were encountered:
Behavior depends on whether or not a dotnet SDK is installed or only the runtime. --version reaches out to the SDK. see also dotnet/dotnet-docker#2235 and dotnet/sdk#6569
From what I get --info would suffice. The code just checks whether the executable is on the path (if no explicit executable is configured) by calling dotnet --version checking for succesful invocation and discarding any output created. If that fails the assembly analyzer gets disabled.
But if I understand correctly it would require only dotnet runtime, not the full sdk. Both setups support dotnet --info from what I understand from the linked issues, but only an install including SDK supports dotnet --version
Describe the bug
AssemblyAnalyzer (at least on Mac OS x64) runs into "The 'dotnet' executable could not be found on the path" when dotnet executable is available on the system path.
Version of dependency-check used
The problem occurs using version 7.3.2 of the maven plugin, but due to its root cause will apply to all integrations
Log file
To Reproduce
Steps to reproduce the behavior:
Expected behavior
.NET Assembly Analyzer successfully detecting the presence of the dotnet executable in the path.
Additional context
From console output it can be established that the old way of working (
dotnet --version
) no longer works for at least dotnet 6 core runtime on Mac OS. It appears to nowadays requiredotnet --info
to get a clean returncodeThe text was updated successfully, but these errors were encountered: