2010-11-11 5 views
0

J'essaie d'utiliser une simple requête LINQ to Objects.linq to object - Méthode non trouvée

Lorsque je tente de lancer ma demande je reçois le message:

System.InvalidOperationException was unhandled 
    Message="An error occurred creating the form. See Exception.InnerException for details. The error is: Method not found: 'Void sharatTashlumimWS.paymentDetailsManager.set_ReleaseDate(System.DateTime)'." 
    Source="WindowsApplication1" 
    StackTrace: 
     at WindowsApplication1.My.MyProject.MyForms.Create__Instance__[T](T Instance) in 17d14f5c-a337-4978-8281-53493378c1071.vb:line 190 
     at WindowsApplication1.My.MyProject.MyForms.get_Form1() 
     at WindowsApplication1.My.MyApplication.OnCreateMainForm() in C:\MmiSources\Ksafim\APPLICATIONS\TashlumZikuy\Tashlumim\sharatTashlumimWS\WindowsApplication1\My Project\Application.Designer.vb:line 35 
     at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun() 
     at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel() 
     at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine) 
     at WindowsApplication1.My.MyApplication.Main(String[] Args) in 17d14f5c-a337-4978-8281-53493378c1071.vb:line 81 
     at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args) 
     at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args) 
     at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly() 
     at System.Threading.ThreadHelper.ThreadStart_Context(Object state) 
     at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) 
     at System.Threading.ThreadHelper.ThreadStart() 
    InnerException: System.MissingMethodException 
     Message="Method not found: 'Void sharatTashlumimWS.paymentDetailsManager.set_ReleaseDate(System.DateTime)'." 
     Source="WindowsApplication1" 
     StackTrace: 
      at WindowsApplication1.Form1..ctor() 
     InnerException: 

Si je mets ce code dans une application ASP il est géré bon.

Ma déclaration LINQ est:

Dim query = From m In movies Select m 

Répondre

0

Sur la base de l'exception donnée, on dirait qu'il n'a même jamais arriver à votre requête - quelque chose va mal dans la mise en place Form1, probablement dans la construction de la table des films .

2

Regardez le InnerException

InnerException: System.MissingMethodException 
     Message="Method not found: 'Void sharatTashlumimWS.paymentDetailsManager.set_ReleaseDate(System.DateTime)'." 
     Source="WindowsApplication1" 
     StackTrace: 
      at WindowsApplication1.Form1..ctor() 
     InnerException: 
+0

+1. Avez-vous 'Option Strict On'? Si non, allumez-le: puis je soupçonne que le compilateur peut identifier le problème pour vous. – MarkJ

Questions connexes