bypass .Net not installed on PC - embed c# appl. in C++ win32 appl

G

Guest

I have a smallish C# application that i wish to distribute as a standalone
executable (ie. without installer or other support files). Easy enough if
everyone has .Net Framework 2.0 installed as it's a simple question of file
copy/mail/web-publish/etc.

The problem is when the application is run by someone who doesn't have .Net
installed, it exits without any visible error (except for an obsecure entry
in the event log). Needless to say, this is not very helpful :<

A workaround i had thought was to embed the c# application in a thin C++
Win32 application, the latter of which simply detects the present of .Net
installed;
a) not installed - prompts the user for action (ie. instead of just quietly
aborting)
b) is installed - extract embedded c# application to file (or can this also
be done to memory?) and execute the application.

Questions;
1. How to embed c# .exe in non .Net C++ application?
2. Am i doing this hard way and maybe there is an easier way (but not using
an installer solution)?

Cheers.
 
G

Guest

I'd be more inclined to embed my "smallish" C# executable into a smallish MSI
Installer that can check for the Framework, frankly. Or even better, a
ClickOnce installer that can not only check for but even install the
Framework.

Yes, you are doing it the hard way, IMHO.
Peter
 

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