Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / March 2006

Tip: Looking for answers? Try searching our database.

Creating simple exe that runs without framework?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Nenefta - 23 Mar 2006 11:54 GMT
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..)
Dmytro Lapshyn [MVP] - 23 Mar 2006 12:05 GMT
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.

> Hi all,
>
[quoted text clipped - 11 lines]
> P.S. Why is it that .Net ships with command line tools that could
> easily be implemented with an interface???? (sn, gacutil, caspol..)
Kevin Spencer - 23 Mar 2006 13:45 GMT
> 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.

Signature

HTH,

Kevin Spencer
Microsoft MVP
Professional Numbskull

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

> Hi all,
>
[quoted text clipped - 11 lines]
> P.S. Why is it that .Net ships with command line tools that could
> easily be implemented with an interface???? (sn, gacutil, caspol..)
Michael D. Ober - 23 Mar 2006 16:01 GMT

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.

> > 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
[quoted text clipped - 19 lines]
> > P.S. Why is it that .Net ships with command line tools that could
> > easily be implemented with an interface???? (sn, gacutil, caspol..)
Jason Hales - 23 Mar 2006 13:59 GMT
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
Jason Hales - 23 Mar 2006 14:20 GMT
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
Patrice - 23 Mar 2006 16:39 GMT
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)...

Signature

Patrice

> Hi all,
>
[quoted text clipped - 11 lines]
> P.S. Why is it that .Net ships with command line tools that could
> easily be implemented with an interface???? (sn, gacutil, caspol..)
n4ixt - 24 Mar 2006 04:31 GMT
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

> Hi all,
>
[quoted text clipped - 11 lines]
> P.S. Why is it that .Net ships with command line tools that could
> easily be implemented with an interface???? (sn, gacutil, caspol..)
Huihong - 24 Mar 2006 06:43 GMT
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.
Dmytro Lapshyn [MVP] - 24 Mar 2006 08:20 GMT
> 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).

> 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
[quoted text clipped - 30 lines]
> ----= East and West-Coast Server Farms - Total Privacy via Encryption
> =----
Stephany Young - 24 Mar 2006 12:38 GMT
And you can static link that if you want.

>> One question, and I haven't experimented with this, what about an
>> UNMANAGED C++ app? Does unmanaged C++ still require any type of
[quoted text clipped - 37 lines]
>> ----= East and West-Coast Server Farms - Total Privacy via Encryption
>> =----
Chris Mullins - 24 Mar 2006 22:58 GMT
> 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.

Signature

Chris Mullins

Cerebrus - 25 Mar 2006 09:43 GMT
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 :

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

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.
Nenefta - 27 Mar 2006 16:08 GMT
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
NutsAboutVB - 27 Mar 2006 16:37 GMT
hi,

i can help you with the question relating to the meaning of life.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.