diff --git a/Application/App.xaml.cs b/Application/App.xaml.cs index 04c7201..2d54d6a 100644 --- a/Application/App.xaml.cs +++ b/Application/App.xaml.cs @@ -10,9 +10,19 @@ using System.Globalization; namespace FeedCenter { - public partial class App + public partial class App { - #region Main function + public static bool IsDebugBuild + { + get + { +#if DEBUG + return true; +#else + return false; +#endif + } + } [STAThread] public static void Main() @@ -35,7 +45,7 @@ namespace FeedCenter using (isolationHandle) { // Set the data directory based on debug or not - AppDomain.CurrentDomain.SetData("DataDirectory", SystemConfiguration.DataDirectory); + AppDomain.CurrentDomain.SetData("DataDirectory", SystemConfiguration.DataDirectory); // Get the generic provider var genericProvider = (GenericSettingsProvider) Settings.Default.Providers[typeof(GenericSettingsProvider).Name]; @@ -50,7 +60,7 @@ namespace FeedCenter genericProvider.SetSettingValue = SettingsStore.SetSettingValue; genericProvider.DeleteSettingsForVersion = SettingsStore.DeleteSettingsForVersion; genericProvider.GetVersionList = SettingsStore.GetVersionList; - genericProvider.DeleteOldVersionsOnUpgrade = true; + genericProvider.DeleteOldVersionsOnUpgrade = !IsDebugBuild; // Initialize the tracer with the current process ID Tracer.Initialize(SystemConfiguration.UserSettingsPath, FeedCenter.Properties.Resources.ApplicationName, Process.GetCurrentProcess().Id.ToString(CultureInfo.InvariantCulture), false); @@ -101,7 +111,5 @@ namespace FeedCenter Tracer.WriteException(e.Exception); Tracer.Flush(); } - - #endregion } } diff --git a/Application/Properties/AssemblyInfo.cs b/Application/Properties/AssemblyInfo.cs index 39c49cd..7787524 100644 --- a/Application/Properties/AssemblyInfo.cs +++ b/Application/Properties/AssemblyInfo.cs @@ -1,52 +1,23 @@ using System.Reflection; +using System.Resources; using System.Runtime.InteropServices; using System.Windows; -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. [assembly: AssemblyTitle("Feed Center")] [assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("Chris Kaczor")] [assembly: AssemblyProduct("Feed Center")] [assembly: AssemblyCopyright("Copyright © Chris Kaczor 2010")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. +#if DEBUG +[assembly: AssemblyConfiguration("Debug build")] +#else +[assembly: AssemblyConfiguration("Release build")] +#endif + [assembly: ComVisible(false)] - -//In order to begin building localizable applications, set -//CultureYouAreCodingWith in your .csproj file -//inside a . For example, if you are using US english -//in your source files, set the to en-US. Then uncomment -//the NeutralResourceLanguage attribute below. Update the "en-US" in -//the line below to match the UICulture setting in the project file. - -//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)] - - -[assembly: ThemeInfo( - ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located - //(used if a resource is not found in the page, - // or application resource dictionaries) - ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located - //(used if a resource is not found in the page, - // app, or any theme specific resource dictionaries) -)] - - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] +[assembly: NeutralResourcesLanguage("en-US")] +[assembly: ThemeInfo(ResourceDictionaryLocation.None, ResourceDictionaryLocation.SourceAssembly)] [assembly: AssemblyVersion("0.2.*")]