Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Visual Basic > VB.NET 1.0 > Pro VB.NET 2002/2003
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Pro VB.NET 2002/2003 For advanced Visual Basic coders working .NET version 2002/2003. Beginning-level questions will be redirected to other forums, including Beginning VB.NET.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Pro VB.NET 2002/2003 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old February 24th, 2005, 03:52 AM
Authorized User
Points: 173, Level: 3
Points: 173, Level: 3 Points: 173, Level: 3 Points: 173, Level: 3
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Dec 2004
Location: , , .
Posts: 30
Thanks: 0
Thanked 0 Times in 0 Posts
Default "Include files" in VB.net

Hi there !

I have a VB.net application ("MyApp") who needs to use code stored in another folder, where I have (common) procedures used by lots of other projects. I don't want to copy those in my particular app's folder, but I would like to include them in my Solution and compile them at compile time.

I tried to do this by building a Solution with 2 Projects, "Common" and "MyApp", and compile the Projects in the correct order - first Common, and then MyApp. IT DOESN'T WORK !

Any call from MyApp of a procedure stored in Common generates an error; any reference to a data type defined in Common generates an error... etc. MyApp doesn't "see" Common, as if they were 2 completely separate entities.

So how do I do this in VB.net ?

TIA


Reply With Quote
  #2 (permalink)  
Old February 24th, 2005, 04:06 AM
Friend of Wrox
 
Join Date: Oct 2003
Location: Chennai, TamilNadu, India.
Posts: 326
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to Santhi Send a message via MSN to Santhi
Default

You have to add references to the Common Project in MyApp.Include the dll in the MyApp using Add References in VS.NET

Reply With Quote
  #3 (permalink)  
Old February 24th, 2005, 05:57 AM
Authorized User
Points: 173, Level: 3
Points: 173, Level: 3 Points: 173, Level: 3 Points: 173, Level: 3
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Dec 2004
Location: , , .
Posts: 30
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Sorry, but it's not a DLL. It's just plain simple source code (.vb file), and, if possible, I would like to keep it that way.

VB6 could do this easily ! You tell me VB.net can't ?! Argggh ! :-)


Reply With Quote
  #4 (permalink)  
Old February 24th, 2005, 10:44 AM
Friend of Wrox
 
Join Date: Oct 2003
Location: Chennai, TamilNadu, India.
Posts: 326
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to Santhi Send a message via MSN to Santhi
Default

You have the common.vb file in separate project right.If it so,you have to build it and add an reference to the MyApp project.
Include the namespace of the common.vb in your MyApp files whereever you want to use and access the procedure.
(eg)If common.vb is in Common.Web namespace
import it into your MyApp file like imports Common.Web
The procedures inside the common.vb will be accessible now to your MyApp file.


Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Include files tarang SQL Server 2000 1 July 18th, 2007 03:32 AM
Execute VBS files via ASP.NET (VB.NET) Mario_Steiner ASP.NET 1.0 and 1.1 Professional 0 November 9th, 2005 07:49 AM
Equivalent to include files in VB Access jrwlkn Access 2 January 15th, 2004 01:50 PM
ADO.net + include files eddiema ADO.NET 3 December 12th, 2003 03:43 AM



All times are GMT -4. The time now is 11:48 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.