Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Compiling for 'AnyCPU' through errors
Message
From
06/04/2011 14:11:44
 
 
To
06/04/2011 13:07:36
General information
Forum:
ASP.NET
Category:
Forms
Miscellaneous
Thread ID:
01506035
Message ID:
01506280
Views:
59
To be clear - did this occur when running the skeletal project I suggested. If not then try that. Is so try this:
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 Module
Console 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)

FWIW I think the path you mention is normal for the framework DLL's - but if the exception occurs in the line that uses System.Linq I don't know there System.Windows.Forms.dll comes into it ?
Also, FWIW, I ran the above code on a 64-bit WIN7 machine in both 32 and 64 bit modes with no problem.
Where did you find any references to problems with System.Windows.Forms.dll on 64-bit ?


>Before I do that it occured to me that i am developing this on a win2003 64-bit machine. So instead of just building and then installing on another pc i run it right out of VS2010.
>
>There i get the following error running as AnyCPU:
>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.
>
>I also tried to add an exeption routine to my app - ran into problems. But I think i start a seperate thread for that.
>
>Thanks.
>
>
>
>
>
>>As per the namespace the ParallelExecutionMode enum *needs* System.Linq. The question was whether use of just that line also causes an exception on the XP/64 machine. See if this one-line project will run:
Module Module1
>>    Sub Main()
>>        Dim em As System.Linq.ParallelExecutionMode = System.Linq.ParallelExecutionMode.Default
>>    End Sub
>>End Module
Also, as mentioned earlier, look at catching unhandled exceptions in code - that will give you more information on the exception details.
>>
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform