Example #1
0
        private static void Install(bool undo)
        {
            try
            {
                var appAssembly = Assembly.GetEntryAssembly();

                using (var installer = new ProjectInstaller(appAssembly))
                {
                    if (undo)
                    {
                        installer.Uninstall();
                    }
                    else
                    {
                        installer.Install();
                    }
                }
            }
            catch (Exception ex)
            {
                Console.Error.WriteLine(ex);
            }
        }
Example #2
0
        private static void Install(bool undo)
        {
            try
            {
                var appAssembly = Assembly.GetEntryAssembly();

                using (var installer = new ProjectInstaller(appAssembly))
                {
                    if (undo)
                    {
                        installer.Uninstall();
                    }
                    else
                    {
                        installer.Install();
                    }
                }
            }
            catch (Exception ex)
            {
                Console.Error.WriteLine(ex);
            }
        }