Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added support for VS 2022 #24

Draft
wants to merge 7 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
################################################################################
# This .gitignore file was automatically created by Microsoft(R) Visual Studio.
################################################################################
/FASTBuildMonitorVSIX/.vs/
*.csproj.user

/FASTBuildMonitorVSIX/FASTBuildMonitorStandalone/bin
/FASTBuildMonitorVSIX/FASTBuildMonitorVSIX/bin
/FASTBuildMonitorVSIX/.vs/FASTBuildMonitorVSIX/v14
/FASTBuildMonitorVSIX/FASTBuildMonitorVSIX/lib
/FASTBuildMonitorVSIX/FASTBuildMonitorVSIX/obj
/FASTBuildMonitorVSIX/FASTBuildMonitorStandalone/obj
FASTBuildMonitorVSIX/.vs/FASTBuildMonitorVSIX/v15/Server/sqlite3/storage.ide
/FASTBuildMonitorVSIX/FASTBuildMonitorVSIX_Dev17/bin
/FASTBuildMonitorVSIX/FASTBuildMonitorVSIX_Dev17/lib
/FASTBuildMonitorVSIX/FASTBuildMonitorVSIX_Dev17/obj
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,8 @@ public static void Initialize(Package package)
/// <param name="e">The event args.</param>
private void ShowToolWindow(object sender, EventArgs e)
{
ThreadHelper.ThrowIfNotOnUIThread();

// Get the instance number 0 of this tool window. This window is single instance so this instance
// is actually the only one.
// The last flag is set to true so that if the tool window does not exists it will be created.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ private void InitializeInternalState()

OutputWindowComboBox.SelectionChanged += OutputWindowComboBox_SelectionChanged;

Dispatcher.BeginInvoke(DispatcherPriority.Loaded, new Action(() =>
_ = Dispatcher.BeginInvoke(DispatcherPriority.Loaded, new Action(() =>
{
//update timer
_timer = new DispatcherTimer();
Expand Down Expand Up @@ -132,6 +132,8 @@ private void OutputTextBox_KeyDown(object sender, KeyEventArgs e)

private void OutputTextBox_PreviewMouseDoubleClick(object sender, MouseButtonEventArgs e)
{
Microsoft.VisualStudio.Shell.ThreadHelper.ThrowIfNotOnUIThread();

if (e.ChangedButton == MouseButton.Left)
{
TextBox tb = sender as TextBox;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
using System;
using System.ComponentModel.Design;
using System.Diagnostics;
using Microsoft.VisualStudio.ExtensionManager;
//using Microsoft.VisualStudio.ExtensionManager;
using System.Diagnostics.CodeAnalysis;
using System.Globalization;
using System.Runtime.InteropServices;
Expand All @@ -17,6 +17,7 @@
using Microsoft.Win32;
using EnvDTE;
using EnvDTE80;
using Microsoft;

namespace FASTBuildMonitorVSIX
{
Expand Down Expand Up @@ -73,18 +74,23 @@ public FASTBuildMonitorPackage()
/// </summary>
protected override void Initialize()
{
ThreadHelper.ThrowIfNotOnUIThread();

FASTBuildMonitorCommand.Initialize(this);
base.Initialize();

_instance = this;

_dte = (DTE2)base.GetService(typeof(DTE));
Assumes.Present(_dte);
}

public static int count = 0;

public void ListWindows()
{
ThreadHelper.ThrowIfNotOnUIThread();

OutputWindow outWindow = _dte.ToolWindows.OutputWindow;
outWindow.Parent.AutoHides = false;
outWindow.Parent.Activate();
Expand Down Expand Up @@ -163,6 +169,8 @@ public VSIXPackageInformation GetCurrentVSIXPackageInformation()
{
outInfo = new VSIXPackageInformation();

// Commented out because of ExtensionManager/InstalledExtension assemblies not being available.
/*
// get ExtensionManager
IVsExtensionManager manager = GetService(typeof(SVsExtensionManager)) as IVsExtensionManager;
// get your extension by Product Id
Expand All @@ -172,6 +180,7 @@ public VSIXPackageInformation GetCurrentVSIXPackageInformation()
outInfo._authors = myExtension.Header.Author;
outInfo._packageName = myExtension.Header.Name;
outInfo._moreInfoURL = myExtension.Header.MoreInfoUrl.OriginalString;
*/
}
catch (System.Exception ex)
{
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<MSBuildAllProjects Condition="'$(MSBuildVersion)' == '' Or '$(MSBuildVersion)' &lt; '16.0'">$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
<HasSharedItems>true</HasSharedItems>
<SharedGUID>b400aad0-590a-4fee-aab1-91d669def936</SharedGUID>
</PropertyGroup>
<PropertyGroup Label="Configuration">
<Import_RootNamespace>FASTBuildMonitorShared</Import_RootNamespace>
</PropertyGroup>
<ItemGroup>
<Compile Include="$(MSBuildThisFileDirectory)Code\FASTBuildMonitor.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Code\FASTBuildMonitorCommand.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Code\FASTBuildMonitorControl.xaml.cs">
<DependentUpon>FASTBuildMonitorControl.xaml</DependentUpon>
</Compile>
<Compile Include="$(MSBuildThisFileDirectory)Code\FASTBuildMonitorPackage.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Code\GifImage.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Code\SystemPerformanceGraphsCanvas.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Code\TextUtils.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Code\Timebar.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Resources\Images.Designer.cs">
<DependentUpon>Images.resx</DependentUpon>
<DesignTime>True</DesignTime>
<AutoGen>True</AutoGen>
</Compile>
</ItemGroup>
<ItemGroup>
<Page Include="$(MSBuildThisFileDirectory)Code\FASTBuildMonitorControl.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="$(MSBuildThisFileDirectory)Resources\Images.resx">
<SubType>Designer</SubType>
<LastGenOutput>Images.Designer.cs</LastGenOutput>
<Generator>ResXFileCodeGenerator</Generator>
</EmbeddedResource>
<EmbeddedResource Include="$(MSBuildThisFileDirectory)VSPackage.resx">
<MergeWithCTO>true</MergeWithCTO>
<ManifestResourceName>VSPackage</ManifestResourceName>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<None Include="$(MSBuildThisFileDirectory)Resources\box.gif" />
<None Include="$(MSBuildThisFileDirectory)Resources\BuildStatusErrors.png" />
<None Include="$(MSBuildThisFileDirectory)Resources\BuildStatusOK.png" />
<None Include="$(MSBuildThisFileDirectory)Resources\BuildStatusWarnings.png" />
<None Include="$(MSBuildThisFileDirectory)Resources\Failed.png" />
<None Include="$(MSBuildThisFileDirectory)Resources\HeartBeat.gif" />
<None Include="$(MSBuildThisFileDirectory)Resources\LODBlock.png" />
<None Include="$(MSBuildThisFileDirectory)Resources\ProgressBar.gif" />
<None Include="$(MSBuildThisFileDirectory)Resources\race_flag_lost.png" />
<None Include="$(MSBuildThisFileDirectory)Resources\race_flag_win.png" />
<None Include="$(MSBuildThisFileDirectory)Resources\Running.png" />
<None Include="$(MSBuildThisFileDirectory)Resources\SettingsTabIcon.png" />
<None Include="$(MSBuildThisFileDirectory)Resources\Spinner.gif" />
<None Include="$(MSBuildThisFileDirectory)Resources\Success-cached.png" />
<None Include="$(MSBuildThisFileDirectory)Resources\Success-preprocessed.png" />
<None Include="$(MSBuildThisFileDirectory)Resources\TextOutputTabIcon.png" />
<None Include="$(MSBuildThisFileDirectory)Resources\TimeLineTabIcon.png" />
<None Include="$(MSBuildThisFileDirectory)Resources\Timeout.png" />
<None Include="$(MSBuildThisFileDirectory)Resources\Warning.png" />
</ItemGroup>
<ItemGroup>
<Content Include="$(MSBuildThisFileDirectory)index.html" />
<Content Include="$(MSBuildThisFileDirectory)Resources\FASTBuildMonitorCommand.png" />
<Content Include="$(MSBuildThisFileDirectory)Resources\FASTBuildMonitorPackage.ico" />
<Content Include="$(MSBuildThisFileDirectory)Resources\race_flag.png" />
<Content Include="$(MSBuildThisFileDirectory)Resources\Success-code.png" />
<Content Include="$(MSBuildThisFileDirectory)Resources\Success-noncode.png" />
<Content Include="$(MSBuildThisFileDirectory)stylesheet.css" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Label="Globals">
<ProjectGuid>b400aad0-590a-4fee-aab1-91d669def936</ProjectGuid>
<MinimumVisualStudioVersion>14.0</MinimumVisualStudioVersion>
</PropertyGroup>
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\CodeSharing\Microsoft.CodeSharing.Common.Default.props" />
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\CodeSharing\Microsoft.CodeSharing.Common.props" />
<PropertyGroup />
<Import Project="FASTBuildMonitorShared.projitems" Label="Shared" />
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\CodeSharing\Microsoft.CodeSharing.CSharp.targets" />
</Project>

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions FASTBuildMonitorVSIX/FASTBuildMonitorStandalone/App.config
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" />
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2"/>
</startup>
</configuration>
</configuration>
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>FASTBuildMonitorStandalone</RootNamespace>
<AssemblyName>FASTBuildMonitorStandalone</AssemblyName>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<WarningLevel>4</WarningLevel>
Expand All @@ -29,6 +29,7 @@
<IsWebBootstrapper>false</IsWebBootstrapper>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
Expand Down Expand Up @@ -127,6 +128,11 @@
<Install>false</Install>
</BootstrapperPackage>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.VisualStudio.Shell.15.0">
<Version>16.9.31025.104</Version>
</PackageReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading