C++/CLI redistribution

S

StuartJSmith

Hi,

I'm trying to deploy an application written in C++, C++/CLI and C# on
pc's that do not have VC2005 installed. I am having issues with
assemblies loading, in particular the C++/CLI one and am getting
FileLoadException when it tries to load the dll. I know I can get
round this problem by running Vcredist_x86.exe - this sorts it out and
sets the pc up so that it can run VS2005 apps.

My problem however is that not everybody is able to run this exe as
you need admin rights as it's an installer, so I just want to be able
to ship the appropriate dlls with the application. These can be found
in the folders in \Program Files\Microsoft Visual Studio 8\VC\Redist
\x86\ in my installation. However, even with these dlls present in the
application directory (both within their directory structures and just
all copied straight into the root directory), I'm still getting the
FileLoadException when trying to load the C++/CLI dll. Does anyone
know what else Vcredist_x86.exe does, i.e. what other dlls it puts on
the users pc. I feel like I've tried all avenues but am not getting
anywhere...

There's a lot of detail about this at http://www.codeproject.com/cpp/vcredists_x86.asp
but I've tried it all and the only way I can get it to work is by
running the VcRedist_x86.exe which unfortunately isn't an option.

Thanks, Stuart
 
C

Carl Daniel [VC++ MVP]

Hi,

I'm trying to deploy an application written in C++, C++/CLI and C# on
pc's that do not have VC2005 installed. I am having issues with
assemblies loading, in particular the C++/CLI one and am getting
FileLoadException when it tries to load the dll. I know I can get
round this problem by running Vcredist_x86.exe - this sorts it out and
sets the pc up so that it can run VS2005 apps.

My problem however is that not everybody is able to run this exe as
you need admin rights as it's an installer, so I just want to be able
to ship the appropriate dlls with the application. These can be found
in the folders in \Program Files\Microsoft Visual Studio 8\VC\Redist
\x86\ in my installation. However, even with these dlls present in the
application directory (both within their directory structures and just
all copied straight into the root directory), I'm still getting the
FileLoadException when trying to load the C++/CLI dll. Does anyone
know what else Vcredist_x86.exe does, i.e. what other dlls it puts on
the users pc. I feel like I've tried all avenues but am not getting
anywhere...

There's a lot of detail about this at
http://www.codeproject.com/cpp/vcredists_x86.asp but I've tried it
all and the only way I can get it to work is by
running the VcRedist_x86.exe which unfortunately isn't an option.

To run with the C/C++ libraries deployed "app local", you need to have
manifest for your application. For an in-depth discussion of some of the
issues, see Richard Grimes article here:

http://www.grimes.demon.co.uk/workshops/fusWSThirteen.htm .

There's also a lot of information in MSDN, but it's hard to find unless
you've already found it (and hence, know exactly what you're looking for).
This is the top level of the MSDN help for application manifests & the like:

http://msdn2.microsoft.com/en-us/library/aa375193.aspx

Finally, the most direct answer to how to get your application working on a
target machine that doesn't have VS2005 installed without runing vcredist
seems to be this MSDN article:

http://msdn2.microsoft.com/en-us/library/ms235291(VS.80).aspx

Read clear to the end - the first 1/2 talks about using vcredist, but they
get to the xcopy solution eventually.

-cd
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top