I wrote #if TEST_APP in my code. Now I would like to define TEST_APP. How do I set it using Visual Studio 2010? This is a Windows Forms application.
What is the name of the symbol that is set in a Windows Forms project and in a web project?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
In Visual Studio Solution Explorer, right-click on a project and click Properties. Open the build tab and you will see a field "Conditional compilation symbols". This is a comma-separated list, or space-separated.
There are also two checkboxes for commonly used symbols, DEBUG and TRACE.
For your web projects, you could set the field to "WEB_PROJECT" and Windows Forms to "WINFORMS_PROJECT"