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 / July 2006

Tip: Looking for answers? Try searching our database.

Using namespace from another project

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Gregory - 25 Jul 2006 16:57 GMT
I have two projects, both build .exe. Project_2 declares an object that is
defined in Project_1. At compile time I refer from Project_2 to Project_1 and
it makes Project_1 namespace available to Project_2. Project_2 compiles and
runs, but at runtime it requires Project_1 executable to be in the same
folder. Otherwise it crashes.

How can I make it so Project_2.exe runs in a different folder from
Project_1.exe? I would prefer not to use GAC.

I am using Visual Studio 2005, C#, Windows Forms.
Signature

Gregory Khrapunovich

Cowboy (Gregory A. Beamer) - 25 Jul 2006 19:53 GMT
You can use config to specify where else to look for the compiled bits (DLL
most likely).

Signature

Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

*************************************************
Think outside of the box!
*************************************************

>I have two projects, both build .exe. Project_2 declares an object that is
> defined in Project_1. At compile time I refer from Project_2 to Project_1
[quoted text clipped - 8 lines]
>
> I am using Visual Studio 2005, C#, Windows Forms.
Gregory - 25 Jul 2006 22:19 GMT
I am sorry, I don't understand how it answers my question.
Gregory

> You can use config to specify where else to look for the compiled bits (DLL
> most likely).
sturnfie@gmail.com - 26 Jul 2006 19:41 GMT
> I am sorry, I don't understand how it answers my question.
> Gregory
>
> > You can use config to specify where else to look for the compiled bits (DLL
> > most likely).

You can edit (in the preferences of your Visual Studio Project B) the
pathes it will look through to find such files.  I am assuming this is
what he is referring to.  Add a path to where you want to place Program
1's executable

Signature

lucas

Gregory - 26 Jul 2006 19:56 GMT
I did some reasearch and it appears that you are wrong. According to MSDN "At
run time, a reference must exist in either the Global Assembly Cache (GAC) or
the output path of the project." (look for "How to: Set the Copy Local
Property of a Reference").
I tried adding a Reference Path, it didn't help.

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.