简体   繁体   English

解决Fabric Client时解决Service Pack的VSTS中集成测试失败的建议

[英]Suggestions to resolve integration tests failure in VSTS for Service Fabric, while acessing Fabric Client

I have a Simple test 我有一个简单的测试

public void TestCertificateThumbprint()
        {
            var xc = GetCredentials(this.clientCertThumb, this.serverCertThumb, this.commonName);
            var fc = new FabricClient(xc, this.connection);

        try
        {
            var ret = fc.ClusterManager.GetClusterManifestAsync().Result;
            Assert.IsNotNull(ret);
        }
        catch (Exception e)
        {
            Console.WriteLine("Connect failed: {0}", e.Message);
            Assert.IsNull(e);
        }

        Assert.IsTrue(true);
    }

I encountered no issues running this test against azure cluster in cloud from my local but through VSTS, running into Issues 我没有遇到从本地而是通过VSTS针对云中的Azure集群运行此测试的问题,遇到了问题

Test method TestCertificateThumbprint threw exception: 测试方法TestCertificateThumbprint抛出异常:

System.BadImageFormatException: Could not load file or assembly 'System.Fabric, Version=6.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. An attempt was made to load a program with an incorrect format.

I have checked the versions, They are valid and they are fetched in the nuget restore build task of VSTS ( based on log file console output) 我已经检查了版本,它们是有效的,并且已在VSTS的nuget restore构建任务中获取(基于日志文件控制台输出)

Environment: VS 2017, Azure Service Fabric, Unit tests, Package : Microsoft.ServiceFabric.6.0.232 环境:VS 2017,Azure服务结构,单元测试,程序包:Microsoft.ServiceFabric.6.0.232

Make sure that your project is targeting x64 as all Service Fabric assemblies are compiled to x64 and Azure Service Fabric only supports x64 platform. 确保您的项目针对x64,因为所有Service Fabric程序集都被编译为x64,并且Azure Service Fabric仅支持x64平台。

Refer the below SO link for more information. 请参阅下面的SO链接以获取更多信息。

Service Fabric System.BadImageFormatException 服务结构System.BadImageFormatException

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在没有TFS或VSTS的情况下自动部署Service Fabric项目 - Automate deployment of Service Fabric project without TFS or VSTS 我们如何在服务结构(无状态服务)上执行集成测试? - How we can perform integration test on service fabric (stateless service)? 如何使用tfs 2013与服务架构持续集成? - how to do continuous integration with service fabric with tfs 2013? 服务结构服务远程处理 - Service Fabric Service Remoting 天蓝色结构服务之外的客户端如何使用WCF服务 - How can the WCF service be consumed by a client that is outside the azure fabric service 构建Service Fabric Web Api时,获取错误无法从Fabric.StatelessServiceContext转换为Fabric.ServiceInitializationParameters - Getting error cannot convert from Fabric.StatelessServiceContext to Fabric.ServiceInitializationParameters while building Service Fabric Web Api Azure Service Fabric无法使用ASP.NET Core在VSTS上执行CI - Azure Service Fabric unable to do CI on VSTS with ASP.NET Core 在 Service Fabric 应用程序中禁用 TLS 握手客户端证书请求 - Disable TLS Handshake Client Certificate Request in Service Fabric Application 服务结构和IConfigurationBuilder - Service Fabric and IConfigurationBuilder 服务结构调试 - Service Fabric Debugging
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM