How to create two executables for a one project?

M

MiB

Please advise how to do it.

I believe the best approach is to split the project into one for every
excutable you want to create, maybe plus one or more extra library
projects for code shared between different executables. Put all these
projects into a common solution.
This should be far easier than fiddling around with custom build
scripts.

Regards,

MiB.
 
A

Arne Vajhøj

On 1/13/2012 9:28 PM, Anna Warner wrote:
#How to create two executables for a one project?
Please advise how to do it.

I don't think you can do it via VS, so you will
need to edit the CSPROJ file manually.

The msbuild format is well documented, so it should
not be that difficult.

But I don't think you should do it.

Have you ever wondered why VS create both a
"solution" and a "project"?

This is the recommended solution for what
you are trying to achieve.

You create 1 solution with 3 projects:
- one that generates a DLL with the common code
- two that each generat an EXE with the specific
code

This enables you to do everything in VS without
messing around with the CSPROJ file.

It is also more convenient in most cases
to have the common code in a separate
deployable and updatable DLL than
statically linked into each EXE.

Arne
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top