TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
goce micevski
NA
19
0
C# Preprocessor - Building different application versions
Aug 18 2004 6:32 AM
I have one question. I want to make application that in the VS solution configuration settins i will add new solution configuration "version1" and "version2". And in the code to use preprocessor, so if i'm building "version1" code that is applyed for version2 will not be visible in version1. Example: class aaa { public aaa() { variables.... methods.... #if VERSION1 some code here #else other code here #endIF } } So if i select VERSION1 is selected in VS solution configuration then this class will be compiles as it was like this: class aaa { public aaa() { variables.... methods.... some code here for version1 } } and if I select VERSION2 then class aaa { public aaa() { variables.... methods.... other code here for version 2 } } As for now #if DEBUG is working, bur how can I add new configurations and make them work. This is something like you do some code that will work on windows and linux, and instead to create 2 solutions and 2 projects where you will create 2 different versions you will have one solution and one project and by using preprocessor this can be achived.
Reply
Answers (
2
)
Socket.Bind: Exception on PC's with different IP-Addresses.
Smart Device Framework