XAML: .NET Runtime version currently executing is 8.0.5, but version 8.0.10 or later is required.

Dani_S 4,036 Reputation points
2025-01-28T13:18:35.1766667+00:00

Hi,

im in net 9, i run my poject in mac and got this error when running.

2025-01-28 15:12:08.725 [error]  XAML: Error starting Hot Reload connection listener: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.

 ---> Interop+AppleCrypto+AppleCommonCryptoCryptographicException: The specified item is no longer valid. It may have been deleted from the keychain.

   at Interop.AppleCrypto.X509CopyWithPrivateKey(SafeSecCertificateHandle certHandle, SafeSecKeyRefHandle privateKeyHandle, SafeKeychainHandle targetKeychain)

   at System.Security.Cryptography.X509Certificates.AppleCertificatePal.CopyWithPrivateKey(SafeSecKeyRefHandle privateKey)

   at System.Security.Cryptography.X509Certificates.AppleCertificatePal.CopyWithPrivateKey(RSA privateKey)

   at System.Security.Cryptography.X509Certificates.RSACertificateExtensions.CopyWithPrivateKey(X509Certificate2 certificate, RSA privateKey)

   at System.Security.Cryptography.X509Certificates.CertificateRequest.CreateSelfSigned(DateTimeOffset notBefore, DateTimeOffset notAfter)

   at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)

   at System.Reflection.MethodBaseInvoker.InvokeDirectByRefWithFewArgs(Object obj, Span`1 copyOfArgs, BindingFlags invokeAttr)

   --- End of inner exception stack trace ---

   at System.Reflection.MethodBaseInvoker.InvokeDirectByRefWithFewArgs(Object obj, Span`1 copyOfArgs, BindingFlags invokeAttr)

   at System.Reflection.MethodBaseInvoker.InvokeWithFewArgs(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)

   at Microsoft.VisualStudio.DesignTools.DiagnosticsMobile.Utility.SelfSignedCertGenerator.Generate()

   at Microsoft.VisualStudio.DesignTools.DiagnosticsMobile.HotReloadConnectionInitializer.CreateTcpDataBridge(IPAddress ipAddress, String sessionId, Action1 logMessageHandler, Func3 registerAdditional, CancellationToken cancellationToken)

   at Microsoft.VisualStudioCode.DesignTools.Diagnostics.LanguageService.VisualDiagnosticsLanguageService.Microsoft.VisualStudio.Maui.Contracts.IMauiLaunchCustomizer.GetCustomLaunchSettingsAsync(LaunchInfo launchInfo, CancellationToken token)

2025-01-28 15:12:08.725 [error]  XAML: .NET Runtime version currently executing is 8.0.5, but version 8.0.10 or later is required.

