diff --git a/Bloxstrap/App.xaml.cs b/Bloxstrap/App.xaml.cs
index 12b62fa..cd8399a 100644
--- a/Bloxstrap/App.xaml.cs
+++ b/Bloxstrap/App.xaml.cs
@@ -2,8 +2,10 @@
using System.Windows;
using System.Windows.Threading;
+#if !DEBUG_ROSLYN_PUBLISH
using Windows.Win32;
using Windows.Win32.Foundation;
+#endif
namespace Bloxstrap
{
@@ -198,7 +200,9 @@ namespace Bloxstrap
{
var handle = menuProcess.MainWindowHandle;
Logger.WriteLine(LOG_IDENT, $"Found an already existing menu window with handle {handle}");
+#if !DEBUG_ROSLYN_PUBLISH
PInvoke.SetForegroundWindow((HWND)handle);
+#endif
}
else
{
diff --git a/Bloxstrap/Bloxstrap.csproj b/Bloxstrap/Bloxstrap.csproj
index 354e5d4..35386ee 100644
--- a/Bloxstrap/Bloxstrap.csproj
+++ b/Bloxstrap/Bloxstrap.csproj
@@ -10,6 +10,7 @@
2.5.4
2.5.4.0
app.manifest
+ true
@@ -40,11 +41,10 @@
-
-
+
+
all
-
@@ -60,4 +60,25 @@
+
+
+
+
+
+
+
+
+
+
+
+ @(ProjectionMetadataWinmd->'%(FullPath)','|')
+ @(ProjectionDocs->'%(FullPath)','|')
+
+
+
+
+
+
+
+
diff --git a/Bloxstrap/NativeMethods.txt b/Bloxstrap/NativeMethods.txt
index aaa0b6a..92b93a9 100644
--- a/Bloxstrap/NativeMethods.txt
+++ b/Bloxstrap/NativeMethods.txt
@@ -2,4 +2,4 @@
FlashWindow
GetWindowLong
SetWindowLong
-EnumDisplaySettings
+EnumDisplaySettings
\ No newline at end of file
diff --git a/Bloxstrap/UI/Elements/ContextMenu/MenuContainer.xaml.cs b/Bloxstrap/UI/Elements/ContextMenu/MenuContainer.xaml.cs
index f2b8df0..48fe704 100644
--- a/Bloxstrap/UI/Elements/ContextMenu/MenuContainer.xaml.cs
+++ b/Bloxstrap/UI/Elements/ContextMenu/MenuContainer.xaml.cs
@@ -6,9 +6,11 @@ using Wpf.Ui.Appearance;
using Wpf.Ui.Mvvm.Contracts;
using Wpf.Ui.Mvvm.Services;
+#if !DEBUG_ROSLYN_PUBLISH
using Windows.Win32;
using Windows.Win32.Foundation;
using Windows.Win32.UI.WindowsAndMessaging;
+#endif
using Bloxstrap.Integrations;
@@ -90,11 +92,13 @@ namespace Bloxstrap.UI.Elements.ContextMenu
// this is done to register the context menu wrapper as a tool window so it doesnt appear in the alt+tab switcher
// https://stackoverflow.com/a/551847/11852173
+#if !DEBUG_ROSLYN_PUBLISH
HWND hWnd = (HWND)new WindowInteropHelper(this).Handle;
int exStyle = PInvoke.GetWindowLong(hWnd, WINDOW_LONG_PTR_INDEX.GWL_EXSTYLE);
exStyle |= 0x00000080; //NativeMethods.WS_EX_TOOLWINDOW;
PInvoke.SetWindowLong(hWnd, WINDOW_LONG_PTR_INDEX.GWL_EXSTYLE, exStyle);
+#endif
}
private void Window_Closed(object sender, EventArgs e) => App.Logger.WriteLine("MenuContainer::Window_Closed", "Context menu container closed");
diff --git a/Bloxstrap/UI/Elements/Dialogs/ConnectivityDialog.xaml.cs b/Bloxstrap/UI/Elements/Dialogs/ConnectivityDialog.xaml.cs
index c16025a..41de426 100644
--- a/Bloxstrap/UI/Elements/Dialogs/ConnectivityDialog.xaml.cs
+++ b/Bloxstrap/UI/Elements/Dialogs/ConnectivityDialog.xaml.cs
@@ -1,8 +1,10 @@
using System.Media;
using System.Windows.Interop;
+#if !DEBUG_ROSLYN_PUBLISH
using Windows.Win32;
using Windows.Win32.Foundation;
+#endif
namespace Bloxstrap.UI.Elements.Dialogs
{
@@ -33,7 +35,9 @@ namespace Bloxstrap.UI.Elements.Dialogs
Loaded += delegate
{
var hWnd = new WindowInteropHelper(this).Handle;
+#if !DEBUG_ROSLYN_PUBLISH
PInvoke.FlashWindow((HWND)hWnd, true);
+#endif
};
}
diff --git a/Bloxstrap/UI/Elements/Dialogs/ExceptionDialog.xaml.cs b/Bloxstrap/UI/Elements/Dialogs/ExceptionDialog.xaml.cs
index c5cff3a..23aff78 100644
--- a/Bloxstrap/UI/Elements/Dialogs/ExceptionDialog.xaml.cs
+++ b/Bloxstrap/UI/Elements/Dialogs/ExceptionDialog.xaml.cs
@@ -2,8 +2,10 @@
using System.Windows;
using System.Windows.Interop;
+#if !DEBUG_ROSLYN_PUBLISH
using Windows.Win32;
using Windows.Win32.Foundation;
+#endif
namespace Bloxstrap.UI.Elements.Dialogs
{
@@ -61,7 +63,9 @@ namespace Bloxstrap.UI.Elements.Dialogs
Loaded += delegate
{
IntPtr hWnd = new WindowInteropHelper(this).Handle;
+#if !DEBUG_ROSLYN_PUBLISH
PInvoke.FlashWindow((HWND)hWnd, true);
+#endif
};
}
diff --git a/Bloxstrap/UI/Elements/Dialogs/FluentMessageBox.xaml.cs b/Bloxstrap/UI/Elements/Dialogs/FluentMessageBox.xaml.cs
index 6993406..781abab 100644
--- a/Bloxstrap/UI/Elements/Dialogs/FluentMessageBox.xaml.cs
+++ b/Bloxstrap/UI/Elements/Dialogs/FluentMessageBox.xaml.cs
@@ -4,8 +4,10 @@ using System.Windows.Controls;
using System.Windows.Interop;
using System.Windows.Media.Imaging;
+#if !DEBUG_ROSLYN_PUBLISH
using Windows.Win32;
using Windows.Win32.Foundation;
+#endif
using Bloxstrap.UI.Utility;
@@ -111,7 +113,9 @@ namespace Bloxstrap.UI.Elements.Dialogs
Loaded += delegate
{
var hWnd = new WindowInteropHelper(this).Handle;
+#if !DEBUG_ROSLYN_PUBLISH
PInvoke.FlashWindow((HWND)hWnd, true);
+#endif
};
}