Strange behaviour with constants, when multiple projects on the same code

M

maluman

Hello

I followed Daniel Moth's suggestion on how to target multiple devices, and
something strange happened. I have two projects sharing the same code. They
should differ only in target device and Conditional Compilation Constants.I
have defined WINCE constant in WinCE project and PPC constant in PPC
project.
The problem is that no matter which project I try to build, compiler reads
always the same constants. I reproduced the bug in:
http://maluman.szm.sk/Configurations.zip

Please take a look at defined constants and the beggining of Form1.cs. It
throws a compilation error, depending on defined constant, and in my case it
is always #error 'WINCE defined'. No matter which project I build, no matter
which I choose for startup. Help is much appreciated.
I use VS 2003 7.1.3088.

Regards, m.
 
S

Sergey Bogdanov

See View->Other Window->Output (Ctrl + Alt + O) it shows the correct
errors for each project.

To tell the truth, I've noticed that you can't rely on information in
"Task List" window. Always see what was shown in the "Output Window".
 
D

Daniel Moth

Note that I never mix the two projects that share the code files this way. I
have had various issues including source control conflicts. The idea is that
you work on one project at a time so don't open both in two different VS
instances let alone in the same instance/solution.

Cheers
Daniel
 

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