views:

107

answers:

2

I have a WCF service. now, I need to create a client that consumes my service. when I try to add a service reference from Visual Studio, this is what I get an error message :

"Could not load type 'System.Data.Design.TypedDataSetSchemaImporterExtensionFS35'
 from assembly 'System.Design,Version=2.0.0.0,Culture=neutral,PublicKeyToken=b03f5f7f11d50a3a'".

here's the signature of my service :

public void SaveBookInDB(byte[] bytesToSave,bool append,Guid guid,String bookname,String contenttype)

I tried using the svcutil.exe at the command-line and I get this :

"Error : An error occured in the tool. Error : The type initializer for 
'OptionProcessingHelper' threw an exception.
Could not load type 'System.DateTimeOffset' from assembly 'mscorlin, Version=2.0.0.0, 
Culture=neutral,PublickKeyToken=b77a5c561934e089'."

I don't know how to solve this. can anyone help me please ?

even after reinstalling Visual Studio, I still get the same problem.

Thanks.

A: 

With the question update; if that is the only method in the service (and assuming you don't have any exotic base-classes etc), then I conclude that your VS install is borked. Do you have another machine you can try from? Also, check that your method has the appropriate attributes etc, but that shouldn't cause the problem shown.

Have you tried using svcutil.exe at the command-line? It is very easy, and hopefully won't have this problem.

Marc Gravell
I tried using the svcutil.exe at the command-line and I get this :"Error : An error occured in the tool. Error : The type initializer for 'OptionProcessingHelper' threw an exception.Could not load type 'System.DateTimeOffset' from assembly 'mscorlin, Version=2.0.0.0, Culture=neutral,PublickKeyToken=b77a5c561934e089'."
Attilah
A: 

I solved the problem by reinstalling my System and then reinstalling Visual Studio. and it now Works ! Great !

Attilah