Strange System.EntryPointNotFoundException error
Hi,
I'm getting an System.EntryPointNotFoundExceptionoccasionallywhen trying to invoke ToList or ToArray on a query. It seems to start working again when I close and then reopen VS - so I'm guessing its some kind of internal error.
Dim lst =From cIn custAnon.CustomerDetails _OrderBy c.Contact _Select cMe.cmbCustomerDetails.DataSource = lst.ToArray ' error occurs hereThis is the SQL generated:
SELECT [t0].[CustomerId], [t0].[Company], [t0].[Street], [t1].[State], [t0].[Country_en], [t0].[CNPJ], [t2].[CustomerDetailsId], [t2].[CustomerId] AS [CustomerId2], [t2].[Contact], [t2].[Business], [t2].[Home], [t2].[Mobile], [t2].[Email], [t2].[Fax], [t2].[CPF], [t2].[RG], [t2].[Birthday], [t2].[SpouseName], [t2].[au_user_name], [t2].[au_update_date], (
SELECT COUNT(*)
FROM [AddressBook].[CustomerDetails] AS [t3]
WHERE [t3].[CustomerId] = [t0].[CustomerId]
) AS [count]
FROM [AddressBook].[Customer] AS [t0]
LEFT OUTER JOIN [AddressBook].[States] AS [t1] ON [t1].[StateId] = [t0].[StateId]
LEFT OUTER JOIN [AddressBook].[CustomerDetails] AS [t2] ON [t2].[CustomerId] = [t0].[CustomerId]
ORDER BY [t0].[Company], [t0].[CustomerId], [t1].[StateId], [t2].[CustomerDetailsId]
SqlProvider\AttributedMetaModel
A first chance exception of type 'System.EntryPointNotFoundException' occurred in System.Core.dll
System.Transactions Critical: 0 : <TraceRecord xmlns="http://schemas.microsoft.com/2004/10/E2ETraceEvent/TraceRecord" Severity="Critical"><TraceIdentifier>http://msdn.microsoft.com/TraceCodes/System/ActivityTracing/2004/07/Reliability/Exception/Unhandled</TraceIdentifier><Description>Unhandled exception</Description><AppDomain>CompassVB.vshost.exe</AppDomain><Exception><ExceptionType>System.EntryPointNotFoundException, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</ExceptionType><Message>Entry point was not found.</Message><StackTrace> at System.Collections.Generic.IEnumerable`1.GetEnumerator()
at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
at System.Linq.OrderedSequence`1.&lt;GetEnumerator&gt;d__0.MoveNext()
at System.Linq.Enumerable.&lt;SelectIterator&gt;d__b`2.MoveNext()
at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
at CompassVB.AddressBook.cmbCustomer_SelectionChangeCommitted(Object sender, EventArgs e) in D:\Documents\Visual Studio Codename Orcas\Projects\CompassVB\CompassVB\AddressBook.vb:line 41
at System.Windows.Forms.ComboBox.OnSelectionChangeCommitted(EventArgs e)
at System.Windows.Forms.ComboBox.OnSelectionChangeCommittedInternal(EventArgs e)
at System.Windows.Forms.ComboBox.WmReflectCommand(Message&amp; m)
at System.Windows.Forms.ComboBox.WndProc(Message&amp; m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message&amp; m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message&amp; m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.SendMessage(HandleRef hWnd, Int32 msg, IntPtr wParam, IntPtr lParam)
at System.Windows.Forms.Control.SendMessage(Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.Control.ReflectMessageInternal(IntPtr hWnd, Message&amp; m)
at System.Windows.Forms.Control.WmCommand(Message&amp; m)
at System.Windows.Forms.Control.WndProc(Message&amp; m)
at System.Windows.Forms.ScrollableControl.WndProc(Message&amp; m)
at System.Windows.Forms.ContainerControl.WndProc(Message&amp; m)
at System.Windows.Forms.Form.WndProc(Message&amp; m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message&amp; m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message&amp; m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.CallWindowProc(IntPtr wndProc, IntPtr hWnd, Int32 msg, IntPtr wParam, IntPtr lParam)
at System.Windows.Forms.NativeWindow.DefWndProc(Message&amp; m)
at System.Windows.Forms.Control.DefWndProc(Message&amp; m)
at System.Windows.Forms.Control.WmCommand(Message&amp; m)
at System.Windows.Forms.Control.WndProc(Message&amp; m)
at System.Windows.Forms.ComboBox.WndProc(Message&amp; m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message&amp; m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message&amp; m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG&amp; msg)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.Run(ApplicationContext context)
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine)
at CompassVB.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()</StackTrace><ExceptionString>System.EntryPointNotFoundException: Entry point was not found.
at System.Collections.Generic.IEnumerable`1.GetEnumerator()
at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
at System.Linq.OrderedSequence`1.&lt;GetEnumerator&gt;d__0.MoveNext()
at System.Linq.Enumerable.&lt;SelectIterator&gt;d__b`2.MoveNext()
at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
at CompassVB.AddressBook.cmbCustomer_SelectionChangeCommitted(Object sender, EventArgs e) in D:\Documents\Visual Studio Codename Orcas\Projects\CompassVB\CompassVB\AddressBook.vb:line 41
at System.Windows.Forms.ComboBox.OnSelectionChangeCommitted(EventArgs e)
at System.Windows.Forms.ComboBox.OnSelectionChangeCommittedInternal(EventArgs e)
at System.Windows.Forms.ComboBox.WmReflectCommand(Message&amp; m)
at System.Windows.Forms.ComboBox.WndProc(Message&amp; m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message&amp; m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message&amp; m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.SendMessage(HandleRef hWnd, Int32 msg, IntPtr wParam, IntPtr lParam)
at System.Windows.Forms.Control.SendMessage(Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.Control.ReflectMessageInternal(IntPtr hWnd, Message&amp; m)
at System.Windows.Forms.Control.WmCommand(Message&amp; m)
at System.Windows.Forms.Control.WndProc(Message&amp; m)
at System.Windows.Forms.ScrollableControl.WndProc(Message&amp; m)
at System.Windows.Forms.ContainerControl.WndProc(Message&amp; m)
at System.Windows.Forms.Form.WndProc(Message&amp; m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message&amp; m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message&amp; m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.CallWindowProc(IntPtr wndProc, IntPtr hWnd, Int32 msg, IntPtr wParam, IntPtr lParam)
at System.Windows.Forms.NativeWindow.DefWndProc(Message&amp; m)
at System.Windows.Forms.Control.DefWndProc(Message&amp; m)
at System.Windows.Forms.Control.WmCommand(Message&amp; m)
at System.Windows.Forms.Control.WndProc(Message&amp; m)
at System.Windows.Forms.ComboBox.WndProc(Message&amp; m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message&amp; m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message&amp; m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG&amp; msg)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.Run(ApplicationContext context)
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine)
at CompassVB.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()</ExceptionString></Exception></TraceRecord>
Many thanks for any pointers on this.
Regards
Jeremy Holt

