473,399 Members | 3,832 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

how can one compile vb code into dll?

gg
how can one compile vb code into dll?

The vstdio build project it tends to build exe. When I looked at the build
in help I did not find anything about configuring for DLL. I even try
custom build but did not see anything like dll.

When I looked at the command line tools and sample, I only saw c code not
vb. for dll

the environment I have is
V7.1.3
ms .net frame work 1.1.4322
Installed products: ms vb .net

I would very much appreciate help. even if only a push towards some
documentation will help greatly
Nov 21 '05 #1
17 19267
CT
I'm not sure which edition of VB .NET you have and if your edition allows
you to create class libraries, which will result in a DLL assembly and not
an EXE assembly. When in the IDE, check the properties for your project and
try changing the project type to a Class Library.

--
Carsten Thomsen
Enterprise Development with VS .NET, UML, AND MSF
http://www.apress.com/book/bookDisplay.html?bID=105

"gg" <gg@nomail.nil> wrote in message
news:uU**************@TK2MSFTNGP15.phx.gbl...
how can one compile vb code into dll?

The vstdio build project it tends to build exe. When I looked at the
build
in help I did not find anything about configuring for DLL. I even try
custom build but did not see anything like dll.

When I looked at the command line tools and sample, I only saw c code not
vb. for dll

the environment I have is
V7.1.3
ms .net frame work 1.1.4322
Installed products: ms vb .net

I would very much appreciate help. even if only a push towards some
documentation will help greatly

Nov 21 '05 #2


gg wrote:
how can one compile vb code into dll?

The vstdio build project it tends to build exe. When I looked at the build
in help I did not find anything about configuring for DLL. I even try
custom build but did not see anything like dll.

When I looked at the command line tools and sample, I only saw c code not
vb. for dll

the environment I have is
V7.1.3
ms .net frame work 1.1.4322
Installed products: ms vb .net

I would very much appreciate help. even if only a push towards some
documentation will help greatly


In the New Project dialog, choose the 'Class Library' template. This
sets the Output Type, found on the General page of the Project
Properties screen to Class Library, which in turn sets the output file
to be a DLL rather than an EXE.

--
Larry Lard
Replies to group please

Nov 21 '05 #3
"gg" <gg@nomail.nil> schrieb
how can one compile vb code into dll?

The vstdio build project it tends to build exe. When I looked at
the build in help I did not find anything about configuring for DLL.
I even try custom build but did not see anything like dll.

When I looked at the command line tools and sample, I only saw c
code not vb. for dll

the environment I have is
V7.1.3
ms .net frame work 1.1.4322
Installed products: ms vb .net

I would very much appreciate help. even if only a push towards some
documentation will help greatly

http://msdn.microsoft.com/library/en...ryTemplate.asp
Or, after creation of an Exe project, change the "output type" in the
project properties:
http://msdn.microsoft.com/library/en...ertiespage.asp

Armin

Nov 21 '05 #4


gg wrote:
how can one compile vb code into dll?

The vstdio build project it tends to build exe. When I looked at the build
in help I did not find anything about configuring for DLL. I even try
custom build but did not see anything like dll.

When I looked at the command line tools and sample, I only saw c code not
vb. for dll

the environment I have is
V7.1.3
ms .net frame work 1.1.4322
Installed products: ms vb .net

I would very much appreciate help. even if only a push towards some
documentation will help greatly


In the New Project dialog, choose the 'Class Library' template. This
sets the Output Type, found on the General page of the Project
Properties screen to Class Library, which in turn sets the output file
to be a DLL rather than an EXE.

--
Larry Lard
Replies to group please

Nov 21 '05 #5
"gg" <gg@nomail.nil> schrieb:
how can one compile vb code into dll?

The vstdio build project it tends to build exe. When I looked at the
build
in help I did not find anything about configuring for DLL. I even try
custom build but did not see anything like dll.

When I looked at the command line tools and sample, I only saw c code not
vb. for dll

the environment I have is
V7.1.3
ms .net frame work 1.1.4322
Installed products: ms vb .net


Creating class libraries with the Standard edition of Visual Basic .NET
<URL:http://dotnet.mvps.org/dotnet/faqs/?id=standardclasslibraries&lang=en>

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

Nov 21 '05 #6
Create a ClassLibrary project. That will compile to a .dll. Or from
the command line compiler use the /target:library

Nov 21 '05 #7
"Chris Dunaway" <du******@gmail.com> schrieb:
Create a ClassLibrary project. That will compile to a .dll.


