none
Could not load file or assembly 'System.Xml.XmlSerializers, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. The system cannot find the file specified. RRS feed

  • Question

  • Hi All,

      When I am trying to call a WCF service from the below vba code, am getting the error msg as " Could not load file or assembly 'System.Xml.XmlSerializers, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. The system cannot find the file specified." in my visual studio.  I dont know where I am going wrong.  Can anyone help me please.  I am getting the exception on the line "Set service1 = GetObject(addr)"

    Dim addr As String
     addr = "service:mexAddress="" http://localhost:8732/Design_Time_Addresses/GetCurvesWcfServiceLibrary/Service1/Mex"","
    addr = addr + "address="" http://localhost:8732/Design_Time_Addresses/GetCurvesWcfServiceLibrary/Service1/"","
    addr = addr + "contract=""IService1"", contractNamespace=""http://tempuri.org/"","
    addr = addr + "binding=""NetTcpBinding_IService1"", bindingNamespace=""http://tempuri.org/"""
    Dim NodeList1 As IXMLDOMNodeList
    Dim service1 As Object
    Set service1 = GetObject(addr)

    Set NodeList1 = service1.GetDataFromVB(startdate, endDate, curveNames)


    Thursday, June 12, 2014 9:49 AM

Answers

  •  Could not load file or assembly 'System.Xml.XmlSerializers, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies.

    I don't know how the WCF service is being hosted or on what side client/service where this DLL, which is being shown in the exception message, or one of its dependency DLL are missig off of the machine. The exception message is telling you what version of the DLL right down to the DLL's public key-token is missing or one of the dependency DLL(s)  that particular DLL wants are missing.

    http://msdn.microsoft.com/en-us/library/system.xml.serialization.xmlserializer.aspx

    Dependencywalker will help you chase the rabbit to findout what the depecdency execuatbles and executable like a DLL depends upon.

    http://www.dependencywalker.com/

    Thursday, June 12, 2014 2:36 PM