Azure / azure-functions-powershell-library

MIT License
2 stars 3 forks source link

Hard crash with `func start` using .NET 8 preview 5 #49

Open paulyuk opened 1 year ago

paulyuk commented 1 year ago

Follow the preview instructions but use .NET 8 preview 5 via

winget install --id Microsoft.DotNet.SDK.Preview
func start

The result is this hard crash: Core Tools Version: 4.0.5210 Commit hash: N/A (64-bit) Function Runtime Version: 4.21.1.20667 [2023-06-19T21:59:36.855Z] Language Worker Process exited. Pid=16800. [2023-06-19T21:59:36.856Z] C:\Program Files\dotnet\dotnet.exe exited with code -532462766 (0xE0434352). Unhandled exception. System.TypeInitializationException: The type initializer for 'System.Management.Automation.PSVersionInfo' threw an exception.

Could we please trap this error and return more reasonable message like ".NET 8 Preview 1-4 is required but not found"