.netwcfvisual-studio-2012exceptionwcftestclient

Unable to add service in WcfTestClient when copy to a different machine


I'd like to run WcfTestClient (one that's included with VS2012) on a different machine without installing VS2012. Is this possible? On the machine I've installed .NET 4.5 but when I try to add web services it gives me the following stack trace:

************** 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)

In the WcfTestClient folder I only have 2 files, is there any other files I need to include? WcfTestClient.exe WcfTestClient.exe.config

Both are copied directly from the VS2012 IDE folder.


Solution

  • The WCFTestClient must be run on a computer with the SDK installed. Not only does it look in the registry to find the location of the SDK, but it also runs the svcutil from the SDK to generate the proxy classes to connect at runtime.