Reputation: 99418
In Visual Studio 2015, are the code inside a project compiled into exactly one executable, or can we write multiple programs in a project, with each program compiled into a separate executable?
I understand that a solution can have multiple projects. So the programs in a solution can be compiled into multiple executables.
My questions are for me to understand the concept of "project" in Visual Studio.
Upvotes: 2
Views: 49
Reputation: 100547
Yes and no.
Projects completely created by Visual Studio will only produce one executable/dll/assembly/library per project file.
User can easily modify those projects to additionally produce whatever other artifacts (exe/dll/...) they need as MSBuild format is very flexible and does not limit one project file to single output.
Note that even default projects really produce multiple output file when consider all copies of related assemblies and generating separate PDB files.
Upvotes: 1
Reputation: 849
Visual Studio's project model is "one project generates one output". If you need multiple executables, you have to create multiple projects. You can keep them in the same solution to make things easier for yourself, but they have to be separate projects.
Upvotes: 1
Reputation: 27009
One project yields one assembly. You can see more information about the assembly by expanding the Properties
node in your project and then viewing the AssemblyInfo.cs
file.
Upvotes: 3