469,963 Members | 1,263 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,963 developers. It's quick & easy.

C++ managed...force runtime version?

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?
Nov 17 '05 #1
2 2054


"ep" wrote:
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
Nov 17 '05 #2
ep
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

"Kapil Khosla [MSFT]" <kk*****@online.microsoft.com> wrote in message
news:0D**********************************@microsof t.com...


"ep" wrote:
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

Nov 17 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by Ganesh | last post: by
6 posts views Thread by Shai Levi | last post: by
5 posts views Thread by Gerhard Menzl | last post: by
2 posts views Thread by chuck rudolph | last post: by
87 posts views Thread by Robert Seacord | last post: by
1 post views Thread by rainxy | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.