I have created two solutions in Visual Studio 2017:
Example1
ClassLibrary1
ClassLibrary1 contains only one file MyLib.cs
:
namespace ClassLibrary1
{
public class MyLib
{
public string Foo()
{
return "Bla";
}
}
}
In first solution (the one with Example1 console application) I added existing project -> ClassLibrary1.
I configured ClassLibrary1 as a Startup project and set Debug -> Start external program as shown in the picture:
So now you just start the project (in my case ClassLibrary1) and the Debug works (I set breakpoint in the return "Bla";). What happens is that Example1.exe calls ClassLibrary.MyLib file.
Have I understood the Debug -> Start external program
correctly usage or is there any other usage?
You normally use it if you have something external starting up your code. Like, if you are developing a DLL, and some other process outside your project starts it up.
For example you could be developing a plugin ThingyPlugin
for Thingy.exe
. Then you would specify Thingy.exe
here as a means to get your plugin loaded.
If you don't have an external process, you might as well use Start Project
.