I am developing a Win 8 metro app using the Bing Search API for Azure data market. I have included the BingSearchContainer.cs from the Bing Azure website in my app. This class requires the reference to
system.Data.Services.Client, so I have included this in the project. The reference assembly is from "C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Data.Services.Client.dll".
The app compiles successfully, but when I run the app, I get the following error.
"Could not load file or assembly 'System.Data.Services.Client, Version=184.108.40.206, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. T
he system cannot find the file specified."
The Bing Search API doesn't need to add a service reference in Visual Studio, I implemented this in Windows Phone 7 using the migration guide provided in the below link. They have provided a Proxy which can be downloaded.
The project needs System.Data.Services.Clientwhich is used by the proxy, so this needs to be added a Dependency reference. While this worked for me Silverlight (WP7), its not working in Metro. The above examples are for .NET/C# console applications.
So, I added then System.Configuration from
C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5, v4.0
and v3.5. In all cases I get:
C:\Program Files (x86)\MSBuild\Microsoft\WindowsXaml\v11.0\Microsoft.Windows.UI.Xaml.Common.targets(255,9): Xaml Internal Error error WMC9999:
Cannot find type System.ServiceModel.Web.WebServiceHost in module System.ServiceModel.Web.dll.
The only dll that contains the requested type (System.ServiceModel.Web.WebServiceHost) is
C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\v3.5\System.ServiceModel.Web.dll, but I cannot add a reference to it. VS11 says that it is automatically referenced by the build system. But, I bet that it is referencing
the version 4 or 5 of the same, none of which contains the required class.
Ran into a wall :(
Edited byAndrés STuesday, September 04, 2012 1:35 AM
Edited byAndrés STuesday, September 04, 2012 1:38 AM
Edited byAndrés STuesday, September 04, 2012 1:38 AMreadability
Edited byAndrés STuesday, September 04, 2012 1:38 AMimproved readability