dotnet / upgrade-assistant

A tool to assist developers in upgrading .NET Framework applications to .NET 6 and beyond
MIT License
1.11k stars 162 forks source link

upgrade-assistant 0.5.564 crashes immediately on macOS (x64) running with net8.0 Unable to load shared library 'hostfxr' #1531

Open bruce31 opened 1 year ago

bruce31 commented 1 year ago

Describe the bug

Crashes immediately

To Reproduce

$ upgrade-assistant --version
Unhandled exception. System.DllNotFoundException: Unable to load shared library 'hostfxr' or one of its dependencies. In order to help diagnose loading problems, consider setting the DYLD_PRINT_LIBRARIES environment variable:
dlopen(/usr/local/share/dotnet/shared/Microsoft.NETCore.App/8.0.0/hostfxr.dylib, 1): image not found
dlopen(/Users/xxx/.dotnet/tools/.store/upgrade-assistant/0.5.564/upgrade-assistant/0.5.564/tools/net8.0/any/hostfxr.dylib, 1): image not found
dlopen(hostfxr.dylib, 1): image not found
dlopen(/usr/local/share/dotnet/shared/Microsoft.NETCore.App/8.0.0/libhostfxr.dylib, 1): image not found
dlopen(/Users/xxx/.dotnet/tools/.store/upgrade-assistant/0.5.564/upgrade-assistant/0.5.564/tools/net8.0/any/libhostfxr.dylib, 1): image not found
dlopen(libhostfxr.dylib, 1): image not found
dlopen(/usr/local/share/dotnet/shared/Microsoft.NETCore.App/8.0.0/hostfxr, 1): image not found
dlopen(/Users/xxx/.dotnet/tools/.store/upgrade-assistant/0.5.564/upgrade-assistant/0.5.564/tools/net8.0/any/hostfxr, 1): image not found
dlopen(hostfxr, 1): image not found
dlopen(/usr/local/share/dotnet/shared/Microsoft.NETCore.App/8.0.0/libhostfxr, 1): image not found
dlopen(/Users/xxx/.dotnet/tools/.store/upgrade-assistant/0.5.564/upgrade-assistant/0.5.564/tools/net8.0/any/libhostfxr, 1): image not found
dlopen(libhostfxr, 1): image not found

   at Microsoft.Build.Locator.NativeMethods.hostfxr_resolve_sdk2(String exe_dir, String working_dir, hostfxr_resolve_sdk2_flags_t flags, hostfxr_resolve_sdk2_result_fn result)
   at Microsoft.Build.Locator.DotNetSdkLocationHelper.GetDotNetBasePaths(String workingDirectory)+MoveNext()
   at Microsoft.Build.Locator.DotNetSdkLocationHelper.GetInstances(String workingDirectory)+MoveNext()
   at Microsoft.Build.Locator.MSBuildLocator.GetInstances(VisualStudioInstanceQueryOptions options)+MoveNext()
   at System.Linq.Enumerable.WhereEnumerableIterator`1.MoveNext()
   at Microsoft.UpgradeAssistant.Cli.Dependencies.MsBuildRegistrationInitializer.FilterForBitness(IEnumerable`1 instances)+MoveNext() in D:\a\_work\1\s\src\cli\Dependencies\MsBuildRegistrationInitializer.cs:line 92
   at System.Collections.Generic.EnumerableHelpers.ToArray[T](IEnumerable`1 source, Int32& length)
   at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
   at System.Linq.OrderedEnumerable`1.ToList()
   at Microsoft.UpgradeAssistant.Cli.Dependencies.MsBuildRegistrationInitializer.FindMSBuildPath() in D:\a\_work\1\s\src\cli\Dependencies\MsBuildRegistrationInitializer.cs:line 68
   at Microsoft.UpgradeAssistant.Cli.Dependencies.MsBuildRegistrationInitializer.RegisterMsbuild() in D:\a\_work\1\s\src\cli\Dependencies\MsBuildRegistrationInitializer.cs:line 28
   at Microsoft.UpgradeAssistant.Cli.Dependencies.MsBuildRegistrationInitializer.Initialize() in D:\a\_work\1\s\src\cli\Dependencies\MsBuildRegistrationInitializer.cs:line 23
   at Microsoft.UpgradeAssistant.Cli.Dependencies.ExportProvider.RunCompositionInitializers(IEnumerable`1 initializers) in D:\a\_work\1\s\src\cli\Dependencies\ExportProvider.cs:line 86
   at Microsoft.UpgradeAssistant.Cli.Dependencies.ExportProvider.InitializeContainer(IEnumerable`1 initializers) in D:\a\_work\1\s\src\cli\Dependencies\ExportProvider.cs:line 69
   at Microsoft.UpgradeAssistant.Cli.Dependencies.ExportProvider..ctor(IAppSettings settings, String extensionsPath, IEnumerable`1 initializers, ILogger logger, StatusContext statusContext) in D:\a\_work\1\s\src\cli\Dependencies\ExportProvider.cs:line 31
   at Microsoft.UpgradeAssistant.Cli.UpgradeCommandAppBuilder.<ConfigureExports>b__8_0(StatusContext statusContext) in D:\a\_work\1\s\src\cli\UpgradeCommandAppBuilder.cs:line 74
   at Spectre.Console.Status.<>c__DisplayClass15_0`1.<Start>b__0(StatusContext ctx) in /_/src/Spectre.Console/Live/Status/Status.cs:line 60
   at Spectre.Console.Status.<>c__DisplayClass17_0`1.<<StartAsync>b__0>d.MoveNext() in /_/src/Spectre.Console/Live/Status/Status.cs:line 120
--- End of stack trace from previous location ---
   at Spectre.Console.Progress.<>c__DisplayClass28_0`1.<<StartAsync>b__0>d.MoveNext() in /_/src/Spectre.Console/Live/Progress/Progress.cs:line 133
--- End of stack trace from previous location ---
   at Spectre.Console.Internal.DefaultExclusivityMode.RunAsync[T](Func`1 func) in /_/src/Spectre.Console/Internal/DefaultExclusivityMode.cs:line 40
   at Spectre.Console.Progress.StartAsync[T](Func`2 action) in /_/src/Spectre.Console/Live/Progress/Progress.cs:line 116
   at Spectre.Console.Status.StartAsync[T](String status, Func`2 func) in /_/src/Spectre.Console/Live/Status/Status.cs:line 117
   at Spectre.Console.Status.Start[T](String status, Func`2 func) in /_/src/Spectre.Console/Live/Status/Status.cs:line 61
   at Microsoft.UpgradeAssistant.Cli.UpgradeCommandAppBuilder.ConfigureExports() in D:\a\_work\1\s\src\cli\UpgradeCommandAppBuilder.cs:line 68
   at Microsoft.UpgradeAssistant.Cli.UpgradeCommandAppBuilder.Build() in D:\a\_work\1\s\src\cli\UpgradeCommandAppBuilder.cs:line 57
   at Program.<Main>$(String[] args) in D:\a\_work\1\s\src\cli\Program.cs:line 7
   at Program.<Main>(String[] args)
Abort trap: 6
$ dotnet tool list -g upgrade-assistant
Package Id             Version      Commands
-----------------------------------------------------
upgrade-assistant      0.5.564      upgrade-assistant
$ dotnet --info
.NET SDK:
 Version:           8.0.100
 Commit:            57efcf1350
 Workload version:  8.0.100-manifests.6c33ef20

Runtime Environment:
 OS Name:     Mac OS X
 OS Version:  10.15
 OS Platform: Darwin
 RID:         osx-x64
 Base Path:   /usr/local/share/dotnet/sdk/8.0.100/

.NET workloads installed:
 Workload version: 8.0.100-manifests.6c33ef20
There are no installed workloads to display.

Host:
  Version:      8.0.0
  Architecture: x64
  Commit:       5535e31a71

.NET SDKs installed:
  6.0.417 [/usr/local/share/dotnet/sdk]
  7.0.311 [/usr/local/share/dotnet/sdk]
  8.0.100 [/usr/local/share/dotnet/sdk]

.NET runtimes installed:
  Microsoft.AspNetCore.All 2.1.9 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.App 2.1.9 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 3.1.32 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 5.0.17 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 6.0.25 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 7.0.14 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 8.0.0 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 2.1.23 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 3.1.32 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 5.0.17 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 6.0.25 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 7.0.14 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 8.0.0 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]

Other architectures found:
  None
niklasravnsborg commented 1 year ago

I had the same problem but was able to solve it by installing dotnet from https://dotnet.microsoft.com/en-us/download/dotnet/8.0 instead of from homebrew.

bruce31 commented 1 year ago

Also happening in Alpine Docker Container (pulled latest today)

docker images
REPOSITORY                                    TAG            IMAGE ID       CREATED         SIZE
mcr.microsoft.com/dotnet/sdk                  8.0-alpine     c0c01e15d6aa   11 days ago     694MB
docker run -it --rm mcr.microsoft.com/dotnet/sdk:8.0-alpine "ash"
/ # dotnet --info
.NET SDK:
 Version:           8.0.100
 Commit:            57efcf1350
 Workload version:  8.0.100-manifests.6c33ef20

Runtime Environment:
 OS Name:     alpine
 OS Version:  3.18
 OS Platform: Linux
 RID:         linux-musl-x64
 Base Path:   /usr/share/dotnet/sdk/8.0.100/

.NET workloads installed:
 Workload version: 8.0.100-manifests.6c33ef20
There are no installed workloads to display.

Host:
  Version:      8.0.0
  Architecture: x64
  Commit:       5535e31a71

.NET SDKs installed:
  8.0.100 [/usr/share/dotnet/sdk]

.NET runtimes installed:
  Microsoft.AspNetCore.App 8.0.0 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 8.0.0 [/usr/share/dotnet/shared/Microsoft.NETCore.App]

Other architectures found:
  None

Environment variables:
  Not set

global.json file:
  Not found

Learn more:
  https://aka.ms/dotnet/info

Download .NET:
  https://aka.ms/dotnet/download
/ # dotnet tool install -g upgrade-assistant
Skipping NuGet package signature verification.
Tools directory '/root/.dotnet/tools' is not currently on the PATH environment variable.
If you are using bash, you can add it to your profile by running the following command:

cat << \EOF >> ~/.bash_profile
# Add .NET Core SDK tools
export PATH="$PATH:/root/.dotnet/tools"
EOF

You can add it to the current session by running the following command:

export PATH="$PATH:/root/.dotnet/tools"

You can invoke the tool using the following command: upgrade-assistant
Tool 'upgrade-assistant' (version '0.5.564') was successfully installed.
/ # export PATH="$PATH:/root/.dotnet/tools"
/ # upgrade-assistant --version
Unhandled exception. System.DllNotFoundException: Unable to load shared library 'hostfxr' or one of its dependencies. In order to help diagnose loading problems, consider using a tool like strace. If you're using glibc, consider setting the LD_DEBUG environment variable:
Error loading shared library /usr/share/dotnet/shared/Microsoft.NETCore.App/8.0.0/hostfxr.so: No such file or directory
Error loading shared library /root/.dotnet/tools/.store/upgrade-assistant/0.5.564/upgrade-assistant/0.5.564/tools/net8.0/any/hostfxr.so: No such file or directory
Error loading shared library hostfxr.so: No such file or directory
Error loading shared library /usr/share/dotnet/shared/Microsoft.NETCore.App/8.0.0/libhostfxr.so: No such file or directory
Error loading shared library /root/.dotnet/tools/.store/upgrade-assistant/0.5.564/upgrade-assistant/0.5.564/tools/net8.0/any/libhostfxr.so: No such file or directory
Error loading shared library libhostfxr.so: No such file or directory
Error loading shared library /usr/share/dotnet/shared/Microsoft.NETCore.App/8.0.0/hostfxr: No such file or directory
Error loading shared library /root/.dotnet/tools/.store/upgrade-assistant/0.5.564/upgrade-assistant/0.5.564/tools/net8.0/any/hostfxr: No such file or directory
Error loading shared library hostfxr: No such file or directory
Error loading shared library /usr/share/dotnet/shared/Microsoft.NETCore.App/8.0.0/libhostfxr: No such file or directory
Error loading shared library /root/.dotnet/tools/.store/upgrade-assistant/0.5.564/upgrade-assistant/0.5.564/tools/net8.0/any/libhostfxr: No such file or directory
Error loading shared library libhostfxr: No such file or directory

   at Microsoft.Build.Locator.NativeMethods.hostfxr_resolve_sdk2(String exe_dir, String working_dir, hostfxr_resolve_sdk2_flags_t flags, hostfxr_resolve_sdk2_result_fn result)
   at Microsoft.Build.Locator.DotNetSdkLocationHelper.GetDotNetBasePaths(String workingDirectory)+MoveNext()
   at Microsoft.Build.Locator.DotNetSdkLocationHelper.GetInstances(String workingDirectory)+MoveNext()
   at Microsoft.Build.Locator.MSBuildLocator.GetInstances(VisualStudioInstanceQueryOptions options)+MoveNext()
   at System.Linq.Enumerable.WhereEnumerableIterator`1.MoveNext()
   at Microsoft.UpgradeAssistant.Cli.Dependencies.MsBuildRegistrationInitializer.FilterForBitness(IEnumerable`1 instances)+MoveNext() in D:\a\_work\1\s\src\cli\Dependencies\MsBuildRegistrationInitializer.cs:line 92
   at System.Collections.Generic.EnumerableHelpers.ToArray[T](IEnumerable`1 source, Int32& length)
   at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
   at System.Linq.OrderedEnumerable`1.ToList()
   at Microsoft.UpgradeAssistant.Cli.Dependencies.MsBuildRegistrationInitializer.FindMSBuildPath() in D:\a\_work\1\s\src\cli\Dependencies\MsBuildRegistrationInitializer.cs:line 68
   at Microsoft.UpgradeAssistant.Cli.Dependencies.MsBuildRegistrationInitializer.RegisterMsbuild() in D:\a\_work\1\s\src\cli\Dependencies\MsBuildRegistrationInitializer.cs:line 28
   at Microsoft.UpgradeAssistant.Cli.Dependencies.MsBuildRegistrationInitializer.Initialize() in D:\a\_work\1\s\src\cli\Dependencies\MsBuildRegistrationInitializer.cs:line 23
   at Microsoft.UpgradeAssistant.Cli.Dependencies.ExportProvider.RunCompositionInitializers(IEnumerable`1 initializers) in D:\a\_work\1\s\src\cli\Dependencies\ExportProvider.cs:line 86
   at Microsoft.UpgradeAssistant.Cli.Dependencies.ExportProvider.InitializeContainer(IEnumerable`1 initializers) in D:\a\_work\1\s\src\cli\Dependencies\ExportProvider.cs:line 69
   at Microsoft.UpgradeAssistant.Cli.Dependencies.ExportProvider..ctor(IAppSettings settings, String extensionsPath, IEnumerable`1 initializers, ILogger logger, StatusContext statusContext) in D:\a\_work\1\s\src\cli\Dependencies\ExportProvider.cs:line 31
   at Microsoft.UpgradeAssistant.Cli.UpgradeCommandAppBuilder.<ConfigureExports>b__8_0(StatusContext statusContext) in D:\a\_work\1\s\src\cli\UpgradeCommandAppBuilder.cs:line 74
   at Spectre.Console.Status.<>c__DisplayClass15_0`1.<Start>b__0(StatusContext ctx) in /_/src/Spectre.Console/Live/Status/Status.cs:line 60
   at Spectre.Console.Status.<>c__DisplayClass17_0`1.<<StartAsync>b__0>d.MoveNext() in /_/src/Spectre.Console/Live/Status/Status.cs:line 120
--- End of stack trace from previous location ---
   at Spectre.Console.Progress.<>c__DisplayClass28_0`1.<<StartAsync>b__0>d.MoveNext() in /_/src/Spectre.Console/Live/Progress/Progress.cs:line 133
--- End of stack trace from previous location ---
   at Spectre.Console.Internal.DefaultExclusivityMode.RunAsync[T](Func`1 func) in /_/src/Spectre.Console/Internal/DefaultExclusivityMode.cs:line 40
   at Spectre.Console.Progress.StartAsync[T](Func`2 action) in /_/src/Spectre.Console/Live/Progress/Progress.cs:line 116
   at Spectre.Console.Status.StartAsync[T](String status, Func`2 func) in /_/src/Spectre.Console/Live/Status/Status.cs:line 117
   at Spectre.Console.Status.Start[T](String status, Func`2 func) in /_/src/Spectre.Console/Live/Status/Status.cs:line 61
   at Microsoft.UpgradeAssistant.Cli.UpgradeCommandAppBuilder.ConfigureExports() in D:\a\_work\1\s\src\cli\UpgradeCommandAppBuilder.cs:line 68
   at Microsoft.UpgradeAssistant.Cli.UpgradeCommandAppBuilder.Build() in D:\a\_work\1\s\src\cli\UpgradeCommandAppBuilder.cs:line 57
   at Program.<Main>$(String[] args) in D:\a\_work\1\s\src\cli\Program.cs:line 7
   at Program.<Main>(String[] args)
Aborted
/ #
sergey-fuflygin commented 4 months ago

I am encountering a similar issue with the Upgrade Assistant (version 0.5.711) on a Mac M1 machine. When attempting to use the tool, I receive the following error:

~ % upgrade-assistant

▰▱▱▱▱▱▱ Initializing and loading extensions...
                                              No .NET SDKs were found.

Download a .NET SDK:
https://aka.ms/dotnet/download

Unhandled exception. System.InvalidOperationException: Failed to find an appropriate version of .NET Core MSBuild. Call to hostfxr_resolve_sdk2 failed. There may be more details in stderr.
   at Microsoft.Build.Locator.DotNetSdkLocationHelper.GetDotNetBasePaths(String workingDirectory)+MoveNext()
   at Microsoft.Build.Locator.DotNetSdkLocationHelper.GetInstances(String workingDirectory)+MoveNext()
   at Microsoft.Build.Locator.MSBuildLocator.GetInstances(VisualStudioInstanceQueryOptions options)+MoveNext()
   at System.Linq.Enumerable.WhereEnumerableIterator`1.MoveNext()
   at Microsoft.UpgradeAssistant.Cli.Dependencies.MsBuildRegistrationInitializer.FilterForBitness(IEnumerable`1 instances)+MoveNext() in D:\a\_work\1\s\src\cli\Dependencies\MsBuildRegistrationInitializer.cs:line 92
   at System.Collections.Generic.EnumerableHelpers.ToArray[T](IEnumerable`1 source, Int32& length)
   at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
   at System.Linq.OrderedEnumerable`1.ToList()
   at Microsoft.UpgradeAssistant.Cli.Dependencies.MsBuildRegistrationInitializer.FindMSBuildPath() in D:\a\_work\1\s\src\cli\Dependencies\MsBuildRegistrationInitializer.cs:line 68
   at Microsoft.UpgradeAssistant.Cli.Dependencies.MsBuildRegistrationInitializer.RegisterMsbuild() in D:\a\_work\1\s\src\cli\Dependencies\MsBuildRegistrationInitializer.cs:line 28
   at Microsoft.UpgradeAssistant.Cli.Dependencies.MsBuildRegistrationInitializer.Initialize() in D:\a\_work\1\s\src\cli\Dependencies\MsBuildRegistrationInitializer.cs:line 23
   at Microsoft.UpgradeAssistant.Cli.Dependencies.ExportProvider.RunCompositionInitializers(IEnumerable`1 initializers) in D:\a\_work\1\s\src\cli\Dependencies\ExportProvider.cs:line 86
   at Microsoft.UpgradeAssistant.Cli.Dependencies.ExportProvider.InitializeContainer(IEnumerable`1 initializers) in D:\a\_work\1\s\src\cli\Dependencies\ExportProvider.cs:line 69
   at Microsoft.UpgradeAssistant.Cli.Dependencies.ExportProvider..ctor(IAppSettings settings, String extensionsPath, IEnumerable`1 initializers, ILogger logger, StatusContext statusContext) in D:\a\_work\1\s\src\cli\Dependencies\ExportProvider.cs:line 31
   at Microsoft.UpgradeAssistant.Cli.UpgradeCommandAppBuilder.<ConfigureExports>b__8_0(StatusContext statusContext) in D:\a\_work\1\s\src\cli\UpgradeCommandAppBuilder.cs:line 73
   at Spectre.Console.Status.<>c__DisplayClass15_0`1.<Start>b__0(StatusContext ctx) in /_/src/Spectre.Console/Live/Status/Status.cs:line 60
   at Spectre.Console.Status.<>c__DisplayClass17_0`1.<<StartAsync>b__0>d.MoveNext() in /_/src/Spectre.Console/Live/Status/Status.cs:line 120
--- End of stack trace from previous location ---
   at Spectre.Console.Progress.<>c__DisplayClass28_0`1.<<StartAsync>b__0>d.MoveNext() in /_/src/Spectre.Console/Live/Progress/Progress.cs:line 133
--- End of stack trace from previous location ---
   at Spectre.Console.Internal.DefaultExclusivityMode.RunAsync[T](Func`1 func) in /_/src/Spectre.Console/Internal/DefaultExclusivityMode.cs:line 40
   at Spectre.Console.Progress.StartAsync[T](Func`2 action) in /_/src/Spectre.Console/Live/Progress/Progress.cs:line 116
   at Spectre.Console.Status.StartAsync[T](String status, Func`2 func) in /_/src/Spectre.Console/Live/Status/Status.cs:line 117
   at Spectre.Console.Status.Start[T](String status, Func`2 func) in /_/src/Spectre.Console/Live/Status/Status.cs:line 61
   at Microsoft.UpgradeAssistant.Cli.UpgradeCommandAppBuilder.ConfigureExports() in D:\a\_work\1\s\src\cli\UpgradeCommandAppBuilder.cs:line 67
   at Microsoft.UpgradeAssistant.Cli.UpgradeCommandAppBuilder.Build() in D:\a\_work\1\s\src\cli\UpgradeCommandAppBuilder.cs:line 56
   at Program.<Main>$(String[] args) in D:\a\_work\1\s\src\cli\Program.cs:line 7
   at Program.<Main>(String[] args)
zsh: abort      upgrade-assistant

Operating System: macOS 14.5 (Mac M1)

.NET SDK Versions Installed:

~ % dotnet --list-sdks                                              
6.0.424 [/usr/local/share/dotnet/sdk]
8.0.303 [/usr/local/share/dotnet/sdk]

.NET Runtime Versions Installed:

~ % dotnet --list-runtimes
Microsoft.AspNetCore.App 6.0.32 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 8.0.7 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 6.0.32 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 8.0.7 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]

MSBuild Version:

% dotnet msbuild -version
MSBuild version 17.10.4+10fbfbf2e for .NET
17.10.4.21802

I have tried reinstalling the tool and ensuring that all necessary environment variables are correctly set. However, the issue persists.

Steps to Reproduce:

  1. Install Upgrade Assistant version 0.5.711.
  2. Run upgrade-assistant command.
  3. Observe the error message.

Any assistance or guidance on resolving this issue would be greatly appreciated.

Thank you!

jstedfast commented 4 months ago

Can you try installing the dotnet 8.0 runtime/sdk? I've always run this using dotnet 8.0

jstedfast commented 4 months ago

Sorry, just noticed you have net8.0 installed

jstedfast commented 4 months ago

I just made sure to install the exact same versions of the SDK/runtimes and updated my upgrade-assistant as well and am unable to reproduce this issue :(

sergey-fuflygin commented 4 months ago

Thanks for the quick response!

I’ve verified that .NET 8.0 SDK and runtime are installed, as you suggested. Additionally, I’ve tried uninstalling and reinstalling various versions of the Upgrade Assistant.

Since the issue persists, could there be any other underlying factors or configurations that might be impacting the Upgrade Assistant? Any additional guidance or troubleshooting steps you could provide would be greatly appreciated.

Below is the output of dotnet --info for your reference:

~ % dotnet --info
.NET SDK:
 Version:           8.0.303
 Commit:            29ab8e3268
 Workload version:  8.0.300-manifests.c915c39d
 MSBuild version:   17.10.4+10fbfbf2e

Runtime Environment:
 OS Name:     Mac OS X
 OS Version:  14.5
 OS Platform: Darwin
 RID:         osx-arm64
 Base Path:   /usr/local/share/dotnet/sdk/8.0.303/

.NET workloads installed:
There are no installed workloads to display.

Host:
  Version:      8.0.7
  Architecture: arm64
  Commit:       2aade6beb0

.NET SDKs installed:
  6.0.424 [/usr/local/share/dotnet/sdk]
  8.0.303 [/usr/local/share/dotnet/sdk]

.NET runtimes installed:
  Microsoft.AspNetCore.App 6.0.32 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 8.0.7 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 6.0.32 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 8.0.7 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]

Other architectures found:
  None

Environment variables:
  Not set

global.json file:
  Not found

Learn more:
  https://aka.ms/dotnet/info

Download .NET:
  https://aka.ms/dotnet/download
sergey-fuflygin commented 3 months ago

@jstedfast in my case, the issue was related to MSBuildLocator and was fixed by adding /usr/local/share/dotnet to the PATH environment variable as suggested here.

Thanks for your support!

jstedfast commented 3 months ago

Good to know, thanks for sharing!