When I try to run the test in debug mode I see the following additional information:
Application Insights Telemetry: {"name":"AppExceptions","time":"2025-07-09T08:58:50.4957821Z","iKey":"14a2b8d7-b617-458a-80fd-34ad7e0be2fb","tags":{"ai.cloud.roleInstance":"EQMFINOPS-1904","ai.internal.sdkVersion":"dotnet:2.22.0-997"},"data":{"baseType":"ExceptionData","baseData":{"ver":2,"exceptions":[{"id":26176662,"outerId":0,"typeName":"System.Reflection.TargetInvocationException","message":"Exception has been thrown by the target of an invocation.","hasFullStack":true,"parsedStack":[{"level":0,"method":"System.RuntimeMethodHandle.InvokeMethod","assembly":"mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089","line":0},{"level":1,"method":"System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal","assembly":"mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089","line":0},{"level":2,"method":"System.Reflection.RuntimeMethodInfo.Invoke","assembly":"mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089","line":0},{"level":3,"method":"Microsoft.Dynamics.AX.AOS.StartupInternal","assembly":"aoskernel, Version=7.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35","line":0},{"level":4,"method":"Microsoft.Dynamics.AX.AOS.Startup","assembly":"aoskernel, Version=7.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35","line":0},{"level":5,"method":"Microsoft.Dynamics.AX.AosConfig.?A0x3812d720.GetAosConfig","assembly":"Microsoft.Dynamics.AX.AosConfig, Version=7.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35","line":0},{"level":6,"method":"Microsoft.Dynamics.AX.AosConfig.Config.InitInternal","assembly":"Microsoft.Dynamics.AX.AosConfig, Version=7.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35","line":0},{"level":7,"method":"Microsoft.Dynamics.AX.AosConfig.Config.InitOnce","assembly":"Microsoft.Dynamics.AX.AosConfig, Version=7.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35","line":0},{"level":8,"method":"Microsoft.Dynamics.TestTools.TestAdapter.Execution.InProcExecutor.Execute","assembly":"Microsoft.Dynamics.TestTools.17.0.TestAdapter, Version=7.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35","line":0}]},{"id":15674740,"outerId":26176662,"typeName":"System.TypeInitializationException","message":"The type initializer for 'PerTypeValues`1' threw an exception.","hasFullStack":true,"parsedStack":[{"level":0,"method":"System.Reflection.Internal.MemoryBlock.GetUtf8NullTerminatedLength","assembly":"System.Reflection.Metadata, Version=8.0.0.1, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a","line":0},{"level":1,"method":"System.Reflection.Metadata.MetadataReader.ReadMetadataHeader","assembly":"System.Reflection.Metadata, Version=8.0.0.1, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a","line":0},{"level":2,"method":"System.Reflection.Metadata.MetadataReader..ctor","assembly":"System.Reflection.Metadata, Version=8.0.0.1, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a","line":0},{"level":3,"method":"System.Reflection.Metadata.PEReaderExtensions.GetMetadataReader","assembly":"System.Reflection.Metadata, Version=8.0.0.1, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a","line":0},{"level":4,"method":"Microsoft.Dynamics.Ax.Xpp.IndexedOnDemandXppTypeLoader2.ProcessAssemblyMetadata","assembly":"Microsoft.Dynamics.AX.Xpp.Support, Version=7.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35","line":0},{"level":5,"method":"Microsoft.Dynamics.Ax.Xpp.IndexedOnDemandXppTypeLoader2.InitializeTypesAsync","assembly":"Microsoft.Dynamics.AX.Xpp.Support, Version=7.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35","line":0},{"level":6,"method":"Microsoft.Dynamics.Ax.Xpp.TypeLoading.XppTypeLoader2.Initialize","assembly":"Microsoft.Dynamics.AX.Xpp.Support, Version=7.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35","line":0},{"level":7,"method":"Microsoft.Dynamics.Ax.Xpp.ReflectionCallHelper.Start","assembly":"Microsoft.Dynamics.AX.Xpp.Support, Version=7.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35","line":0}]},{"id":21044963,"outerId":15674740,"typeName":"System.IO.FileLoadException","message":"Could not load file or assembly 'System.Runtime.CompilerServices.Unsafe, Version=4.0.4.1, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)","hasFullStack":true,"parsedStack":[{"level":0,"method":"System.SpanHelpers+PerTypeValues`1.MeasureArrayAdjustment","assembly":"System.Memory, Version=4.0.1.2, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51","line":0},{"level":1,"method":"System.SpanHelpers+PerTypeValues`1..cctor","assembly":"System.Memory, Version=4.0.1.2, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51","line":0}]},{"id":58712211,"outerId":21044963,"typeName":"System.IO.FileLoadException","message":"Could not load file or assembly 'System.Runtime.CompilerServices.Unsafe, Version=4.0.4.1, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)","hasFullStack":true,"parsedStack":[{"level":0,"method":"System.Reflection.RuntimeAssembly._nLoad","assembly":"mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089","line":0},{"level":1,"method":"System.Reflection.RuntimeAssembly.InternalLoadAssemblyName","assembly":"mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089","line":0},{"level":2,"method":"System.Reflection.Assembly.Load","assembly":"mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089","line":0},{"level":3,"method":"Microsoft.VisualStudio.TestPlatform.Common.ExtensionFramework.TestPluginCache.CurrentDomainAssemblyResolve","assembly":"Microsoft.VisualStudio.TestPlatform.Common, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a","fileName":"/_/src/Microsoft.TestPlatform.Common/ExtensionFramework/TestPluginCache.cs","line":514},{"level":4,"method":"System.AppDomain.OnAssemblyResolveEvent","assembly":"mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089","line":0}]}],"properties":{"ProcessID":"14956","OSVersion":"10.0.20348.0","DynamicsAssemblyVersion":"7.0.7606.56","ActivityId":"2bd0e4e8-e9a8-0000-af04-dc2ba8e9db01","EntryAssemblyVersion":"17.1400.25.20301","EntryAssemblyName":"C:\\Program Files\\Microsoft Visual Studio\\2022\\Professional\\Common7\\IDE\\Extensions\\TestPlatform\\testhost.exe","VsUserHash":"cd4758d680554d9dd26318d1d7263dd7942cbabe68bf2cb1b6cdf98ce0a45648","ProcessName":"testhost","IsFirstPartyVSUser":"False","IsLocalAdministrator":"True","DevALMTelemetryAssemblyVersion":"7.0.30029.0"}}}}
What stands out to me in that call stack is the error "Could not load file or assembly 'System.Runtime.CompilerServices.Unsafe, Version=4.0.4.1", making me think this problem might be related to some kind of compatibility issue with one or more packages. My current suspicion is that this problem might be related to the Visual Studio version I am running (7.14.8) as I recently updated it. Anyone seen this issue before, and could point me in the right direction of how I can fix it?