The information below is provided for versions of the Voice Elements Client released prior to March 2010.
If you are using Voice Elements on a 64 bit OS, we recommend that you upgrade to the latest version. With the latest version you should be able to compile both 32 and 64 bit versions of Voice Elements applications.
How to compile your Project Using Voice Elements Developer on a 64 bit OS using Visual Studio 2008
- The Voice Elements DLLs require the “x86” platform.
- Click Build, Configuration Manager. You will see the Configuration Manager dialog.
- Locate the VoiceApp project in the Project Contents list.
- In the Platform column, click the down-arrow and select <new>. You will see the New Project Platform dialog.
- In the New Platform field, select “x86”.
- In the Copy Settings From field, select “<Empty>”
- Click OK. You will see the Configuration Manager dialog again.
- In the Platform column, click the down-arrow and select <edit>. You will see the Edit Project Platforms dialog.
- In the Platforms list, select the AnyCpu platform and click the Remove button.
- Click Close. You will see the Configuration Manager dialog again.
- Verify that the VoiceApp project and the Active Solution Platform both indicate “x86”.
- Click Close.
- Click Build, Rebuild All. Your project should now build properly.
How to compile your Project Using Voice Elements Developer on a 64 bit OS using Visual Studio 2005
The default settings in visual studio are to compile to the CPU type of the operating system that you are currently running.
This means that you will need to change from x64 to x86 or any. To fix this do the following:
- Go to “Build > Configuration Manager”
- Change the platform from x64 to x86 or Any
Visual Studio uses an executable with license files called ldr.exe. When you run a 64-bit operating system it runs ldr64.exe. You will need to set pre and post build commands to modify this behavior.
To do this, do the following:
- Right click on your project and click “Properties”
- Select the “Build Events” tab.
- Copy this into the pre-build event command line “C:\WINDOWS\Microsoft.NET\Framework64\v2.0.50727\ldr64.exe setwow”
- Copy this into the post-build event command line “C:\WINDOWS\Microsoft.NET\Framework64\v2.0.50727\ldr64.exe set64”
- Try to compile.
- You still may see an issue that says that it failed with code -1. If this is the case, it’s because ldr64 must be run as an administrator. Again, by default Visual Studio does not call ldr64.exe as an administrator.
There really isn’t an easy way to do this from the Pre/Post build events, the simplest solution is to do the following:
- Close Visual Studio
- Go to the Start Menu and navigate to Visual Studio.
- Right click on the icon and select “Properties”
- In the compatibility tab there is a checkbox that says “Run as Administrator” check the box.
- Open Visual Studio and try to compile.
- This should fix your errors.