Ways to specify the version of .Net Frameworks to be used by a dll RRS feed

  • Question

  • I would like to know all the means that are available to configure/specify the version of the .Net Frameworks
    that are used by a particular dll.

    The reason for this is that I have a VS 1.0 Managed C++ app dll built against v 1.0 of the Frameworks that in
    certain circumstances is incorrectly trying to use v 2.0 of the Frameworks.

    The circumstances are that the dll is being called from a legacy native Win32 C app through an exported C decl
    entry point (I understand that this is an inappropriate use of the dll but unfortunately for practical purposes
    I am stuck with it). This mechanism usually manages to use the correct version of the .Net Frameworks and 'works'.
    However, when run under Softgrid and Windows 2003, the process is incorrecly using v 2.0 of the Frameworks. So, I
    would like to know what my options are to try to encourage the dll to use the right version of the Frameworks in
    this situation.

    PS It is not practical to simply remove the 'wrong' versions of the Frameworks.
    PPS I understand that the 'correct' way to invoke a .Net dll from a native Win32 app is via COM - any advice/assistance/links to help me create a COM i/f for a C Win32 client exe to a Managed C++ dll (using VS .Net 1.0) would be appreciated.

    Thursday, June 5, 2008 10:00 AM