mirror of
https://github.com/ckaczor/FeedCenter.git
synced 2026-01-14 01:25:38 -05:00
Changes for debug vs. release builds
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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
|
||||
//<UICulture>CultureYouAreCodingWith</UICulture> in your .csproj file
|
||||
//inside a <PropertyGroup>. For example, if you are using US english
|
||||
//in your source files, set the <UICulture> 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.*")]
|
||||
|
||||
Reference in New Issue
Block a user