aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKarsten Heimrich <karsten.heimrich@qt.io>2022-02-22 14:36:53 +0100
committerKarsten Heimrich <karsten.heimrich@qt.io>2022-02-23 10:52:10 +0000
commit87f3d1e099bc010b80547b5cc03c69228e12536d (patch)
tree5e8af173c1426d21d33721eaacab4e5bd3519a17
parentf7616c15124b97fd1e23906258ff35b40786266f (diff)
Re-enable designing XAML files in Visual Studio
* Add missing system references * Remove wrapper around VisualStudio.PlatformUI.DialogWindow * Depend on the right version of Microsoft.VisualStudio.Shell.15.0 Change-Id: Iadbbe9ac1f1cb28fe0bb7b3b16ca49b4507ab2a9 Reviewed-by: Miguel Costa <miguel.costa@qt.io>
-rw-r--r--QtVsTools.Package/Common/VsToolsDialogWindow.cs35
-rw-r--r--QtVsTools.Package/Package/QtHelpLinkChooser.xaml42
-rw-r--r--QtVsTools.Package/Package/QtHelpLinkChooser.xaml.cs5
-rw-r--r--QtVsTools.Package/QtMsBuild/QtModulesPopup.xaml8
-rw-r--r--QtVsTools.Package/QtMsBuild/QtModulesPopup.xaml.cs5
-rw-r--r--QtVsTools.Package/QtVsTools.Package.csproj6
-rw-r--r--references.props4
7 files changed, 39 insertions, 66 deletions
diff --git a/QtVsTools.Package/Common/VsToolsDialogWindow.cs b/QtVsTools.Package/Common/VsToolsDialogWindow.cs
deleted file mode 100644
index 0d08f0c6..00000000
--- a/QtVsTools.Package/Common/VsToolsDialogWindow.cs
+++ /dev/null
@@ -1,35 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2021 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt VS Tools.
-**
-** $QT_BEGIN_LICENSE:GPL-EXCEPT$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 as published by the Free Software
-** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-namespace QtVsTools
-{
- public class VsToolsDialogWindow : Microsoft.VisualStudio.PlatformUI.DialogWindow
- {
- // Workaround to avoid referencing Microsoft.VisualStudio.Shell.14.0 in XAML.
- }
-}
diff --git a/QtVsTools.Package/Package/QtHelpLinkChooser.xaml b/QtVsTools.Package/Package/QtHelpLinkChooser.xaml
index 18d9471f..d9d6a1d6 100644
--- a/QtVsTools.Package/Package/QtHelpLinkChooser.xaml
+++ b/QtVsTools.Package/Package/QtHelpLinkChooser.xaml
@@ -1,7 +1,7 @@
<!--
*****************************************************************************
**
- ** Copyright (C) 2016 The Qt Company Ltd.
+ ** Copyright (C) 2022 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt VS Tools.
@@ -28,31 +28,31 @@
*****************************************************************************
-->
-<local:VsToolsDialogWindow x:Class="QtVsTools.QtHelpLinkChooser"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:local="clr-namespace:QtVsTools"
- Width="400"
- Height="250"
- MinWidth="400"
- MinHeight="250"
- mc:Ignorable="d"
- Title="Choose Topic"
- ShowInTaskbar="False"
- HasHelpButton="False"
- HasMinimizeButton="False"
- ResizeMode="CanResizeWithGrip"
- WindowStartupLocation="CenterOwner">
- <local:VsToolsDialogWindow.Resources>
+<vsui:DialogWindow x:Class="QtVsTools.QtHelpLinkChooser"
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+ xmlns:vsui="clr-namespace:Microsoft.VisualStudio.PlatformUI;assembly=Microsoft.VisualStudio.Shell.15.0"
+ Width="400"
+ Height="250"
+ MinWidth="400"
+ MinHeight="250"
+ mc:Ignorable="d"
+ Title="Choose Topic"
+ ShowInTaskbar="False"
+ HasHelpButton="False"
+ HasMinimizeButton="False"
+ ResizeMode="CanResizeWithGrip"
+ WindowStartupLocation="CenterOwner">
+ <vsui:DialogWindow.Resources>
<BooleanToVisibilityConverter x:Key="b2v" />
<Style x:Key="ListBoxDoubleClickStyle"
TargetType="ListBoxItem">
<EventSetter Event="MouseDoubleClick"
Handler="OnListBoxItem_DoubleClick" />
</Style>
- </local:VsToolsDialogWindow.Resources>
+ </vsui:DialogWindow.Resources>
<Grid Margin="10"
FocusManager.FocusedElement="{Binding ElementName=searchBox}">
<Grid.RowDefinitions>
@@ -104,4 +104,4 @@
Margin="0,10,0,0" />
</StackPanel>
</Grid>
-</local:VsToolsDialogWindow>
+</vsui:DialogWindow>
diff --git a/QtVsTools.Package/Package/QtHelpLinkChooser.xaml.cs b/QtVsTools.Package/Package/QtHelpLinkChooser.xaml.cs
index fd8e5a4c..32b46387 100644
--- a/QtVsTools.Package/Package/QtHelpLinkChooser.xaml.cs
+++ b/QtVsTools.Package/Package/QtHelpLinkChooser.xaml.cs
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2016 The Qt Company Ltd.
+** Copyright (C) 2022 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt VS Tools.
@@ -32,10 +32,11 @@ using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Input;
+using Microsoft.VisualStudio.PlatformUI;
namespace QtVsTools
{
- partial class QtHelpLinkChooser : VsToolsDialogWindow
+ partial class QtHelpLinkChooser : DialogWindow
{
public QtHelpLinkChooser()
{
diff --git a/QtVsTools.Package/QtMsBuild/QtModulesPopup.xaml b/QtVsTools.Package/QtMsBuild/QtModulesPopup.xaml
index 0fb4d4a7..0cfabcb6 100644
--- a/QtVsTools.Package/QtMsBuild/QtModulesPopup.xaml
+++ b/QtVsTools.Package/QtMsBuild/QtModulesPopup.xaml
@@ -1,7 +1,7 @@
<!--
*****************************************************************************
**
-** Copyright (C) 2021 The Qt Company Ltd.
+** Copyright (C) 2022 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt VS Tools.
@@ -27,10 +27,10 @@
**
*****************************************************************************
-->
-<local:VsToolsDialogWindow x:Class="QtVsTools.QtMsBuild.QtModulesPopup"
+<vsui:DialogWindow x:Class="QtVsTools.QtMsBuild.QtModulesPopup"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:local="clr-namespace:QtVsTools"
+ xmlns:vsui="clr-namespace:Microsoft.VisualStudio.PlatformUI;assembly=Microsoft.VisualStudio.Shell.15.0"
ResizeMode="CanResize"
Width="800" MaxHeight="550"
MouseDown="Window_MouseDown"
@@ -108,4 +108,4 @@
<Button IsCancel="True" MinHeight="23" MinWidth="74">_Cancel</Button>
</WrapPanel>
</Grid>
-</local:VsToolsDialogWindow>
+</vsui:DialogWindow>
diff --git a/QtVsTools.Package/QtMsBuild/QtModulesPopup.xaml.cs b/QtVsTools.Package/QtMsBuild/QtModulesPopup.xaml.cs
index 463c85c9..fa835723 100644
--- a/QtVsTools.Package/QtMsBuild/QtModulesPopup.xaml.cs
+++ b/QtVsTools.Package/QtMsBuild/QtModulesPopup.xaml.cs
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2021 The Qt Company Ltd.
+** Copyright (C) 2022 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt VS Tools.
@@ -30,10 +30,11 @@ using System.Collections.Generic;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;
+using Microsoft.VisualStudio.PlatformUI;
namespace QtVsTools.QtMsBuild
{
- public partial class QtModulesPopup : VsToolsDialogWindow
+ public partial class QtModulesPopup : DialogWindow
{
public class Module
{
diff --git a/QtVsTools.Package/QtVsTools.Package.csproj b/QtVsTools.Package/QtVsTools.Package.csproj
index fa60dd43..cbb2b746 100644
--- a/QtVsTools.Package/QtVsTools.Package.csproj
+++ b/QtVsTools.Package/QtVsTools.Package.csproj
@@ -90,6 +90,8 @@
<Reference Include="System.Data" />
<Reference Include="System.Design" />
<Reference Include="System.Drawing" />
+ <Reference Include="System.ComponentModel.Composition" />
+ <Reference Include="System.Xaml" />
<Reference Include="PresentationCore" />
<Reference Include="PresentationFramework" />
<Reference Include="WindowsBase" />
@@ -104,7 +106,8 @@
<PackageReference Include="$(Name_Microsoft_VisualStudio_SDK)" Version="$(Version_Microsoft_VisualStudio_SDK)" ExcludeAssets="runtime" />
<PackageReference Include="$(Name_Microsoft_VisualStudio_ProjectSystem)" Version="$(Version_Microsoft_VisualStudio_ProjectSystem)" />
<PackageReference Include="$(Name_Newtonsoft_Json)" Version="$(Version_Newtonsoft_Json)" />
- <PackageReference Include="$(Name_Stub_System_Data_SQLite_Core_NetFramework)" Version="$(Version_Stub_System_Data_SQLite_Core_NetFramework)" GeneratePathProperty="true"/>
+ <PackageReference Include="$(Name_Stub_System_Data_SQLite_Core_NetFramework)" Version="$(Version_Stub_System_Data_SQLite_Core_NetFramework)" GeneratePathProperty="true" />
+ <PackageReference Include="$(Name_Microsoft_VisualStudio_Shell_15)" Version="$(Version_Microsoft_VisualStudio_Shell_15)" />
</ItemGroup>
<!--
/////////////////////////////////////////////////////////////////////////////////////////////////
@@ -440,7 +443,6 @@
<Compile Include="VisualStudio\InfoBar.cs" />
<Compile Include="Package\InfoBarMessages.cs" />
<Compile Include="VisualStudio\VsShell.cs" />
- <Compile Include="Common\VsToolsDialogWindow.cs" />
<Content Include="..\Changelog">
<Link>Changelog</Link>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
diff --git a/references.props b/references.props
index fe497d1d..c7d022c3 100644
--- a/references.props
+++ b/references.props
@@ -15,6 +15,7 @@
<Name_Microsoft_VisualStudio_RpcContracts>Microsoft.VisualStudio.RpcContracts</Name_Microsoft_VisualStudio_RpcContracts>
<Name_Microsoft_VisualStudio_ProjectSystem>Microsoft.VisualStudio.ProjectSystem</Name_Microsoft_VisualStudio_ProjectSystem>
<Name_Microsoft_VisualStudio_VCProjectEngine>Microsoft.VisualStudio.VCProjectEngine</Name_Microsoft_VisualStudio_VCProjectEngine>
+ <Name_Microsoft_VisualStudio_Shell_15>Microsoft.VisualStudio.Shell.15.0</Name_Microsoft_VisualStudio_Shell_15>
<Name_Microsoft_VisualStudio_Shell_Framework>Microsoft.VisualStudio.Shell.Framework</Name_Microsoft_VisualStudio_Shell_Framework>
<Name_Microsoft_VisualStudio_TemplateWizardInterface>Microsoft.VisualStudio.TemplateWizardInterface</Name_Microsoft_VisualStudio_TemplateWizardInterface>
@@ -40,6 +41,7 @@
<Version_Microsoft_VisualStudio_SDK>17.0.32112.339</Version_Microsoft_VisualStudio_SDK>
<Version_Microsoft_VisualStudio_ProjectSystem>17.0.1313-pre</Version_Microsoft_VisualStudio_ProjectSystem>
<Version_Microsoft_VisualStudio_TemplateWizardInterface>17.0.31902.203</Version_Microsoft_VisualStudio_TemplateWizardInterface>
+ <Version_Microsoft_VisualStudio_Shell_15>17.0.32112.339</Version_Microsoft_VisualStudio_Shell_15>
</PropertyGroup>
<!-- // Visual Studio 2019 -->
@@ -54,6 +56,7 @@
<Version_Microsoft_VisualStudio_ProjectSystem>16.2.133-pre</Version_Microsoft_VisualStudio_ProjectSystem>
<Version_Microsoft_VisualStudio_VCProjectEngine>16.10.31320.204</Version_Microsoft_VisualStudio_VCProjectEngine>
<Version_Microsoft_VisualStudio_TemplateWizardInterface>16.10.31320.204</Version_Microsoft_VisualStudio_TemplateWizardInterface>
+ <Version_Microsoft_VisualStudio_Shell_15>16.10.31321.278</Version_Microsoft_VisualStudio_Shell_15>
</PropertyGroup>
<!-- // Visual Studio 2017 -->
@@ -65,6 +68,7 @@
<Version_Microsoft_Bcl_AsyncInterfaces>5.0.0</Version_Microsoft_Bcl_AsyncInterfaces>
<Version_Microsoft_VisualStudio_ProjectSystem>15.8.243</Version_Microsoft_VisualStudio_ProjectSystem>
<Version_Microsoft_VisualStudio_Shell_Framework>15.9.28307</Version_Microsoft_VisualStudio_Shell_Framework>
+ <Version_Microsoft_VisualStudio_Shell_15>15.9.28307</Version_Microsoft_VisualStudio_Shell_15>
</PropertyGroup>
</Project>