Building EXE that works on other computers?

G

Guest

I've designed a very simple VB.NET project that uses the .NET framework
functionality to access registry keys. At the moment it pulls values from a
few keys and puts them into a listbox. The program works just fine and
compiles just fine, I set the build mode to release and built an EXE.
Whenever I try to run the EXE on any other computer I get this error: The
application failed to initialize properly (0xc0000135). Click on OK to
terminate the application. I understand that this probably has something to
do with the .net framework on other computers or lack thereof, but it must be
possible to compile an application that works on computers with older
versions of Windows or no .net framework etc. Do I need to include something
or compile differently? Please help.
 
J

Jon Skeet [C# MVP]

gabbott said:
I've designed a very simple VB.NET project that uses the .NET framework
functionality to access registry keys. At the moment it pulls values from a
few keys and puts them into a listbox. The program works just fine and
compiles just fine, I set the build mode to release and built an EXE.
Whenever I try to run the EXE on any other computer I get this error: The
application failed to initialize properly (0xc0000135). Click on OK to
terminate the application. I understand that this probably has something to
do with the .net framework on other computers or lack thereof, but it must be
possible to compile an application that works on computers with older
versions of Windows or no .net framework etc. Do I need to include something
or compile differently? Please help.

See http://www.pobox.com/~skeet/csharp/faq/#framework.required
 
S

Scott M.

You need to include the .NET redistributable package in your installation
setup so that if a computer doesn't have the framework, your application
will install it.
 
G

Guest

Hello,

How do I get that package? Is there a way to add it as a reference so it is
automaticaly installs on the computer the program is run on? I want to hand
my program out and it would be easier than making them all install the
dotnetfx.exe program first.

Many thanks

James
 
S

SB

If I were writing and application that simple, I'd just recode it in C/C++.
That way, it won't need the .NET framework installed at all. The framework
is WAY overkill for such a simple application anyway.

If you decide not to go that route, you must first face the fact that
writing .NET applications requires the .NET framework be installed. You can
provide the installation redistributable with your application and have your
installation software install that FIRST...and then your app.

You can download the v1.1 redistributable here:

http://www.microsoft.com/downloads/...e3-f589-4842-8157-034d1e7cf3a3&displaylang=en

Also, depending on the IDE that you're using, you may be able to just create
an installation project that does everything for you (Visual Studio 2003).
That will require a bit of research on your part but can be done without too
much trouble.

HTH,
sb
 
G

Gerry Hickman

SB said:
That way, it won't need the .NET framework installed at all. The framework
is WAY overkill for such a simple application anyway.
Yes.

If you decide not to go that route, you must first face the fact that
writing .NET applications requires the .NET framework be installed. You can
provide the installation redistributable with your application and have your
installation software install that FIRST...and then your app.

Yes, and then there's issues related to what version of the framework,
and what if the client at the other end does not wish to upgrade their
..NET at this tiem? They may be running business critical apps?
 

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