在没有Visual Studio的情况下如何使用Wcf测试客户端? [英] How can the Wcf Test Client be used without Visual Studio?

查看:429
本文介绍了在没有Visual Studio的情况下如何使用Wcf测试客户端?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

将WcfTestClient.exe自身复制到另一台计算机时,运行时错误会阻止您连接到WCF服务,例如:

When WcfTestClient.exe is copied to another machine by itself, runtime errors prevent you from connecting to a WCF service, for example:

System.IO.FileNotFoundException:无法加载文件或程序集"Microsoft.Build.Utilities.Core,版本= 15.0.0.0,Culture = neutral,PublicKeyToken = b03f5f7f11d50a3a"或其依赖项之一.系统找不到指定的文件.

System.IO.FileNotFoundException: Could not load file or Assembly 'Microsoft.Build.Utilities.Core, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.

如何在不安装Visual Studio的情况下使用此工具?

How can this tool be used without installing Visual Studio?

推荐答案

要将WCFTestClient.exe作为独立的应用程序运行(无需安装完整版本的Visual Studio 2010):

To run WCFTestClient.exe as a standalone appplication (without install a full version of Visual Studio 2010):

  1. dest.机器中创建目录,然后在其中(仅该文件)复制wcftestclient.exe.
  2. 将Microsoft.VisualStudio.VirtualTreeGrid.dll(版本10)从下面的文件复制到dest.计算机中的wcftestclient.exe的同一目录中.

  1. Create a directory in the dest. machine and copy wcftestclient.exe there (only that file).
  2. Copy Microsoft.VisualStudio.VirtualTreeGrid.dll (version 10) from file below to same directory of wcftestclient.exe in the dest. machine.

C:\Windows\Microsoft.NET\assembly\GAC_MSIL\Microsoft.VisualStudio.VirtualTreeGrid\v4.0_10.0.0.0__b03f5f7f11d50a3a

  • 您将在目标计算机中创建以下两个注册表项:

  • You would create in your destination machine the following two registry keys:

    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.0A\WinSDK-NetFx40Tools-x64]
    "InstallationFolder"="\"
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.0A\WinSDK-NetFx40Tools-x86]
    "InstallationFolder"="\"
    

    步骤说明:您可以从开发计算机中将它们导出(也许可以找到其他版本,但请先尝试使用v7.0A).

    Step note: You could export them from your development machine (maybe you could find another version, but please try with v7.0A first).

    然后,您需要从以下位置进行复制:

    Then you will need copy from:

    C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin\NETFX 4.0 Tools\svcutil.exe
    

    到目标计算机(与wcftestclient.exe相同的目录)

    to your destination machine (same directory as wcftestclient.exe)

    步骤说明:此版本的svcutil.exe

    运行wcftestclient.exe

    最后的提示:您只需要两个.exe文件和一个.dll (wcftestclient.exe, svcutil.exe and Microsoft.VisualStudio.VirtualTreeGrid.dll)即可运行该应用程序.

    Final notes: You will need only two .exe files and one .dll (wcftestclient.exe, svcutil.exe and Microsoft.VisualStudio.VirtualTreeGrid.dll) to run the application.

    更多信息

    这篇关于在没有Visual Studio的情况下如何使用Wcf测试客户端?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

  • 查看全文
    相关文章
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