我想在不安装VS2012的情况下在另一台机器上运行WcfTestClient(包含在VS2012中的WcfTestClient)。这可能吗?在我的机器已经安装了.NET 4.5,但是当我尝试添加Web服务它给了我下面的堆栈跟踪:无法在复制到另一台机器时在WcfTestClient中添加服务
************** Exception Text **************
System.NullReferenceException: Object reference not set to an instance of an object.
at Microsoft.Tools.Common.SdkPathUtility.GetRegistryValue(String registryPath, String registryValueName)
at Microsoft.Tools.Common.SdkPathUtility.GetSdkPath(Version targetFrameworkVersion)
at Microsoft.Tools.TestClient.ToolingEnvironment.get_MetadataTool()
at Microsoft.Tools.TestClient.ServiceAnalyzer.GenerateProxyAndConfig(String projectPath, String address, String configPath, String proxyPath, Int32 startProgressPosition, Int32 endProgressPostition, BackgroundWorker addServiceWorker, String& errorMessage)
at Microsoft.Tools.TestClient.ServiceAnalyzer.AnalyzeService(String address, BackgroundWorker addServiceWorker, Single startProgress, Single progressRange, String& errorMessage)
at Microsoft.Tools.TestClient.Workspace.AddServiceProject(String endpoint, BackgroundWorker addServiceWorker, Single startProgress, Single progressRange, String& error)
at Microsoft.Tools.TestClient.AddServiceExecutor.Execute(AddServiceInputs inputs, Workspace workspace, BackgroundWorker addServiceWorker)
at Microsoft.Tools.TestClient.UI.MainForm.addServiceWorker_DoWork(Object sender, DoWorkEventArgs e)
at System.ComponentModel.BackgroundWorker.OnDoWork(DoWorkEventArgs e)
at System.ComponentModel.BackgroundWorker.WorkerThreadStart(Object argument)
在WcfTestClient文件夹中我只有2个文件,有我需要的任何其他文件包括? WcfTestClient.exe WcfTestClient.exe.config
两者都直接从VS2012 IDE文件夹中复制。
我也一样,没有线索。 – abatishchev 2013-05-17 20:24:46
您是否尝试过使用[Process Explorer](http://technet.microsoft.com/zh-cn/sysinternals/bb896653.aspx)查看测试客户端正在加载哪些dll?这可能会给你一个线索,你可能会错过什么。 – Tombala 2013-05-17 20:30:41
呵呵,实际上看着堆栈跟踪,它试图读取SDK特定的注册表项。没有我认为的WCF SDK,它带有VS,所以你可能会失败。 – Tombala 2013-05-17 20:32:38