Yeah, but the Standard Edition of VB.NET neither includes this template nor
does it support setting the output type in the project properties to "Class
Library".

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

Nov 21 '05 #8
gg
Thank you. that was very helpful documentation I sorely need.
Thanks for everyone else being so helpful too
"Armin Zingler" <az*******@freenet.de> wrote in message
news:eS**************@TK2MSFTNGP14.phx.gbl...
"gg" <gg@nomail.nil> schrieb
how can one compile vb code into dll?

The vstdio build project it tends to build exe. When I looked at
the build in help I did not find anything about configuring for DLL.
I even try custom build but did not see anything like dll.

When I looked at the command line tools and sample, I only saw c
code not vb. for dll

the environment I have is
V7.1.3
ms .net frame work 1.1.4322
Installed products: ms vb .net

I would very much appreciate help. even if only a push towards some
documentation will help greatly

http://msdn.microsoft.com/library/en...ryTemplate.asp
Or, after creation of an Exe project, change the "output type" in the
project properties:
http://msdn.microsoft.com/library/en...ertiespage.asp

Armin

Nov 21 '05 #9
gg
I find the same result.
So I will use the suggestion from Armin: compiler option

"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:ei*************@TK2MSFTNGP15.phx.gbl...
"Chris Dunaway" <du******@gmail.com> schrieb:
Create a ClassLibrary project. That will compile to a .dll.


Yeah, but the Standard Edition of VB.NET neither includes this template
nor does it support setting the output type in the project properties to
"Class Library".

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

Nov 21 '05 #10
gg
OOPS, could not find vbc anywhere!
Of course, there is no class library template in my standard version of
dotnet 2003
Worse, changing output type in the vbproject does not do anything either.

For a while I thought I got an easy solution for the standard edition of dot
2003 with vbc.exe.

Looks like I have to do some digging ( so far no luck with google nor msdn)

Help!

"Armin Zingler" <az*******@freenet.de> wrote in message
news:eS**************@TK2MSFTNGP14.phx.gbl...
"gg" <gg@nomail.nil> schrieb
how can one compile vb code into dll?

The vstdio build project it tends to build exe. When I looked at
the build in help I did not find anything about configuring for DLL.
I even try custom build but did not see anything like dll.

When I looked at the command line tools and sample, I only saw c
code not vb. for dll

the environment I have is
V7.1.3
ms .net frame work 1.1.4322
Installed products: ms vb .net

I would very much appreciate help. even if only a push towards some
documentation will help greatly

http://msdn.microsoft.com/library/en...ryTemplate.asp
Or, after creation of an Exe project, change the "output type" in the
project properties:
http://msdn.microsoft.com/library/en...ertiespage.asp

Armin

Nov 21 '05 #11
Go to the directory where your source files are. Find a file named with
your source name, but without an extension, it will be labelled a "Visual
Basic .NET Project". Open that file with Notepad. Find the line with
"Output type" in it. Change the text following it to "Library" and and save
it. You are done.

Bobbo
Nov 21 '05 #12
gg
thx, I tried that but I still get exe not dll built
"Robert S. Liles" <rl****@midsouth.rr.com> wrote in message
news:dl****************@tornado.ohiordc.rr.com...
Go to the directory where your source files are. Find a file named with
your source name, but without an extension, it will be labelled a "Visual
Basic .NET Project". Open that file with Notepad. Find the line with
"Output type" in it. Change the text following it to "Library" and and
save it. You are done.

Bobbo

Nov 21 '05 #13
"gg" <gg@nomail.nil> schrieb
OOPS, could not find vbc anywhere!
Of course, there is no class library template in my standard
version of dotnet 2003
Worse, changing output type in the vbproject does not do anything
either.

For a while I thought I got an easy solution for the standard
edition of dot 2003 with vbc.exe.

Looks like I have to do some digging ( so far no luck with google
nor msdn)

Help!


vbc.exe is part of the .Net Framework somewhere @
c:\windows\microsoft.net\framework....
Armin

Nov 21 '05 #14
Something I think we all forgot to add, in addition to setting "OutputType"
to "Library" instead of "WinExe" or "Exe", set "StartupObject" to "". If
you do BOTH of these, it really SHOULD work. It works fine for me. If it
still won't work, email me. I was doing this so often that I wrote a VB
program to do it for me. I can email the program to you as an attachment.
You run the program then pick the solution you want as a DLL. The program
then makes the changes for you.

Bobbo
Nov 21 '05 #15
gg
Great! I found it. I will give that a shot.. thank you

I was looking at the custom install <sdk> directory forgetting the windows
directory!

