<p>I'd like to use a different icon for the demo version of my game, and I'm building the demo with a different build config than I do for the full verison, using a preprocessor define to lockout some content, use different graphics, etc.  Is there a way that I can make Visual Studio use a different icon for the app Icon in the demo config but continue to use the regular icon for the full version's config?</p>

[{'answer_id': 72848, 'author': 'Nick', 'author_id': 1490, 'author_profile': 'https://Stackoverflow.com/users/1490', 'pm_score': 0, 'selected': False, 'text': '<p>This will get you halfway there: <a href="http://www.codeproject.com/KB/dotnet/embedmultipleiconsdotnet.aspx" rel="nofollow noreferrer">http://www.codeproject.com/KB/dotnet/embedmultipleiconsdotnet.aspx</a></p>\n\n<p>Then you need to find the Win32 call which will set the displayed icon from the list of embedded icons.</p>\n'}, {'answer_id': 72857, 'author': 'Thomas', 'author_id': 4980, 'author_profile': 'https://Stackoverflow.com/users/4980', 'pm_score': 0, 'selected': False, 'text': "<p>I don't know a way in visual studio, because the application settings are bound to the hole project. But a simple way is to use a PreBuild event and copy the app.demo.ico to app.ico or the app.release.ico to app.ico demanding on the value of the key $(ConfigurationName) and refer to the app.ico in your project directory.</p>\n"}, {'answer_id': 72877, 'author': 'Serge', 'author_id': 1007, 'author_profile': 'https://Stackoverflow.com/users/1007', 'pm_score': 4, 'selected': True, 'text': '<p>According to <a href="http://msdn.microsoft.com/en-us/library/aa381033(VS.85).aspx" rel="noreferrer">this page</a> you may use preprocessor directives in your *.rc file. You should write something like this</p>\n\n<pre><code>#ifdef _DEMO_VERSION_\nIDR_MAINFRAME ICON "demo.ico"\n#else\nIDR_MAINFRAME ICON "full.ico"\n#endif\n</code></pre>\n'}, {'answer_id': 72880, 'author': 'Kevin', 'author_id': 6386, 'author_profile': 'https://Stackoverflow.com/users/6386', 'pm_score': 2, 'selected': False, 'text': "<p>What I would do is setup a pre-build event (Project properties -> Configuration Properties -> Build Events -> Pre-Build Event).  The pre-build event is a command line.  I would use this to copy the appropriate icon file to the build icon.  </p>\n\n<p>For example, let's say your build icon is 'app.ico'.  I would make my fullicon 'app_full.ico' and my demo icon 'app_demo.ico'.  Then I would set my pre-build events as follows:</p>\n\n<p>Full mode pre-build event:</p>\n\n<pre><code>del app.ico | copy app_full.ico app.ico\n</code></pre>\n\n<p>Demo mode pre-build event:</p>\n\n<pre><code>del app.ico | copy app_demo.ico app.ico\n</code></pre>\n\n<p>I hope that helps!</p>\n"}]
['https://Stackoverflow.com/questions/72789', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/12117/']