Using namespace from another project

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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.
 
You can use config to specify where else to look for the compiled bits (DLL
most likely).

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

*************************************************
Think outside of the box!
*************************************************
 
Gregory said:
I am sorry, I don't understand how it answers my question.
Gregory

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
 
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.
 
Back
Top