C++ managed...force runtime version?

  • Thread starter Thread starter ep
  • Start date Start date
E

ep

I have a managed C++ dll that exports functions for use in MSI custom
actions.
The functions break in the 2.0 framework and right now I just need to force
it to use the 1.1 framework only. How can this be done?
 
ep said:
I have a managed C++ dll that exports functions for use in MSI custom
actions.
The functions break in the 2.0 framework and right now I just need to force
it to use the 1.1 framework only. How can this be done?

There are a couple of things you can do.
1. Set your command prompt to the path/environment you want.
For runtime, set COMPLUS_VERSION=v1.1.4322 and set the path on the
command prompt.

This will start your VS instance with the environments you set on the
command prompt devenv /useenv.

2. I believe you could also set the same using
Tools -> Options --> Projects and Solutions --> VC++ Directories -->
Reference files

and if you need include directories, executable directories etc. You should
set them here.

Thanks, Let me know if this fixes your issue.
Kapil
 
the development machine doesn't have .Net 2.0 installed or VS2005, or any of
the .Net 2.0 libraries. When Windows Installer calls the exported function,
the mixed-mode dlls appears to load the latest version installed on the
machine.

Anyways, I've actually found the breaking change and was able to work around
it, so now it runs properly under either version.

Thanks,
-EP
 
Back
Top