R
Rnij
Guest
I am getting an error when I run a build on the windows server with Visual Studio 2017 community edition installed.
Could not load file or assembly 'Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
I was able to successfully run the same build on a local machine that has Visual studio 2015 installed. Why does it give me that error and not work on the windows server?
Logs:
2018-07-18T14:30:34.5669298Z ##[section]Starting: Test Plan association
2018-07-18T14:30:34.5669298Z ==============================================================================
2018-07-18T14:30:34.5669298Z Task : Test Plan association for Java tests
2018-07-18T14:30:34.5669298Z Description : Associate Java tests results to Test Plan items
2018-07-18T14:30:34.5669298Z Version : 1.1.13
2018-07-18T14:30:34.5669298Z Author : Gianluca Bertelli
2018-07-18T14:30:34.5669298Z Help : This task allows you to associate Java method tests to Test Plan work items, it creates a dynamic .NET library that can be used to read the Java test result during a Test Plan execution. This task must be executed after a Maven build and expects the test results to be in the form TEST-ClassName.MethodName.xml. You need to provide a JSON that maps each java test with a test plan workitem (ID)
2018-07-18T14:30:34.5669298Z ==============================================================================
2018-07-18T14:30:36.5830925Z Using file C:\agent\_work\7\s\ePresentment\map.json for JSON mapping
2018-07-18T14:30:36.9424760Z -----------------------
2018-07-18T14:30:36.9581007Z Config
2018-07-18T14:30:36.9581007Z -----------------------
2018-07-18T14:30:36.9581007Z Tests path= C:\agent\_work\7\s\ePresentment\target\surefire-reports
2018-07-18T14:30:36.9581007Z Project name (var)= QAAutomation
2018-07-18T14:30:36.9581007Z Visual Studio Account name (var)= http://asp101:8080/tfs/LanveraDevelopment/
2018-07-18T14:30:36.9581007Z Output folder= C:\agent\_work\7\s\target
2018-07-18T14:30:36.9737273Z Setting working directory to 'bin'.
2018-07-18T14:30:36.9737273Z Creation of dynamic .NET DLL using ROSLYN...
2018-07-18T14:30:36.9737273Z -------------------------------------------------
2018-07-18T14:30:37.0206028Z ##[command]".\UnitTestGenerator\Microsoft.DX.JavaTestBridge.UnitTestGenerator.exe" AutomatedTestAssembly "C:\agent\_work\7\s\ePresentment\map.json" C:\agent\_work\7\s\ePresentment\target\surefire-reports
2018-07-18T14:30:40.9589283Z Microsoft.DX.JavaTestBridge.UnitTestGenerator.exe Information: 0 : SUCCESS!
2018-07-18T14:30:40.9589283Z C:\agent\_work\_tasks\JavaTestBridgeForTestPlan_d57ab29a-be69-431f-8523-e4bd1b170eb8\1.1.13\bin\AutomatedTestAssembly.dll written to disk.
2018-07-18T14:30:40.9589283Z Tests created: 382
2018-07-18T14:30:40.9589283Z Done.
2018-07-18T14:30:40.9745540Z .NET Unit test assembly created (AutomatedTestAssembly.dll)
2018-07-18T14:30:40.9745540Z Association of tests with VSTS...
2018-07-18T14:30:40.9745540Z -------------------------------------------------
2018-07-18T14:30:40.9745540Z ##[command]".\VSTS\Microsoft.DX.JavaTestBridge.VSTS.exe" http://asp101:8080/tfs/LanveraDevelopment/ QAAutomation AutomatedTestAssembly.dll ttran XXXXXX/
2018-07-18T14:30:41.2089338Z Microsoft.DX.JavaTestBridge.VSTS.exe Information: 0 : Connecting to VSTS http://asp101:8080/tfs/LanveraDevelopment/, Project: QAAutomation
2018-07-18T14:30:41.2089338Z Microsoft.DX.JavaTestBridge.VSTS.exe Information: 0 : Connecting to VSTS with Windows Credential
2018-07-18T14:30:41.9277073Z Microsoft.DX.JavaTestBridge.VSTS.exe Information: 0 : project QAAutomation found
2018-07-18T14:30:41.9745805Z Microsoft.DX.JavaTestBridge.VSTS.exe Error: 0 : Could not load file or assembly 'Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
2018-07-18T14:30:42.0370802Z Microsoft.DX.JavaTestBridge.VSTS.exe Error: 0 : at System.ModuleHandle.ResolveType(RuntimeModule module, Int32 typeToken, IntPtr* typeInstArgs, Int32 typeInstCount, IntPtr* methodInstArgs, Int32 methodInstCount, ObjectHandleOnStack type)
2018-07-18T14:30:42.0370802Z at System.ModuleHandle.ResolveTypeHandleInternal(RuntimeModule module, Int32 typeToken, RuntimeTypeHandle[] typeInstantiationContext, RuntimeTypeHandle[] methodInstantiationContext)
2018-07-18T14:30:42.0370802Z at System.Reflection.RuntimeModule.ResolveType(Int32 metadataToken, Type[] genericTypeArguments, Type[] genericMethodArguments)
2018-07-18T14:30:42.0370802Z at 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)
2018-07-18T14:30:42.0370802Z at System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeModule decoratedModule, Int32 decoratedMetadataToken, Int32 pcaCount, RuntimeType attributeFilterType, Boolean mustBeInheritable, IList derivedAttributes, Boolean isDecoratedTargetSecurityTransparent)
2018-07-18T14:30:42.0370802Z at System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeMethodInfo method, RuntimeType caType, Boolean inherit)
2018-07-18T14:30:42.0370802Z at System.Reflection.RuntimeMethodInfo.GetCustomAttributes(Type attributeType, Boolean inherit)
2018-07-18T14:30:42.0370802Z at System.Attribute.GetCustomAttributes(MemberInfo element, Type type, Boolean inherit)
2018-07-18T14:30:42.0370802Z at System.Attribute.GetCustomAttribute(MemberInfo element, Type attributeType, Boolean inherit)
2018-07-18T14:30:42.0370802Z at System.Attribute.GetCustomAttribute(MemberInfo element, Type attributeType)
2018-07-18T14:30:42.0370802Z at Microsoft.DX.JavaTestBridge.VSTS.Program.DiscoverAutomatedTests(FileInfo assemblyFile) in C:\TFS\GIT\VSTSIntegration\src\C#\Microsoft.DX.JavaTestBridge.VSTS\Program.cs:line 91
2018-07-18T14:30:42.0370802Z at Microsoft.DX.JavaTestBridge.VSTS.Program.Main(String[] args) in C:\TFS\GIT\VSTSIntegration\src\C#\Microsoft.DX.JavaTestBridge.VSTS\Program.cs:line 29
2018-07-18T14:30:42.3027118Z ##[error]Process 'Microsoft.DX.JavaTestBridge.VSTS.exe' exited with code '-2'.
2018-07-18T14:30:42.3339589Z ##[section]Finishing: Test Plan association
Continue reading...
Could not load file or assembly 'Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
I was able to successfully run the same build on a local machine that has Visual studio 2015 installed. Why does it give me that error and not work on the windows server?
Logs:
2018-07-18T14:30:34.5669298Z ##[section]Starting: Test Plan association
2018-07-18T14:30:34.5669298Z ==============================================================================
2018-07-18T14:30:34.5669298Z Task : Test Plan association for Java tests
2018-07-18T14:30:34.5669298Z Description : Associate Java tests results to Test Plan items
2018-07-18T14:30:34.5669298Z Version : 1.1.13
2018-07-18T14:30:34.5669298Z Author : Gianluca Bertelli
2018-07-18T14:30:34.5669298Z Help : This task allows you to associate Java method tests to Test Plan work items, it creates a dynamic .NET library that can be used to read the Java test result during a Test Plan execution. This task must be executed after a Maven build and expects the test results to be in the form TEST-ClassName.MethodName.xml. You need to provide a JSON that maps each java test with a test plan workitem (ID)
2018-07-18T14:30:34.5669298Z ==============================================================================
2018-07-18T14:30:36.5830925Z Using file C:\agent\_work\7\s\ePresentment\map.json for JSON mapping
2018-07-18T14:30:36.9424760Z -----------------------
2018-07-18T14:30:36.9581007Z Config
2018-07-18T14:30:36.9581007Z -----------------------
2018-07-18T14:30:36.9581007Z Tests path= C:\agent\_work\7\s\ePresentment\target\surefire-reports
2018-07-18T14:30:36.9581007Z Project name (var)= QAAutomation
2018-07-18T14:30:36.9581007Z Visual Studio Account name (var)= http://asp101:8080/tfs/LanveraDevelopment/
2018-07-18T14:30:36.9581007Z Output folder= C:\agent\_work\7\s\target
2018-07-18T14:30:36.9737273Z Setting working directory to 'bin'.
2018-07-18T14:30:36.9737273Z Creation of dynamic .NET DLL using ROSLYN...
2018-07-18T14:30:36.9737273Z -------------------------------------------------
2018-07-18T14:30:37.0206028Z ##[command]".\UnitTestGenerator\Microsoft.DX.JavaTestBridge.UnitTestGenerator.exe" AutomatedTestAssembly "C:\agent\_work\7\s\ePresentment\map.json" C:\agent\_work\7\s\ePresentment\target\surefire-reports
2018-07-18T14:30:40.9589283Z Microsoft.DX.JavaTestBridge.UnitTestGenerator.exe Information: 0 : SUCCESS!
2018-07-18T14:30:40.9589283Z C:\agent\_work\_tasks\JavaTestBridgeForTestPlan_d57ab29a-be69-431f-8523-e4bd1b170eb8\1.1.13\bin\AutomatedTestAssembly.dll written to disk.
2018-07-18T14:30:40.9589283Z Tests created: 382
2018-07-18T14:30:40.9589283Z Done.
2018-07-18T14:30:40.9745540Z .NET Unit test assembly created (AutomatedTestAssembly.dll)
2018-07-18T14:30:40.9745540Z Association of tests with VSTS...
2018-07-18T14:30:40.9745540Z -------------------------------------------------
2018-07-18T14:30:40.9745540Z ##[command]".\VSTS\Microsoft.DX.JavaTestBridge.VSTS.exe" http://asp101:8080/tfs/LanveraDevelopment/ QAAutomation AutomatedTestAssembly.dll ttran XXXXXX/
2018-07-18T14:30:41.2089338Z Microsoft.DX.JavaTestBridge.VSTS.exe Information: 0 : Connecting to VSTS http://asp101:8080/tfs/LanveraDevelopment/, Project: QAAutomation
2018-07-18T14:30:41.2089338Z Microsoft.DX.JavaTestBridge.VSTS.exe Information: 0 : Connecting to VSTS with Windows Credential
2018-07-18T14:30:41.9277073Z Microsoft.DX.JavaTestBridge.VSTS.exe Information: 0 : project QAAutomation found
2018-07-18T14:30:41.9745805Z Microsoft.DX.JavaTestBridge.VSTS.exe Error: 0 : Could not load file or assembly 'Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
2018-07-18T14:30:42.0370802Z Microsoft.DX.JavaTestBridge.VSTS.exe Error: 0 : at System.ModuleHandle.ResolveType(RuntimeModule module, Int32 typeToken, IntPtr* typeInstArgs, Int32 typeInstCount, IntPtr* methodInstArgs, Int32 methodInstCount, ObjectHandleOnStack type)
2018-07-18T14:30:42.0370802Z at System.ModuleHandle.ResolveTypeHandleInternal(RuntimeModule module, Int32 typeToken, RuntimeTypeHandle[] typeInstantiationContext, RuntimeTypeHandle[] methodInstantiationContext)
2018-07-18T14:30:42.0370802Z at System.Reflection.RuntimeModule.ResolveType(Int32 metadataToken, Type[] genericTypeArguments, Type[] genericMethodArguments)
2018-07-18T14:30:42.0370802Z at 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)
2018-07-18T14:30:42.0370802Z at System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeModule decoratedModule, Int32 decoratedMetadataToken, Int32 pcaCount, RuntimeType attributeFilterType, Boolean mustBeInheritable, IList derivedAttributes, Boolean isDecoratedTargetSecurityTransparent)
2018-07-18T14:30:42.0370802Z at System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeMethodInfo method, RuntimeType caType, Boolean inherit)
2018-07-18T14:30:42.0370802Z at System.Reflection.RuntimeMethodInfo.GetCustomAttributes(Type attributeType, Boolean inherit)
2018-07-18T14:30:42.0370802Z at System.Attribute.GetCustomAttributes(MemberInfo element, Type type, Boolean inherit)
2018-07-18T14:30:42.0370802Z at System.Attribute.GetCustomAttribute(MemberInfo element, Type attributeType, Boolean inherit)
2018-07-18T14:30:42.0370802Z at System.Attribute.GetCustomAttribute(MemberInfo element, Type attributeType)
2018-07-18T14:30:42.0370802Z at Microsoft.DX.JavaTestBridge.VSTS.Program.DiscoverAutomatedTests(FileInfo assemblyFile) in C:\TFS\GIT\VSTSIntegration\src\C#\Microsoft.DX.JavaTestBridge.VSTS\Program.cs:line 91
2018-07-18T14:30:42.0370802Z at Microsoft.DX.JavaTestBridge.VSTS.Program.Main(String[] args) in C:\TFS\GIT\VSTSIntegration\src\C#\Microsoft.DX.JavaTestBridge.VSTS\Program.cs:line 29
2018-07-18T14:30:42.3027118Z ##[error]Process 'Microsoft.DX.JavaTestBridge.VSTS.exe' exited with code '-2'.
2018-07-18T14:30:42.3339589Z ##[section]Finishing: Test Plan association
Continue reading...