Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not working in Unity 2022. #4

Open
choeehb opened this issue Mar 16, 2024 · 6 comments
Open

Not working in Unity 2022. #4

choeehb opened this issue Mar 16, 2024 · 6 comments

Comments

@choeehb
Copy link

choeehb commented Mar 16, 2024

hello. I'm really enjoying using the adapter you made. Unfortunately ncrunch is not working after updating my Unity version. Do you know how to solve it? thank you May you be blessed.

Below is my error message. I don't know how to make the error message in English. sorry.

If my issue is offensive, please feel free to delete it. thanks

An error occurred while analysing this project after it was built: System.BadImageFormatException: 파일이나 어셈블리 'netstandard, Version=2.1.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' 또는 여기에 종속되어 있는 파일이나 어셈블리 중 하나를 로드할 수 없습니다. 참조 어셈블리를 로드하여 실행하지 않아야 합니다. 참조 어셈블리는 리플렉션 전용 로더 컨텍스트에서만 로드할 수 있습니다. (예외가 발생한 HRESULT: 0x80131058)
파일 이름: 'netstandard, Version=2.1.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' ---> System.BadImageFormatException: 실행할 참조 어셈블리를 로드할 수 없습니다.
   위치: System.Reflection.CustomAttribute._CreateCaObject(RuntimeModule pModule, IRuntimeMethodInfo pCtor, Byte** ppBlob, Byte* pEndBlob, Int32* pcNamedArgs)
   위치: System.Reflection.CustomAttribute.CreateCaObject(RuntimeModule module, IRuntimeMethodInfo ctor, IntPtr& blob, IntPtr blobEnd, Int32& namedArgs)
   위치: System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeModule decoratedModule, Int32 decoratedMetadataToken, Int32 pcaCount, RuntimeType attributeFilterType, Boolean mustBeInheritable, IList derivedAttributes, Boolean isDecoratedTargetSecurityTransparent)
   위치: System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeAssembly assembly, RuntimeType caType)
   위치: System.Reflection.RuntimeAssembly.GetCustomAttributes(Boolean inherit)
   위치: nCrunch.Module.NUnit3.Integration.NUnit3FrameworkInteractor..ctor(ReflectedAssembly assembly, IList`1 referencedAssemblyFilePaths, ComponentUniqueName testComponentUniqueName, DynamicProxy[] dynamicProxies)
   위치: nCrunch.Module.NUnit3.Integration.NUnit3FrameworkRuntimeEnvironment.FindFrameworkTestsInAssembly(ReflectedAssembly assembly, FilePath assemblyFilePath, IList`1 referencedAssemblyFilePaths, ComponentUniqueName testComponentUniqueName, PlatformType platformType, DynamicProxy[] dynamicProxies)
   위치: nCrunch.TestExecution.TestFinder.�.�()
   위치: nCrunch.Common.PerformanceTracking.PerfTracker.TrackActivity(String name, Action activity)
   위치: nCrunch.TestExecution.TestFinder.�.�()
   위치: nCrunch.Common.PerformanceTracking.PerfTracker.TrackActivity(String name, Action activity)
   위치: nCrunch.TestExecution.TestFinder.FindTestsForFrameworks(ReflectedAssembly assembly, FilePath assemblyFilePath, IList`1 referencedAssemblyFilePaths, DescribedTestFrameworkDiscoverer[] describedDiscoverers, ComponentUniqueName testComponentUniqueName, PlatformType platformType, DynamicProxy[] dynamicProxies)
   위치: nCrunch.TestExecution.RemoteTaskRunner.AnalyseAssembly(DescribedTestFrameworkDiscoverer[] applicableFrameworks, ComponentUniqueName testComponentUniqueName, PerfTracker perfTracker)

Below is an error message using a translator.

An error occurred while analyzing this project after it was built: System.BadImageFormatException: Unable to load file or assembly 'netstandard, Version=2.1.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. You can not. Reference assemblies should not be loaded and run. Reference assemblies can only be loaded in a reflection-only loader context. (HRESULT where exception occurred: 0x80131058)
Filename: 'netstandard, Version=2.1.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' ---> System.BadImageFormatException: Unable to load reference assembly for execution.
    Location: System.Reflection.CustomAttribute._CreateCaObject(RuntimeModule pModule, IRuntimeMethodInfo pCtor, Byte** ppBlob, Byte* pEndBlob, Int32* pcNamedArgs)
    Location: System.Reflection.CustomAttribute.CreateCaObject(RuntimeModule module, IRuntimeMethodInfo ctor, IntPtr& blob, IntPtr blobEnd, Int32& namedArgs)
    Location: System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeModule decoratedModule, Int32 decoratedMetadataToken, Int32 pcaCount, RuntimeType attributeFilterType, Boolean mustBeInheritable, IList derivedAttributes, Boolean isDecoratedTargetSecurityTransparent)
    Location: System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeAssembly assembly, RuntimeType caType)
    Location: System.Reflection.RuntimeAssembly.GetCustomAttributes(Boolean inherit)
    Location: nCrunch.Module.NUnit3.Integration.NUnit3FrameworkInteractor..ctor(ReflectedAssembly assembly, IList`1 referencedAssemblyFilePaths, ComponentUniqueName testComponentUniqueName, DynamicProxy[] dynamicProxies)
    Location: nCrunch.Module.NUnit3.Integration.NUnit3FrameworkRuntimeEnvironment.FindFrameworkTestsInAssembly(ReflectedAssembly assembly, FilePath assemblyFilePath, IList`1 referencedAssemblyFilePaths, ComponentUniqueName testComponentUniqueName, PlatformType platformType, DynamicProxy[] dynamicProxies)
    Location: nCrunch.TestExecution.TestFinder..()
    Location: nCrunch.Common.PerformanceTracking.PerfTracker.TrackActivity(String name, Action activity)
    Location: nCrunch.TestExecution.TestFinder..()
    Location: nCrunch.Common.PerformanceTracking.PerfTracker.TrackActivity(String name, Action activity)
    Location: nCrunch.TestExecution.TestFinder.FindTestsForFrameworks(ReflectedAssembly assembly, FilePath assemblyFilePath, IList`1 referencedAssemblyFilePaths, DescribedTestFrameworkDiscoverer[] describedDiscoverers, ComponentUniqueName testComponentUniqueName, PlatformType platformType, DynamicProxy[] dynamicProxies)
    Location: nCrunch.TestExecution.RemoteTaskRunner.AnalyseAssembly(DescribedTestFrameworkDiscoverer[] applicableFrameworks, ComponentUniqueName testComponentUniqueName, PerfTracker perfTracker)
@networm
Copy link
Owner

networm commented Mar 18, 2024

I think you should add a breakpoint to nCrunch.Module.NUnit3.Integration.NUnit3FrameworkInteractor..ctor to know what happened.

@choeehb
Copy link
Author

choeehb commented Mar 19, 2024

Thank you so much for your reply! Do you know how to debug ncrunch code that is not mine by setting a breakpoint?

@networm
Copy link
Owner

networm commented Mar 19, 2024

Using Rider to setting a breakpoint on dessembled dll.

@networm
Copy link
Owner

networm commented Mar 19, 2024

I didn't use it for a long time, so you should try to fix it yourself.

@choeehb
Copy link
Author

choeehb commented Mar 20, 2024

thank you I will leave a comment when I resolve it.
Should I close the issue?

@networm
Copy link
Owner

networm commented Mar 20, 2024

No you shouldn't. Just close issue when resolved it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants