1

I have a small problem with the library I am using(protobuf-net). I decided to checkout library project and I found something like:

#if PLAT_BINARYFORMATTER
            DoSomething()
#endif

The problem I have is that this code is working in some of the projects I have in the solution and in some projects it does not work. I guess the projects have different contexts regarding this "PLAT_BINARYFORMATTER" thing.

Chobicus
  • 2,024
  • 2
  • 17
  • 26

1 Answers1

1

I think this answers your question.

Basically it is a custom Configuration like the default #if DEBUG. Just create a new configuration and you can get it with:

#if THE_NAME_OF_YOUR_NEW_CONFIGURATION
        DoSomething()
#endif

About your problem, maybe you're running the projects with different configurations.

Community
  • 1
  • 1
fabriciorissetto
  • 9,475
  • 5
  • 65
  • 73