This project is read-only.


Compilation fails when used with a C++ project


First off: Thank you in advance for your great work on this project. It works very well when compiling C# projects and does exactly what you would expect it to do.

However, when using the xcc target with a C++ project there is an error relating the Preprocessor Definitions. Using "$(DefineConstants)" may work when working with .NET projects, but it cannot be resolved in context of a C++ project. This is due to the different structure of the C++ project files in comparison to the C# or more widely .NET ones.
To fix the actual error I created a copy of the original targets file, removed the MonoAndroid Preprocessor Definitions support a Mono does not support C++ and replaced the mentioned "$(DefineConstants)" by "%(ClCompile.PreprocessorDefinitions)" to match the C++ project file structure.
After referencing this targets file in favor of the original one my tests showed that this work for both Windows and Windows Phone projects. I successfully accomplished XAML conditional compilation by checking for the "_DEBUG" condition.

I hope those who would like to enjoy this great project with C++ projects are served with this piece of information. I would be blessed if you, the project author, would add support for C++ projects in a later release as I consider this solution the very best available to replace native conditional compilation support that is still missing to date.

Thanks for your time and I hope you enjoy the rest of your weekend,
Closed Sep 18, 2014 at 11:10 AM by kozw