2025-01-28 15:12:13.755 [error]  XAML: Error starting Hot Reload connection listener: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.

 ---> Interop+AppleCrypto+AppleCommonCryptoCryptographicException: The specified item is no longer valid. It may have been deleted from the keychain.

   at Interop.AppleCrypto.X509CopyWithPrivateKey(SafeSecCertificateHandle certHandle, SafeSecKeyRefHandle privateKeyHandle, SafeKeychainHandle targetKeychain)

   at System.Security.Cryptography.X509Certificates.AppleCertificatePal.CopyWithPrivateKey(SafeSecKeyRefHandle privateKey)

   at System.Security.Cryptography.X509Certificates.AppleCertificatePal.CopyWithPrivateKey(RSA privateKey)

   at System.Security.Cryptography.X509Certificates.RSACertificateExtensions.CopyWithPrivateKey(X509Certificate2 certificate, RSA privateKey)

   at System.Security.Cryptography.X509Certificates.CertificateRequest.CreateSelfSigned(DateTimeOffset notBefore, DateTimeOffset notAfter)

   at InvokeStub_CertificateRequest.CreateSelfSigned(Object, Span`1)

   at System.Reflection.MethodBaseInvoker.InvokeWithFewArgs(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)

   --- End of inner exception stack trace ---

   at System.Reflection.MethodBaseInvoker.InvokeWithFewArgs(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)

   at Microsoft.VisualStudio.DesignTools.DiagnosticsMobile.Utility.SelfSignedCertGenerator.Generate()

   at Microsoft.VisualStudio.DesignTools.DiagnosticsMobile.HotReloadConnectionInitializer.CreateTcpDataBridge(IPAddress ipAddress, String sessionId, Action1 logMessageHandler, Func3 registerAdditional, CancellationToken cancellationToken)

   at Microsoft.VisualStudioCode.DesignTools.Diagnostics.LanguageService.VisualDiagnosticsLanguageService.Microsoft.VisualStudio.Maui.Contracts.IMauiLaunchCustomizer.GetCustomLaunchSettingsAsync(LaunchInfo launchInfo, CancellationToken token)

2025-01-28 15:12:13.756 [error]  XAML: .NET Runtime version currently executing is 8.0.5, but version 8.0.10 or later is required.

2025-01-28 15:13:06.285 [error]  XAML: Error starting Hot Reload connection listener: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.

 ---> Interop+AppleCrypto+AppleCommonCryptoCryptographicException: The specified item is no longer valid. It may have been deleted from the keychain.

   at Interop.AppleCrypto.X509CopyWithPrivateKey(SafeSecCertificateHandle certHandle, SafeSecKeyRefHandle privateKeyHandle, SafeKeychainHandle targetKeychain)

   at System.Security.Cryptography.X509Certificates.AppleCertificatePal.CopyWithPrivateKey(SafeSecKeyRefHandle privateKey)

   at System.Security.Cryptography.X509Certificates.AppleCertificatePal.CopyWithPrivateKey(RSA privateKey)

   at System.Security.Cryptography.X509Certificates.RSACertificateExtensions.CopyWithPrivateKey(X509Certificate2 certificate, RSA privateKey)

   at System.Security.Cryptography.X509Certificates.CertificateRequest.CreateSelfSigned(DateTimeOffset notBefore, DateTimeOffset notAfter)

   at InvokeStub_CertificateRequest.CreateSelfSigned(Object, Span`1)

   at System.Reflection.MethodBaseInvoker.InvokeWithFewArgs(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)

   --- End of inner exception stack trace ---

   at System.Reflection.MethodBaseInvoker.InvokeWithFewArgs(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)

   at Microsoft.VisualStudio.DesignTools.DiagnosticsMobile.Utility.SelfSignedCertGenerator.Generate()

   at Microsoft.VisualStudio.DesignTools.DiagnosticsMobile.HotReloadConnectionInitializer.CreateTcpDataBridge(IPAddress ipAddress, String sessionId, Action1 logMessageHandler, Func3 registerAdditional, CancellationToken cancellationToken)

   at Microsoft.VisualStudioCode.DesignTools.Diagnostics.LanguageService.VisualDiagnosticsLanguageService.Microsoft.VisualStudio.Maui.Contracts.IMauiLaunchCustomizer.GetCustomLaunchSettingsAsync(LaunchInfo launchInfo, CancellationToken token)

2025-01-28 15:13:06.286 [error]  XAML: .NET Runtime version currently executing is 8.0.5, but version 8.0.10 or later is required.

2025-01-28 15:13:40.365 [error]  XAML: Error starting Hot Reload connection listener: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.

 ---> Interop+AppleCrypto+AppleCommonCryptoCryptographicException: The specified item is no longer valid. It may have been deleted from the keychain.

   at Interop.AppleCrypto.X509CopyWithPrivateKey(SafeSecCertificateHandle certHandle, SafeSecKeyRefHandle privateKeyHandle, SafeKeychainHandle targetKeychain)

   at System.Security.Cryptography.X509Certificates.AppleCertificatePal.CopyWithPrivateKey(SafeSecKeyRefHandle privateKey)

   at System.Security.Cryptography.X509Certificates.AppleCertificatePal.CopyWithPrivateKey(RSA privateKey)

   at System.Security.Cryptography.X509Certificates.RSACertificateExtensions.CopyWithPrivateKey(X509Certificate2 certificate, RSA privateKey)

   at System.Security.Cryptography.X509Certificates.CertificateRequest.CreateSelfSigned(DateTimeOffset notBefore, DateTimeOffset notAfter)

   at InvokeStub_CertificateRequest.CreateSelfSigned(Object, Span`1)

   at System.Reflection.MethodBaseInvoker.InvokeWithFewArgs(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)

   --- End of inner exception stack trace ---

   at System.Reflection.MethodBaseInvoker.InvokeWithFewArgs(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)

   at Microsoft.VisualStudio.DesignTools.DiagnosticsMobile.Utility.SelfSignedCertGenerator.Generate()

   at Microsoft.VisualStudio.DesignTools.DiagnosticsMobile.HotReloadConnectionInitializer.CreateTcpDataBridge(IPAddress ipAddress, String sessionId, Action1 logMessageHandler, Func3 registerAdditional, CancellationToken cancellationToken)

   at Microsoft.VisualStudioCode.DesignTools.Diagnostics.LanguageService.VisualDiagnosticsLanguageService.Microsoft.VisualStudio.Maui.Contracts.IMauiLaunchCustomizer.GetCustomLaunchSettingsAsync(LaunchInfo launchInfo, CancellationToken token)

2025-01-28 15:13:40.365 [error]  XAML: .NET Runtime version currently executing is 8.0.5, but version 8.0.10 or later is required.

 

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
3,877 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.