64bit AddIn

I have started working on an Addin in .NET, since my current AddIn is made in VB6 and thus only works for the 32bit version of Solid Edge. Since we are going to move on to 64 bit Solid Edge quite soon, I will have to remake my addin (which is approaching 15000 lines ) to .Net so it works with both 32 and 64bit SE.

I have made a very simple addin so far, which only add buttons, nothing more yet. It also has the ComRegisterFunction / UnregisterFunction added, which should add the registerkeys.

But the problem lies in trying to compile / debug the addin for SE x64. I have disabled the "Register for COM interop" so it doesn't use the 32bit Regasm tool, and I have added a custom post-build line to use the 64bit RegASM tool.

But everytime I try to use the 64bit RegASM tool, it says it is not a "Valid .NET Assembly". The 32bit tool works just fine. But then it doesn't get loaded into Solid Edge. I have spend hours searching the internet, but I couldn't find a thing to get rid of this error.

I hope someone here knows how to fix this, as I have no more ideas on how to fix it.

just some info: I have been developing a .Net 4.0 add-in and was having problems with SE crashing when closing. It turned out that this only happened when accessing files managed with Insight. The problem is a dll called WebClientConsumer.dll and I haven't found a way to fix it (I don't think there will be a way without access to the internal workings of WebClientConsumer.dll). In the meantime I have dropped back to .Net 3.5 and everything seems to be fine.

Interestingly, SE still crashes when debugging with VS2010 - I think this automatically loads version 4 of the .Net framework.

Just thought I'd share the info - I don't thinkk there are too many of us using .Net 4.0 at the moment...

RE: 64bit AddIn

'I have disabled the "Register for COM interop" so it doesn't use the 32bit Regasm tool, and I have added a custom post-build line to use the 64bit RegASM tool.'

Tymen, could you ellaborate on this please? I assume you mean that you have unchecked the 'Make assembly COM-Visible' in Assembly Information and have added a post build event to ensure your add-in works on 64bit SE. What is the syntax for the build event?

I have a .NET Framework 3.5 add-in, developned in VB.NET (VS2008) that works fine in 32bit SE, but I cannot get it working in 64bit. I'd really appreciate some help with this.

Solid Edge has a VB.NET addin sample (under sdk\samples\addins\vb.net. There are some bat files that build x86, x64 and anycpu versions of the add-in. The readme.txt is full of naseating details of the problems you may encounter like the regasm issue. It also explains how to capture the command line from the VS output window so one can create/modify the bat file approach to building. The addin uses the bat file approach in order to embed native win32 resources into the add-in DLL. I believe the add-in also shows how to build a separate resource DLL (with win32 resources) so the resources and code can be decoupled (allows one to modify code for a service pack fix without having to worry about internationalization of resources).