Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Re: Self-contained Executables in VB.Net

5 views
Skip to first unread message

Armin Zingler

unread,
Mar 30, 2009, 1:52:18 PM3/30/09
to
"tstevens" <tste...@discussions.microsoft.com> schrieb
> In VB6, I used to be able to create a compiled executable which was pretty
> well self-contained. It could be transferred over to another machine
> which
> did not have the VB6 Studio installed.

You had to install the VB runtime once.

> When I upgrade to VB.Net, it appears
> that a host of dll's must accompany any executable I create.

You have to install the .Net Framework once.

> This comes up
> because our IT support people insist on keeping business and technical
> application domains separate with evident difficulties on bridging
> applications.
>
> Is the notion (that the dll's must come with the executable) a

Which dlls are you referring to?

> misunderstanding on my part (possibly an issue of jargon)? Or is it a
> restriction built into VB.Net?


Before writing VB.Net or other Framework based applications, I suggest you
read some basics about the environment that you are moving in and that you
make use of:
http://msdn.microsoft.com/en-us/library/a4t23ktk.aspx

Armin

Jan Hyde

unread,
Mar 31, 2009, 5:57:14 AM3/31/09
to
tstevens <tste...@discussions.microsoft.com>'s wild
thoughts were released on Mon, 30 Mar 2009 10:30:05 -0700
bearing the following fruit:

>In VB6, I used to be able to create a compiled executable which was pretty
>well self-contained. It could be transferred over to another machine which

>did not have the VB6 Studio installed. When I upgrade to VB.Net, it appears
>that a host of dll's must accompany any executable I create. This comes up

>because our IT support people insist on keeping business and technical
>application domains separate with evident difficulties on bridging
>applications.
>
>Is the notion (that the dll's must come with the executable) a

>misunderstanding on my part (possibly an issue of jargon)? Or is it a
>restriction built into VB.Net?

This was just as true with VB6 as it is with VB.Net

The fact that you could copy your VB6 program to another
computer was just dumb luck. The other computer already had
the other files(s) that it needed to run.

--
Jan Hyde

Herfried K. Wagner [MVP]

unread,
Mar 31, 2009, 8:30:47 AM3/31/09
to
"Armin Zingler" <az.n...@freenet.de> schrieb:

>> In VB6, I used to be able to create a compiled executable which was
>> pretty
>> well self-contained. It could be transferred over to another machine
>> which
>> did not have the VB6 Studio installed.
>
> You had to install the VB runtime once.

Most current versions of Windows already include the VB6 runtime. So
installation is only necessary if it was not yet installed on the system.

The same applies to .NET-based applications, with the big difference that
the .NET Framework is a larger package than the VB6 runtime library and some
additional ActiveX controls.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Herfried K. Wagner

unread,
Mar 31, 2009, 9:49:51 PM3/31/09
to
"tstevens" <tste...@discussions.microsoft.com> schrieb:
> I was able to eliminate the ActiveX references as well as
> Interop.Scripting
> - just by making the evident VB.Net substitutions after the automatic
> upgrade
> of the VB6 project. For some reason, that made it possible for the
> program
> to link to the netframe dll's already on the target machine. Only a couple
> of
> dll's now seem to be missing on the XP (business domain) machine:
> msdis140.dll and Interop.Word.dll. The latter looks to have been created
> on
> my technical PC during the VB6 to VB.Net project upgrade (from MSWORD.olb
> to
> which the VB6 project wasl linked).

For the Word-related issue, just take a look at the Microsoft Office
Developer Center (<URL:http://msdn.microsoft.com/en-us/office/>). You'll
likely have to install the Office PIAs on the target machine.

Also note that your application only runs because an appropriate version of
the .NET Framework is installed on the machine, which cannot be guaranteed
for everyone's PC.

Armin Zingler

unread,
Mar 31, 2009, 5:12:20 PM3/31/09
to

tstevens

unread,
Apr 23, 2009, 1:44:01 PM4/23/09
to
Since my last communique, I have updated the subject application to VS 2005.
I tried to link directly to MSWord.olb as the VB6 application had done.
Visual Studio created several dll's, the most important for this application
being Interop.Word.dll
I find that to execute, the dll must accompany the exe generated. I had
rather hoped that the executable would automatically tie into libraries which
go with Word - provided of course that execution was on suitably licensed
machines.

Is there a way that I could avoid this inclusion and make the executable
generated more stand-alone? Perhaps I should add that all people in my
company will have essentially the same business set-up as regards the use of
Microsoft applications as my own so what works for me should work for
everyone else who will use this application. As mentioned earlier, the VB6
executable could link into whatever else it needed.

Tom Stevens


"tstevens" wrote:

> Thanks Armin and Herfried,
>
> This is most helpful.
>
> Tom Stevens

0 new messages