Creating simple exe that runs without framework?

N

Nenefta

Hi all,

probably a simple question for most of you:

Can I create a simple executable with vb.net, that can run without the
..Net framework installed? (like any executable created with VB6 in the
old days..) I would like to stay away from permissions, strong naming
GAC etc. for some simple tools...

Thx,

Marcel

P.S. Why is it that .Net ships with command line tools that could
easily be implemented with an interface???? (sn, gacutil, caspol..)
 
D

Dmytro Lapshyn [MVP]

Hi,

No, you can't do that. However, I have seen tools that combine your
application and the .NET Framework installer into a single installation
package.

Note that VB6 apps also use a shared runtime consisting of several DLLs. The
trick is that modern versions of Windows have these DLLs by default, but in
older days, one had to deploy the VB6 runtime along with the application.
 
K

Kevin Spencer

Can I create a simple executable with vb.net, that can run without the
.Net framework installed? (like any executable created with VB6 in the
old days..) I would like to stay away from permissions, strong naming
GAC etc. for some simple tools...

While it is certainly possible to do this, it is a great deal of trouble
(and some expense). If you want a native executable, use VB6 to write it.

--
HTH,

Kevin Spencer
Microsoft MVP
Professional Numbskull

Show me your certification without works,
and I'll show my certification
*by* my works.
 
J

Jason Hales

Don't know if it's helpful but there's always Mono:

"Mono provides the necessary software to develop and run .NET client
and server applications on Linux, Solaris, Mac OS X, Windows, and Unix"

http://www.mono-project.com
 
J

Jason Hales

You'd don't need to go down the route of gac/strong naming/permissions
etc for a "simple executable". You'll need these in a more Enterprise
environment.

Caspol has the almost equilivilant MS .Net Framework Configuration in
the Admin tools section of Control Panel.

The Setup projects can do all the work of bootstrapping the
installation of Framework runtime and can do all the clever GAC
registration for you. Windows XP already ships with the Framework
 
M

Michael D. Ober

Even with VB 6 you need runtimes that are now supplied with the OS. As for
native executable, VB 6 can compile to native code but a lot of it calls the
runtime DLLs and is actually slower than the VB 6 pCode when you use
collection and other objects. (The information on VB 6 performance came
from an old MS technet article.)

Mike Ober.
 
P

Patrice

No (you may want to explain the exact problem, you don't necessarily need to
use the GAC, strong naming, and permission is not a problem for locally
installed EXE file).
Else you'll have to use another product (actually VB6 needs a runtime).

For the UI stuff my guess would be that most the time they are called from a
command file as part of the build process (you have shell extensions for the
GAC and the
control panel might provide some of what CASPOL does)...
 
N

n4ixt

By now you've seen the answers of no, you need the framework which is
correct. Just have your users install the framework, then you can create
some simple exe's that they can just xcopy install.

One question, and I haven't experimented with this, what about an UNMANAGED
C++ app? Does unmanaged C++ still require any type of supporting framework?

Anyone? Bueller?

Robert
 
H

Huihong

For simple exe, it's possible to distribute the .NET Framework inside
the application directory, and make the framework only applicable to
your exe. There are some undocumented features to control this, I will
write up an article to post on our website, so everyone can use the
techniques to deploy an application with .NET Framework inside the
application directory. For the time being, you can spend some money for
our linker and native compiler tool that does the job.

http://www.remotesoft.com/linker/

Huihong
Remotesoft, Inc.
 
D

Dmytro Lapshyn [MVP]

One question, and I haven't experimented with this, what about an
UNMANAGED C++ app? Does unmanaged C++ still require any type of supporting
framework?

If you use the standard C++ library, then yes, you need msvcrt.dll (comes in
different flavours depending on the runtime version).
 
S

Stephany Young

And you can static link that if you want.


Dmytro Lapshyn said:
If you use the standard C++ library, then yes, you need msvcrt.dll (comes
in different flavours depending on the runtime version).
 
C

Chris Mullins

Nenefta said:
Can I create a simple executable with vb.net, that can run without the
.Net framework installed? (like any executable created with VB6 in the
old days..) I would like to stay away from permissions, strong naming
GAC etc. for some simple tools...

There is at least one option that I'm familure with for doing this:

http://www.xenocode.com/

One of the people I work with has had signifigant success with this - we
were able to build a complex C# WinForms application in .Net 2.0 (it even
had some Managed and UnManaged C++), link it with this tool, and deploy it
to lots of computers that didn't have the .Net framework installed.

The install was pretty big (14 megs), but it ran everywhere with little or
no work.
 
C

Cerebrus

Well... A lot has been said on this topic by the experts, but I find
that one of the original questions was unanswered :

Nenefta wrote :

So, here's my bit :

I think it is to facilitate managment of .NET applications, to help in
deployment, to automate processes, such as calling the tools in batch
files. Also, some command line tools offer more flexibility than their
interface equivalents.

Regards,

Cerebrus.
 
N

Nenefta

That's a load of helpfull answers, thx everyone!
It doesn't matter very much, but I still don't get why they can't make
the commandline tools as forms-applications with optional commandline
usage.. Ah well, I'm still working on the meaning of life as wel... ;-)

Grtx,
Marcel
 

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