Reputation: 2094
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.
Upvotes: 1
Views: 97
Reputation: 10093
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.
Upvotes: 1