views:

24

answers:

1

I am building and Advantage AEP to run on a Win 2008 server (64bit). I'm developing the AEP in VS2008 on a 32-bit machine. Building for Any CPU and testing using Local Server works just fine.

When I Build for x64, VS2008 gives this error. Error 1 File "C:\Projects\Experiment\AdvantageTrigger1\bin\x64\Release\ADSUpdateTriggerHX.dll" is not a valid assembly. AdvantageUpdateTriggerHX

How do I build a valid assembly?

I can register the assembly on the target server (regasm in Framework64), and I see it in the Registry. It does not show up in the Trigger Dialog Browse. I even GACed it, but that didn't help.

Thanks, Tim

+2  A: 

Visual Studio runs as a 32-bit process and only calls the 32-bit regasm.

This KB item from the Advantage Developer Zone should help: http://devzone.advantagedatabase.com/dz/content.aspx?Key=17&RefNo=100616-2328

(note, copy/paste of solution from KB item) In the project settings uncheck "register for com interop" in the build settings. Then add a post-build command described in this MS KB item: http://support.microsoft.com/kb/956933

The command is: "%Windir%\Microsoft.NET\Framework64\v2.0.50727\regasm" "$(TargetPath)"

Edgar
Thanks for your response. My development platform is a 32-bit machine. Do I need to develop on a 64-bit machine or do I just need to load Framework64?
tsnyder
I believe you can build it as any CPU and then when you deploy to the 64-bit server you just run regasm from the Framework64 dir.
Edgar