prash-wghats / vscode-nxunit-test-adapter

Run your Nunit or Xunit test for Desktop .NET Framework or Mono using the Test Explorer
MIT License
6 stars 2 forks source link

System.IO.FileNotFoundException: Could not load file or assembly 'System.Runtime during discovery #13

Open brumlemann opened 3 years ago

brumlemann commented 3 years ago

Postulating that current dir is not set correctly. Basing that on the fact that the binder reports 'Initial PrivatePath = NULL'.

=== Pre-bind state information === LOG: DisplayName = System.Runtime, Version=4.2.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a (Fully-specified) LOG: Appbase = file:///c:/Users/<redacted>/.vscode/extensions/wghats.vscode-nxunit-test-adapter-0.1.3/bin/Release/ LOG: Initial PrivatePath = NULL Calling assembly : (Unknown).

LOG: This bind starts in default load context. LOG: No application configuration file found. LOG: Using host configuration file: LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework64\v4.0.30319\config\machine.config. LOG: Post-policy reference: System.Runtime, Version=4.2.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a LOG: The same bind was seen before, and was failed with hr = 0x80070002. Could not load file or assembly 'System.Runtime, Version=4.2.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified. c:\Git\<Redacted>\bin\Debug\netcoreapp3.1\Confirmit.SurveyDesign.Api.xIntegrationTests.dll System.IO.FileNotFoundException: Could not load file or assembly 'System.Runtime, Version=4.2.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified. File name: 'System.Runtime, Version=4.2.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' at System.ModuleHandle.ResolveMethod(RuntimeModule module, Int32 methodToken, IntPtr typeInstArgs, Int32 typeInstCount, IntPtr methodInstArgs, Int32 methodInstCount) at System.ModuleHandle.ResolveMethodHandleInternalCore(RuntimeModule module, Int32 methodToken, IntPtr[] typeInstantiationContext, Int32 typeInstCount, IntPtr[] methodInstantiationContext, Int32 methodInstCount) at System.ModuleHandle.ResolveMethodHandleInternal(RuntimeModule module, Int32 methodToken, RuntimeTypeHandle[] typeInstantiationContext, RuntimeTypeHandle[] methodInstantiationContext) at System.Reflection.CustomAttributeData..ctor(RuntimeModule scope, CustomAttributeRecord caRecord) at System.Reflection.CustomAttributeData.GetCustomAttributes(RuntimeModule module, Int32 tkTarget) at System.Reflection.CustomAttributeData.GetCustomAttributesInternal(RuntimeAssembly target) at Xunit.Sdk.ReflectionAssemblyInfo.GetCustomAttributes(String assemblyQualifiedAttributeTypeName) at Xunit.Sdk.XunitTestFrameworkDiscoverer..ctor(IAssemblyInfo assemblyInfo, ISourceInformationProvider sourceProvider, IMessageSink diagnosticMessageSink, IXunitTestCollectionFactory collectionFactory) at Xunit.Sdk.XunitTestFramework.CreateDiscoverer(IAssemblyInfo assemblyInfo) at Xunit.Sdk.TestFramework.GetDiscoverer(IAssemblyInfo assemblyInfo) at Xunit.Xunit2Discoverer..ctor(AppDomainSupport appDomainSupport, ISourceInformationProvider sourceInformationProvider, IAssemblyInfo assemblyInfo, String assemblyFileName, String xunitExecutionAssemblyPath, String configFileName, Boolean shadowCopy, String shadowCopyFolder, IMessageSink diagnosticMessageSink, Boolean verifyAssembliesOnDisk) at Xunit.XunitFrontController.CreateInnerController() at Xunit.XunitFrontController.get_InnerController() at TestExplorer.Program.XunitDiscover(String fn, List`1 lst)