Unable to add Service References after adding Microsoft.Practices.EnterpriseLibrary.Common.Silverlight.dll to the Silverlight project.

Topics: Caching Application Block , Silverlight Integration Pack
Jul 20, 2012 at 4:25 PM

Hi,

I am trying to use the Silverlight Integration pack. I have Silverlight Application which has Service References to WCF services which inturn connect to database using Entity Framework. Everything was working fine till now. But after adding the Microsoft.Practices.EnterpriseLibrary.Common.Silverlight.dll to my Silverlight application all my existing Services References are not working and when I try to add new service references nothing is being created in the reference.cs file under the service reference folder. Once I delete the dll every thing again works fine. On the other hand I canadd a plain WCF Service reference without any Entity Framework DB calls. I dont know what is wrong with it. Any help is highly appreciated. I really like to use the Enterprise library. Please help.

 

Thanks,

Maddy.

Jul 23, 2012 at 9:06 PM

Hi All,

Any help is highly appreciated.

 

Thanks,

Maddy

 

Jul 23, 2012 at 11:55 PM

It sounds like there may be something wrong with the WCF services.  Can you browse using a web browser to the service file (*.svc) and view the WSDL?  If this does not work then add service reference will not work but usually you will see an error when attempting to add a service reference.

It's hard to understand what is going on since adding a reference to an assembly (without changing any code or configuration) should not cause any issues.  Is the service throwing an exception?

Failing that I would recommend assembling a solution that reproduces the issue.

--
Randy Levy
Enterprise Library support engineer
entlib.support@live.com 

Jul 24, 2012 at 4:38 PM
randylevy wrote:

It sounds like there may be something wrong with the WCF services.  Can you browse using a web browser to the service file (*.svc) and view the WSDL?  If this does not work then add service reference will not work but usually you will see an error when attempting to add a service reference.

It's hard to understand what is going on since adding a reference to an assembly (without changing any code or configuration) should not cause any issues.  Is the service throwing an exception?

Failing that I would recommend assembling a solution that reproduces the issue.

--
Randy Levy
Enterprise Library support engineer
entlib.support@live.com 

Hi Randy,

 

Thanks for the reply. As I told you earlier these WCF services are existing services and I am able to browse them using web browser.

I will assemle a solution for you. to which email id would you like me to forward my solution?

Thanks,

Madhu.

Jul 24, 2012 at 5:12 PM

You can send the solution to entlib.support@live.com.

--
Randy Levy
Enterprise Library support engineer
entlib.support@live.com 

Jul 24, 2012 at 8:33 PM
randylevy wrote:

You can send the solution to entlib.support@live.com.

--
Randy Levy
Enterprise Library support engineer
entlib.support@live.com 


Hi randylevy,

I emailed you my solution. Let me know if you need additional information. Thanks you.

Jul 25, 2012 at 4:53 AM

Thanks for the sample solution.  The message I'm seeing when trying to add a service reference is:

Warning 1 Custom tool warning: Could not load file or assembly 'System.Xml, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e' or one of its dependencies. The system cannot find the file specified. 

I'm not entirely sure what the root cause is but it looks like it has to do with the fact that Enterprise Library is referencing System.Xml Version 2.0.5.0 but the solution is referencing version 5.0.5.0.

The solution is to go to the advanced properties when adding a service reference and un-check the Reuse types in referenced assemblies. In the sample project this does not affect the generated code.

--
Randy Levy
Enterprise Library support engineer
entlib.support@live.com 

Jul 25, 2012 at 4:44 PM
randylevy wrote:

Thanks for the sample solution.  The message I'm seeing when trying to add a service reference is:

 

Warning 1 Custom tool warning: Could not load file or assembly 'System.Xml, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e' or one of its dependencies. The system cannot find the file specified. 

 

I'm not entirely sure what the root cause is but it looks like it has to do with the fact that Enterprise Library is referencing System.Xml Version 2.0.5.0 but the solution is referencing version 5.0.5.0.

The solution is to go to the advanced properties when adding a service reference and un-check the Reuse types in referenced assemblies. In the sample project this does not affect the generated code.

--
Randy Levy
Enterprise Library support engineer
entlib.support@live.com 


Hi Randy Levy,

Thanks a lot it solved my issue. I will go ahead and try to integrate Integration pack.

Maddy.