none
64-bit post build event RRS feed

  • Question

  • Using VS2010, my post build event invokes a bat file to create a COM type library.  The bat file includes conditional logic based on the PROCESSOR_ARCHITECTURE environment variable.  This is needed to locate TlbExp.exe based on whether the system is 32- or 64- bits.  Unfortunately, even on a 64-bit system, the default environment for post build events defines PROCESSOR_ARCHITECTURE as "x86" instead of "AMD64".  How can I configure VS to run the post build event in a 64-bit environment on 64-bit machines and a 32-bit environment on 32-bit machines?

    Optionally, is there a better way to create COM type libraries in a post build event that works on both 32- and 64-bit systems?

    Thursday, December 9, 2010 4:39 PM

Answers

  • I solved the problem by locating TlbExp.exe relative to $(DevEnvDir)


    Rob
    • Marked as answer by mount77 Thursday, December 9, 2010 8:39 PM
    Thursday, December 9, 2010 8:07 PM

All replies

  • Additional information: My project creates a managed assembly from C#.  The COM type library is created from the managed assembly.  Thanks.


    Rob
    Thursday, December 9, 2010 4:45 PM
  • I solved the problem by locating TlbExp.exe relative to $(DevEnvDir)


    Rob
    • Marked as answer by mount77 Thursday, December 9, 2010 8:39 PM
    Thursday, December 9, 2010 8:07 PM