FedEx C#示例代码跟踪服务无效操作未处理

时间:2016-03-31 23:08:09

标签: c# visual-studio fedex

我做了一个“全部下载”FedEx C#示例代码,并加载了Track Service> Track sln文件。这样做时我收到了一些警告,但是前进了。然后我运行代码,并立即得到以下错误。请告知解决方案。enter image description here enter image description here

这是堆栈跟踪:

System.InvalidOperationException was unhandled
  Message=Unable to generate a temporary class (result=1).
error CS0029: Cannot implicitly convert type 'TrackWebServiceClient.TrackServiceWebReference.EMailNotificationEventType' to 'TrackWebServiceClient.TrackServiceWebReference.EMailNotificationEventType[]'

  Source=System.Xml
  StackTrace:
       at System.Xml.Serialization.Compiler.Compile(Assembly parent, String ns, XmlSerializerCompilerParameters xmlParameters, Evidence evidence)
       at System.Xml.Serialization.TempAssembly.GenerateAssembly(XmlMapping[] xmlMappings, Type[] types, String defaultNamespace, Evidence evidence, XmlSerializerCompilerParameters parameters, Assembly assembly, Hashtable assemblies)
       at System.Xml.Serialization.TempAssembly..ctor(XmlMapping[] xmlMappings, Type[] types, String defaultNamespace, String location, Evidence evidence)
       at System.Xml.Serialization.XmlSerializer.GetSerializersFromCache(XmlMapping[] mappings, Type type)
       at System.Xml.Serialization.XmlSerializer.FromMappings(XmlMapping[] mappings, Type type)
       at System.Web.Services.Protocols.SoapClientType..ctor(Type type)
       at System.Web.Services.Protocols.SoapHttpClientProtocol..ctor()
       at TrackWebServiceClient.TrackServiceWebReference.TrackService..ctor() in C:\FedEx\TrackService_v10_cs\cs\TrackWebServiceClient\Track\Web References\TrackServiceWebReference\Reference.cs:line 43
       at TrackWebServiceClient.Program.Main(String[] args) in C:\FedEx\TrackService_v10_cs\cs\TrackWebServiceClient\Track\Program.cs:line 16
       at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
       at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.ThreadHelper.ThreadStart()
  InnerException: 

0 个答案:

没有答案