Btw, is there anything I should watch out for if I want non.net app and
possibly some third part non Microsoft C based app to access the functions
in the dll for my custom functions

for example

mystringclass.vb has

public class mystringclass
......
public function myfcn(byRef strIn as String, byVal istart as Integer,
byVal iend as Integer, ByRef iFoundPos as Integer() ) as string()

End function

....
end class

"Armin Zingler" <az*******@freenet.de> wrote in message
news:eV**************@TK2MSFTNGP15.phx.gbl...
"gg" <gg@nomail.nil> schrieb
OOPS, could not find vbc anywhere!
Of course, there is no class library template in my standard
version of dotnet 2003
Worse, changing output type in the vbproject does not do anything
either.

For a while I thought I got an easy solution for the standard
edition of dot 2003 with vbc.exe.

Looks like I have to do some digging ( so far no luck with google
nor msdn)

Help!


vbc.exe is part of the .Net Framework somewhere @
c:\windows\microsoft.net\framework....
Armin

Nov 21 '05 #16
"gg" <gg@nomail.nil> schrieb
Great! I found it. I will give that a shot.. thank you

I was looking at the custom install <sdk> directory forgetting the
windows directory!

Btw, is there anything I should watch out for if I want non.net app
and possibly some third part non Microsoft C based app to access the
functions in the dll for my custom functions

for example

mystringclass.vb has

public class mystringclass
.....
public function myfcn(byRef strIn as String, byVal istart as
Integer, byVal iend as Integer, ByRef iFoundPos as Integer() ) as
string()

End function

....
end class


The language must be based on the .Net Framework. Or wrap the assembly as a
COM component if the other language is able to access COM components.

Armin

Nov 21 '05 #17
gg
thanks you for the tip, NO wonder it did not work. I will look up the com
warp part.
"Armin Zingler" <az*******@freenet.de> wrote in message
news:Oe****************@TK2MSFTNGP14.phx.gbl...
"gg" <gg@nomail.nil> schrieb
Great! I found it. I will give that a shot.. thank you

I was looking at the custom install <sdk> directory forgetting the
windows directory!

Btw, is there anything I should watch out for if I want non.net app
and possibly some third part non Microsoft C based app to access the
functions in the dll for my custom functions

for example

mystringclass.vb has

public class mystringclass
.....
public function myfcn(byRef strIn as String, byVal istart as
Integer, byVal iend as Integer, ByRef iFoundPos as Integer() ) as
string()

End function

....
end class


The language must be based on the .Net Framework. Or wrap the assembly as
a COM component if the other language is able to access COM components.

Armin

Nov 21 '05 #18

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: frankg | last post by:
When I compile this file ------------------------------------------------------ #include <stdarg.h> template <class Any> void var_arg_func(int dimension_count, ...) { int dimensions;...
5
by: Carmine Cairo | last post by:
Hi, I'm working on a project and today I've note a little problem during the compile fase. Here a little piece of code: // 1st version welldone = 0; size = p->getSize(); backbone = new...
5
by: Brice Prunier | last post by:
Here under 4 schemas i'm working with ( it may be long: sorry...) The context is the following : Resident.xsd imports Person.xsd and includes Common.xsd ( anonimous schema: no TargetNamespace )...
10
by: Jean-David Beyer | last post by:
I have some programs running on Red Hat Linux 7.3 working with IBM DB2 V6.1 (with all the FixPacks) on my old machine. I have just installed IBM DB2 V8.1 on this (new) machine running Red Hat...
10
by: Chris LaJoie | last post by:
Our company has been developing a program in C# for some time now, and we haven't had any problems with it, but just last night something cropped up that has me, and everyone else, stumped. I...
6
by: Thomas Connolly | last post by:
I have 2 pages referencing the same codebehind file in my project. Originally the pages referenced separate code behind files. Once I changed the reference to the same file, everything worked...
5
by: MLH | last post by:
A97 aborts creation of MDE reporting that there's a compile error in one form. Sure enough, if I remove the form from the source database and attempt to compile the MDE, it succeeds. But when I...
15
by: steve yee | last post by:
i want to detect if the compile is 32 bits or 64 bits in the source code itself. so different code are compiled respectively. how to do this?
16
by: desktop | last post by:
I have read that using templates makes types know at compile time and using inheritance the types are first decided at runtime. The use of pointers and casts also indicates that the types will...
2
by: Andrus | last post by:
I need compile in-memory assembly which references to other in-memory assembly. Compiling second assembly fails with error Line: 0 - Metadata file 'eed7li9m, Version=0.0.0.0, Culture=neutral,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.