Exceptions starting C# samples

Forum for reporting problems
Post Reply
Mike Gershon
Posts: 4
Joined: Thu Nov 28, 2013 8:06 am

Exceptions starting C# samples

Post by Mike Gershon »

Hi
I have installed the latest 64 bit kernelcad. When I am trying to open Morph64 sample (and others) I get an exception on m_iSection = m_iModel.GetSection(0); line in Form1_Load().

The Collision example does not compile at all. I have: Samples\NET\C#\Collision\Collision\CollisionForm.cs(19,6): error CS0246: The type or namespace name 'IRelation' could not be found (are you missing a using directive or an assembly reference?)

Thank you

gerard12
Posts: 21
Joined: Fri Jul 26, 2013 8:34 am

Re: Exceptions starting C# samples

Post by gerard12 »

Hi Mike
Most likely you forgot to switch the current platform to x64. Not all samples have it yet. So, in Visual Studio go to Build > Configuration Manager > Active Solution Platform. If you do not have x64 there select <New...> > x64. This should fix the problems.
If in the new platform you do not have the x64 option most likely you are using Visual Studio 2008 or earlier. I am not sure you can do 64 bit staff with VS 2005. With VS 2008 you need to install 64 bit tools for Visual Studio 2008. In our case we have it on our setup DVD as an option. Re-run the Visual Studio setup and make sure this option is selected.
Regards
Gerard

Post Reply