axodox / AxoCover

Nice and free .Net code coverage support for Visual Studio with OpenCover.
https://marketplace.visualstudio.com/items?itemName=axodox1.AxoCover
MIT License
248 stars 60 forks source link

Error running unit tests #193

Open AndreTeixeira3 opened 5 years ago

AndreTeixeira3 commented 5 years ago

When I run unit tests on my solution, I always get the error below. Can anyone help me ?

"< Could not execute tests. < SerializableException: Não foi possível carregar o tipo 'Microsoft.VisualStudio.TestTools.UnitTesting.DynamicDataAttribute' da assemblagem 'Microsoft.VisualStudio.TestPlatform.TestFramework, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. < < Server stack trace: < em System.ModuleHandle.ResolveType(RuntimeModule module, Int32 typeToken, IntPtr typeInstArgs, Int32 typeInstCount, IntPtr methodInstArgs, Int32 methodInstCount, ObjectHandleOnStack type) < em System.ModuleHandle.ResolveTypeHandleInternal(RuntimeModule module, Int32 typeToken, RuntimeTypeHandle[] typeInstantiationContext, RuntimeTypeHandle[] methodInstantiationContext) < em System.Reflection.RuntimeModule.ResolveType(Int32 metadataToken, Type[] genericTypeArguments, Type[] genericMethodArguments) < em System.Reflection.CustomAttribute.FilterCustomAttributeRecord(CustomAttributeRecord caRecord, MetadataImport scope, Assembly& lastAptcaOkAssembly, RuntimeModule decoratedModule, MetadataToken decoratedToken, RuntimeType attributeFilterType, Boolean mustBeInheritable, Object[] attributes, IList derivedAttributes, RuntimeType& attributeType, IRuntimeMethodInfo& ctor, Boolean& ctorHasParameters, Boolean& isVarArg) < em System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeModule decoratedModule, Int32 decoratedMetadataToken, Int32 pcaCount, RuntimeType attributeFilterType, Boolean mustBeInheritable, IList derivedAttributes, Boolean isDecoratedTargetSecurityTransparent) < em System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeMethodInfo method, RuntimeType caType, Boolean inherit) < em System.Reflection.RuntimeMethodInfo.GetCustomAttributes(Type attributeType, Boolean inherit) < em Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.Utilities.ReflectionUtility.GetCustomAttributes(MemberInfo memberInfo, Type type, Boolean inherit) < em Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.ReflectionOperations.GetCustomAttributes(MemberInfo memberInfo, Type type, Boolean inherit) < em Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.Helpers.ReflectHelper.GetCustomAttributes(MemberInfo memberInfo, Type type, Boolean inherit) < em Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.Helpers.ReflectHelper.IsAttributeDefined(MemberInfo memberInfo, Type attributeType, Boolean inherit) < em Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.Execution.TypeCache.IsAssemblyOrClassInitializeMethod(MethodInfo methodInfo, Type initializeAttributeType) < em Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.Execution.TypeCache.GetAssemblyInfo(Type type) < em Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.Execution.TypeCache.CreateClassInfo(Type classType, TestMethod testMethod) < em Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.Execution.TypeCache.GetClassInfo(TestMethod testMethod) < em Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.Execution.TypeCache.GetTestMethodInfo(TestMethod testMethod, ITestContext testContext, Boolean captureDebugTraces) < em Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.Execution.UnitTestRunner.RunSingleTest(TestMethod testMethod, IDictionary2 testRunParameters) < em System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Object[]& outArgs) < em System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg) < < Exception rethrown at [0]: < em System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg) < em System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type) < em Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.Execution.UnitTestRunner.RunSingleTest(TestMethod testMethod, IDictionary2 testRunParameters) < em Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.Execution.TestExecutionManager.ExecuteTestsWithTestRunner(IEnumerable1 tests, IRunContext runContext, ITestExecutionRecorder testExecutionRecorder, String source, UnitTestRunner testRunner) < em Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.Execution.TestExecutionManager.ExecuteTestsInSource(IEnumerable1 tests, IRunContext runContext, IFrameworkHandle frameworkHandle, String source, Boolean isDeploymentDone) < em Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.Execution.TestExecutionManager.ExecuteTests(IEnumerable1 tests, IRunContext runContext, IFrameworkHandle frameworkHandle, Boolean isDeploymentDone) < em Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.Execution.TestExecutionManager.RunTests(IEnumerable1 tests, IRunContext runContext, IFrameworkHandle frameworkHandle, TestRunCancellationToken runCancellationToken) < em Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.MSTestExecutor.RunTests(IEnumerable1 tests, IRunContext runContext, IFrameworkHandle frameworkHandle) < em AxoCover.Runner.TestExecutionService.<>c__DisplayClass6_0.<RunTestsWorker>b__0() em C:\projects\axotools\AxoCover.Runner\TestExecutionService.cs:line 124 < em AxoCover.Runner.NativeServices.ExecuteWithFileRedirectionInternal(TestAdapterOptions adapterOptions, Action action, Action2 log) em C:\projects\axotools\AxoCover.Runner\NativeServices.cs:line 88 < em AxoCover.Runner.NativeServices.<>c__DisplayClass2_0.b__0() em C:\projects\axotools\AxoCover.Runner\NativeServices.cs:line 18 < em AxoCover.Runner.NativeServices.ExecuteCall(Action action, Action2 log) em C:\projects\axotools\AxoCover.Runner\NativeServices.cs:line 44 < em AxoCover.Runner.NativeServices.ExecuteWithFileRedirection(TestAdapterOptions adapterOptions, Action action, Action2 log) em C:\projects\axotools\AxoCover.Runner\NativeServices.cs:line 18 < em AxoCover.Runner.TestExecutionService.RunTestsWorker(TestExecutionTask[] executionTasks, TestExecutionOptions options) em C:\projects\axotools\AxoCover.Runner\TestExecutionService.cs:line 114 Shutting down... Exiting... Test execution finished. "

luturol commented 5 years ago

Hi, I had the same issue. I solved after reinstalling axocover.