Set a startup project in Visual Studio in order to debug

Set a startup project in Visual Studio in order to debug

am 10.10.2007 17:33:06 von Fir5tSight

I have two projects in C#.NET. One is "Monitor" and creates an
executable called "Monitor.exe". The other is "CoreEngine" and its
output is a .dll file called "CoreEngine.dll".

"Monitor.exe" depends on "CoreEngine.dll". That is, I must put
"CoreEngine.dll" in the bin folder together with "Monitor.exe" in
order to run "Monitor.exe".

Now I'll need to debug "CoreEngine.dll". I'll need to set
"Monitor.exe" as the startup project in "CoreEngine". What are the
steps to set this up in "CoreEngine.dll" in Visual Studio 2005?

Thanks!

Re: Set a startup project in Visual Studio in order to debug

am 10.10.2007 18:07:15 von Morten Wennevik

Hi,

If both projects are within the same solution, then you are all set (use project references to the library).

If the library project is in its own solution use the DEBUG tab in the project properties to specify that the Monitor.exe should start as part of the debug process, and maybe set the working directory to the directory where monitor.exe resides.

Putting the dll file in the 'working directory' is set using the BUILD tab in the project properties.

On Wed, 10 Oct 2007 17:33:06 +0200, Curious wrote:

> I have two projects in C#.NET. One is "Monitor" and creates an
> executable called "Monitor.exe". The other is "CoreEngine" and its
> output is a .dll file called "CoreEngine.dll".
>
> "Monitor.exe" depends on "CoreEngine.dll". That is, I must put
> "CoreEngine.dll" in the bin folder together with "Monitor.exe" in
> order to run "Monitor.exe".
>
> Now I'll need to debug "CoreEngine.dll". I'll need to set
> "Monitor.exe" as the startup project in "CoreEngine". What are the
> steps to set this up in "CoreEngine.dll" in Visual Studio 2005?
>
> Thanks!
>
>



--
Happy coding!
Morten Wennevik [C# MVP]

Re: Set a startup project in Visual Studio in order to debug

am 10.10.2007 20:02:50 von Fir5tSight

Thanks for the suggestion!

I did the following and it works:

1) Set "Monitor.exe" as startup project;
2) Copy "CoreEngine.dll" and "CoreEngine.pdb" to the Bin folder where
"Monitor.exe" is located.