One project with two targets with different source folders

This relates to uVision 4 v4.21.0.0 .

We have a project that requires two targets, "Dev" and "Production" because the dev board is slightly different from the final production board. The plan was to have a top level directory which contains the common code, then a sub direct for Dev and sub directory for Production with the source specfic to those:

Project/
  -Dev/
     - a.c
     - b.c
  -Production/
     - a.c
     - b.c
  - common_file1.c
  - common_file2.c

In uVision I have "Dev" and "Production" targets. In Dev target I have "Source" group which contains source from "Project/Dev/" and Production target I have "Source" group which contains source from "Project/Production". And both targets use the common source files in Project/.

However, although the uvproj file contains the correct XML, uVision4 does not treat the source files with in target serparately, I don't quite know what it's doing. If I remove a file from one target, it gets removed in both . Same with editing.

Is there is fix for this? Or an alternative (other than create two separate projects)?

Thanks

More questions in this forum