Module Module1 Sub Main() Console.WriteLine(IntPtr.Size.ToString()) Try Dim em As System.Linq.ParallelExecutionMode = System.Linq.ParallelExecutionMode.Default Catch ex As Exception System.Diagnostics.Debugger.Break() End Try Console.ReadLine() End Sub End ModuleConsole write should be '4' if running in a 32-bit environment, '8' for 64-bit. The catch may give you a bit more information on the exact nature of the problem if in the IDE (check for inner exceptions)
>A first chance exception of type 'System.BadImageFormatException' occurred in System.Windows.Forms.dll >'DMS DataEntry.exe': Loaded 'C:\Windows\System32\version.dll', Cannot find or open the PDB file >An unhandled exception of type 'System.InvalidOperationException' occurred in DMS DataEntry.exe>some research suggests that there is an issue with 64-bit version of System.Windows.Forms.dll. I looked where the file is comming from (in the properties) and it comes from "C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Windows.Forms.dll" - notice the "x86" - but so do most of the other dlls listed in the references.
Module Module1 >> Sub Main() >> Dim em As System.Linq.ParallelExecutionMode = System.Linq.ParallelExecutionMode.Default >> End Sub >>End ModuleAlso, as mentioned earlier, look at catching unhandled exceptions in code - that will give you more information on the exception details.