Forum Xamarin Cross Platform with Xamarin

Conditional Compilation

I am developing a PCL application, and I need to know what is the conditional compilation for a UWP project?


  • DaveHuntDaveHunt USMember ✭✭✭✭✭

    In a PCL there is no conditional compilation. A PCL is, by definition, platform agnostic, therefore, there is no platform conditional compilation.

    Any platform-specific code needs to go in the platform-specific app project. If you need to call that code from a PCL, you need to use dependency injection.

  • Thanks for the information Dave. I was wondering that when I first submitted the question.

Sign In or Register to comment.