Question

I got to know that to define a symbol visible in all files we can make an entry of #define in build of each project under Conditional compilation symbols.

Procedure to manually add it :

You can manually edit the .csproj file using Visual Studio's text editor.

  1. Right click on your project in Solution Explorer.
  2. Select Unload Project
  3. Right click on your (unloaded) project in Solution Explorer.
  4. Select Edit MyProject.csproj
  5. Find the DefineConstants elements and edit your defined symbols there directly. The settings for Debug and Release configurations are in separate PropertyGroup elements.
  6. Right click on your (unloaded) project in Solution Explorer.
  7. Select Reload Project

But i want to add all my #define in one file and ask the project to refer to that file, in iOS we can achieve this by using prefix.pch file. can i do it in that way here for WP8

If yes how? if not apart from adding the #define to Conditional compilation symbols is there any other way that we can achieve this ?

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top