c# - VS2008 - Outputting a different file name for Debug/Release configurations -
When creating a C # application with Visual Studio 2008, is it possible to set a separate output filename for every configuration?
such as MyApp_Debug.exe MyApp_Release.exe
Attempting to change the name of the file by adding the configuration has tried a post-build phase, but it seems that there is a scraper approach. In addition to this, Visual Studio can no longer find the file by pressing F5 to start debugging.
You can get it by hand by editing your project file You must duplicate it to add another conditional feature to the release version. Although it is possible, there may be problems with this that can be implemented in your assembly # [Assembly: Assembly Configuration ("Release")] # # This is an asset to your compiled assembly That will tell you what type of configuration was created by you. & lt; AssemblyName & gt; Find the node and add conditional attribute to it:
& lt; Assembly name condition = "'$ (configuration)' == 'debug'" & gt; MyApp_Debug.exe & lt; / AssemblyName & gt; & Lt; Assembly name condition = "'$ (configuration)' == 'release'" & gt; MyApp_Release.exe & lt; / Assembly name & gt;
AssemblyInfo.cs < / Code>: In the code:
#if DEBUG [Assembly: Assembly Configuration ("debug")] #Endif
Comments
Post a Comment