mstfcck
mstfcck

Reputation: 731

Always running #if debug in dll

I have a property in config named to class like the following in my framework project:

public static string PropertyName
{
    get
    {
      #if DEBUG
          return GetValue("TestDevelopment");
      #else
          return GetValue("Test");
      #endif
    }
}

I've compiled my project. And I added this config.dll file to different project. But always returning GetValue("TestDevelopment") from this dll. I 've compiled Release mode but it's not working.

What's the problem to be? I hope, could tell...

Upvotes: 0

Views: 107

Answers (1)

Noctis
Noctis

Reputation: 11783

If you compiled the dll as debug, and copied the file to a different one, it'll always be whatever it was when you compiled it.

You'll have to compile it in Release for it to be in release.

Upvotes: 3

Related Questions