How to set startup project in Visual Studio? - DOTNET

This is a discussion on How to set startup project in Visual Studio? - DOTNET ; I have two projects in C#.NET. One is "Monitor". It 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 ...

+ Reply to Thread
Results 1 to 9 of 9

How to set startup project in Visual Studio?

  1. Default How to set startup project in Visual Studio?

    I have two projects in C#.NET. One is "Monitor". It 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!


  2. Default Re: How to set startup project in Visual Studio?

    When you open your solution in VS 2005 and the two projects are visible in
    the Solution Explorer, just right click on the Monitor project and choose
    "Set as starup project".

    You can also right click on the Solution node of the Solution Explorer
    window and choose properties. This will bring you to the solution's
    properties where you can also set the build configuration.

    -Scott

    "Curious" <fir5tsight@yahoo.com> wrote in message
    news:1192031837.040012.242700@19g2000hsx.googlegroups.com...
    >I have two projects in C#.NET. One is "Monitor". It 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!
    >




  3. Default Re: How to set startup project in Visual Studio?

    Thank you Scott for the suggestion!

    Good news is that when I hit F5, "Monitor.exe" is launched.

    Bad news is that the breakpoints in "CoreEngine" are all skipped in
    the debugger.

    Any advice?


  4. Default Re: How to set startup project in Visual Studio?

    FYI, the two projects don't belong to the same solution.


  5. Default Re: How to set startup project in Visual Studio?

    Ahhh, well that answers your question about why the debugger won't step into
    the .dll.

    You can make them part of the same solution by opening the Monitor.exe
    project and then choosing File..Add...Project and locating the project file
    for the .dll project. Then you'll be able to set a breakpoint and have it
    step into the .dll code.

    -Scott


    "Curious" <fir5tsight@yahoo.com> wrote in message
    news:1192035212.930545.319740@r29g2000hsg.googlegroups.com...
    > FYI, the two projects don't belong to the same solution.
    >




  6. Default Re: How to set startup project in Visual Studio?

    Scott,

    Thanks. Since I'm not allowed to combine the two projects in the same
    solution, 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.


  7. Default Re: How to set startup project in Visual Studio?

    1. Make sure both are in the same solution. You can create a new solution if
    you want.
    2. Make sure the monitor program uses the project version of core engine and
    not a precompiled version
    3. Set monitor as the startup project

    You should now be able to break in both projects.

    Another option is to create unit tests (nUnit?) and use them to test the
    core engine without starting the monitor.

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

    *************************************************
    | Think outside the box!
    |
    *************************************************
    "Curious" <fir5tsight@yahoo.com> wrote in message
    news:1192031837.040012.242700@19g2000hsx.googlegroups.com...
    >I have two projects in C#.NET. One is "Monitor". It 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!
    >




  8. Default Re: How to set startup project in Visual Studio?

    Greg,

    Thanks. I did what you suggested below (except that I couldn't join
    both projects in a single solution):

    > 1. Make sure both are in the same solution. You can create a new solution if
    > you want.
    > 2. Make sure the monitor program uses the project version of core engine and
    > not a precompiled version
    > 3. Set monitor as the startup project


    And it works.

    How can I perform unit test in Visual Studio of "CoreEngine" without a
    startup project?


  9. Default Re: How to set startup project in Visual Studio?


    > Thanks. I did what you suggested below (except that I couldn't join
    > both projects in a single solution):


    Why not? No one is saying it must be a permenant action. You can just open
    the Monitor project and add the .dll project to the same solution just for
    testing purposes. You don't have to compile/deploy the two parts this way.



+ Reply to Thread

Similar Threads

  1. Set a startup project in Visual Studio in order to debug
    By Application Development in forum DOTNET
    Replies: 2
    Last Post: 10-10-2007, 01:02 PM
  2. Replies: 1
    Last Post: 10-06-2007, 01:52 AM
  3. Replies: 4
    Last Post: 05-17-2007, 01:57 PM
  4. Replies: 1
    Last Post: 05-14-2007, 02:06 PM
  5. Replies: 1
    Last Post: 11-11-2006, 05:09 AM