From 3d845847cf6a0bd756474af41f7fc152a5b1b1f2 Mon Sep 17 00:00:00 2001 From: Dark Daskin Date: Mon, 14 Feb 2022 00:35:22 +0300 Subject: [PATCH] Added VS 2022 support and fixed VS 2017 support. --- README.md | 10 +- .../DteInteropResolver.cs | 20 +++ VSTabPath.Interop.Contracts/IDteInterop.cs | 13 ++ .../VSTabPath.Interop.Contracts.csproj | 9 ++ VSTabPath.Interop.Shared/DteInterop.cs | 59 ++++++++ .../VSTabPath.Interop.Shared.projitems | 14 ++ .../VSTabPath.Interop.Shared.shproj | 13 ++ .../VSTabPath.Interop.X64.csproj | 18 +++ .../VSTabPath.Interop.X86.csproj | 18 +++ VSTabPath.sln | 37 ++++- VSTabPath/Properties/AssemblyInfo.cs | 5 +- VSTabPath/TabPathPackage.cs | 10 +- VSTabPath/TabTitleManager.cs | 53 +++---- VSTabPath/VSTabPath.csproj | 70 +++++----- VSTabPath/VisualStudio.props | 24 ++++ VSTabPath/VisualStudio.targets | 14 ++ VSTabPath/index.html | 65 --------- VSTabPath/source.extension.cs | 18 +++ VSTabPath/source.extension.vsixmanifest | 13 +- VSTabPath/stylesheet.css | 129 ------------------ 20 files changed, 333 insertions(+), 279 deletions(-) create mode 100644 VSTabPath.Interop.Contracts/DteInteropResolver.cs create mode 100644 VSTabPath.Interop.Contracts/IDteInterop.cs create mode 100644 VSTabPath.Interop.Contracts/VSTabPath.Interop.Contracts.csproj create mode 100644 VSTabPath.Interop.Shared/DteInterop.cs create mode 100644 VSTabPath.Interop.Shared/VSTabPath.Interop.Shared.projitems create mode 100644 VSTabPath.Interop.Shared/VSTabPath.Interop.Shared.shproj create mode 100644 VSTabPath.Interop.X64/VSTabPath.Interop.X64.csproj create mode 100644 VSTabPath.Interop.X86/VSTabPath.Interop.X86.csproj create mode 100644 VSTabPath/VisualStudio.props create mode 100644 VSTabPath/VisualStudio.targets delete mode 100644 VSTabPath/index.html create mode 100644 VSTabPath/source.extension.cs delete mode 100644 VSTabPath/stylesheet.css diff --git a/README.md b/README.md index 2d6f581..7020462 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,12 @@ Improvement suggestions are welcome. ## Compatibility -The extension currently works with Visual Studio 2017 - 2019. Support for other versions might be added in future. +The extension currently works with Visual Studio 2017 - 2022. Support for other versions might be added in future. -The extension is compatible with the [Custom Document Well](https://marketplace.visualstudio.com/items?itemName=VisualStudioPlatformTeam.CustomDocumentWell) extension (a component of [Productivity Power Tools 2017](https://marketplace.visualstudio.com/items?itemName=VisualStudioProductTeam.ProductivityPowerPack2017)). \ No newline at end of file +The extension is compatible with the [Custom Document Well](https://marketplace.visualstudio.com/items?itemName=VisualStudioPlatformTeam.CustomDocumentWell) extension (a component of [Productivity Power Tools 2017](https://marketplace.visualstudio.com/items?itemName=VisualStudioProductTeam.ProductivityPowerPack2017)). + +## Building + +The extension references few assemblies directly from Visual Studio directory, so Visual Studio 2017 has to be installed to build it. No specific work loads are required. + +In case you need to build the extension having only newer version of Visual Studio installed, override the `MinimumVisualStudioVersion` project property (see *VisualStudio.props* for possible values). This will make the extension incompatible with earlier Visual Studio versions. \ No newline at end of file diff --git a/VSTabPath.Interop.Contracts/DteInteropResolver.cs b/VSTabPath.Interop.Contracts/DteInteropResolver.cs new file mode 100644 index 0000000..46d9314 --- /dev/null +++ b/VSTabPath.Interop.Contracts/DteInteropResolver.cs @@ -0,0 +1,20 @@ +using System; +using System.Reflection; + +namespace VSTabPath.Interop.Contracts +{ + // Since VS 17.0, many interop types were moved to different assemblies, so code interacting with them + // must have diferent references for different VS versions. Such code was moved to proxy assemblies. + public static class DteInteropResolver + { + public static IDteInterop Interop { get; } + + static DteInteropResolver() + { + var assemblyName = Environment.Is64BitProcess ? "VSTabPath.Interop.X64" : "VSTabPath.Interop.X86"; + var assembly = Assembly.Load(assemblyName); + var type = assembly.GetType("VSTabPath.Interop.DteInterop"); + Interop = (IDteInterop)Activator.CreateInstance(type); + } + } +} \ No newline at end of file diff --git a/VSTabPath.Interop.Contracts/IDteInterop.cs b/VSTabPath.Interop.Contracts/IDteInterop.cs new file mode 100644 index 0000000..84aaae1 --- /dev/null +++ b/VSTabPath.Interop.Contracts/IDteInterop.cs @@ -0,0 +1,13 @@ +using System; + +namespace VSTabPath.Interop.Contracts +{ + public interface IDteInterop + { + string GetSolutionRootPath(); + + event Action SolutionOpened; + event Action SolutionRenamed; + event Action SolutionClosed; + } +} \ No newline at end of file diff --git a/VSTabPath.Interop.Contracts/VSTabPath.Interop.Contracts.csproj b/VSTabPath.Interop.Contracts/VSTabPath.Interop.Contracts.csproj new file mode 100644 index 0000000..39af988 --- /dev/null +++ b/VSTabPath.Interop.Contracts/VSTabPath.Interop.Contracts.csproj @@ -0,0 +1,9 @@ + + + + net472 + True + ..\VSTabPath\Key.snk + + + diff --git a/VSTabPath.Interop.Shared/DteInterop.cs b/VSTabPath.Interop.Shared/DteInterop.cs new file mode 100644 index 0000000..2096b46 --- /dev/null +++ b/VSTabPath.Interop.Shared/DteInterop.cs @@ -0,0 +1,59 @@ +using EnvDTE; +using EnvDTE80; +using Microsoft.VisualStudio.Shell; +using Microsoft.VisualStudio.Shell.Interop; +using System; +using System.IO; +using System.Linq; +using VSTabPath.Interop.Contracts; + +namespace VSTabPath.Interop +{ + // ReSharper disable once UnusedMember.Global + public class DteInterop : IDteInterop + { + private readonly DTE2 _dte; + + public DteInterop() + { + _dte = (DTE2)Package.GetGlobalService(typeof(SDTE)); + } + + public string GetSolutionRootPath() + { + ThreadHelper.ThrowIfNotOnUIThread(); + + var solution = _dte.Solution; + if (solution == null) + return null; + + var fullName = solution.FullName; + if (string.IsNullOrEmpty(fullName)) + { + // A project has been opened without a solution, so a temporary one is created. + // Use the project root path instead. + fullName = solution.Projects.Cast().FirstOrDefault()?.FullName; + } + + return string.IsNullOrEmpty(fullName) ? null : Path.GetDirectoryName(fullName); + } + + public event Action SolutionOpened + { + add => _dte.Events.SolutionEvents.Opened += new _dispSolutionEvents_OpenedEventHandler(value); + remove => _dte.Events.SolutionEvents.Opened -= new _dispSolutionEvents_OpenedEventHandler(value); + } + + public event Action SolutionRenamed + { + add => _dte.Events.SolutionEvents.Renamed += new _dispSolutionEvents_RenamedEventHandler(value); + remove => _dte.Events.SolutionEvents.Renamed -= new _dispSolutionEvents_RenamedEventHandler(value); + } + + public event Action SolutionClosed + { + add => _dte.Events.SolutionEvents.AfterClosing += new _dispSolutionEvents_AfterClosingEventHandler(value); + remove => _dte.Events.SolutionEvents.AfterClosing -= new _dispSolutionEvents_AfterClosingEventHandler(value); + } + } +} \ No newline at end of file diff --git a/VSTabPath.Interop.Shared/VSTabPath.Interop.Shared.projitems b/VSTabPath.Interop.Shared/VSTabPath.Interop.Shared.projitems new file mode 100644 index 0000000..2989603 --- /dev/null +++ b/VSTabPath.Interop.Shared/VSTabPath.Interop.Shared.projitems @@ -0,0 +1,14 @@ + + + + $(MSBuildAllProjects);$(MSBuildThisFileFullPath) + true + 064a5ff7-b156-4165-9594-9867f5a5d382 + + + VSTabPath.Interop + + + + + \ No newline at end of file diff --git a/VSTabPath.Interop.Shared/VSTabPath.Interop.Shared.shproj b/VSTabPath.Interop.Shared/VSTabPath.Interop.Shared.shproj new file mode 100644 index 0000000..3558dd6 --- /dev/null +++ b/VSTabPath.Interop.Shared/VSTabPath.Interop.Shared.shproj @@ -0,0 +1,13 @@ + + + + 064a5ff7-b156-4165-9594-9867f5a5d382 + 14.0 + + + + + + + + diff --git a/VSTabPath.Interop.X64/VSTabPath.Interop.X64.csproj b/VSTabPath.Interop.X64/VSTabPath.Interop.X64.csproj new file mode 100644 index 0000000..041becc --- /dev/null +++ b/VSTabPath.Interop.X64/VSTabPath.Interop.X64.csproj @@ -0,0 +1,18 @@ + + + + net472 + + + + + + + + + + + + + + diff --git a/VSTabPath.Interop.X86/VSTabPath.Interop.X86.csproj b/VSTabPath.Interop.X86/VSTabPath.Interop.X86.csproj new file mode 100644 index 0000000..2e8c771 --- /dev/null +++ b/VSTabPath.Interop.X86/VSTabPath.Interop.X86.csproj @@ -0,0 +1,18 @@ + + + + net472 + + + + + + + + + + + + + + diff --git a/VSTabPath.sln b/VSTabPath.sln index e4574dd..4486e9b 100644 --- a/VSTabPath.sln +++ b/VSTabPath.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 16 -VisualStudioVersion = 16.0.29009.5 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.32126.317 MinimumVisualStudioVersion = 10.0.40219.1 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VSTabPath", "VSTabPath\VSTabPath.csproj", "{E2F60519-D34F-4411-9AB7-7916FC004E9F}" EndProject @@ -12,7 +12,22 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VSTabPath.Tests", "VSTabPath.Tests\VSTabPath.Tests.csproj", "{13611075-94B6-4EA9-B777-D56A83DB16D6}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Interop", "Interop", "{9BDB0B29-A5FB-464E-A0C1-C4F39FF9FB89}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "VSTabPath.Interop.Contracts", "VSTabPath.Interop.Contracts\VSTabPath.Interop.Contracts.csproj", "{9F749E75-5CC7-4358-9F65-E73DACCE9439}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "VSTabPath.Interop.X86", "VSTabPath.Interop.X86\VSTabPath.Interop.X86.csproj", "{861326D9-89DA-48AA-95AE-B8D39F2C654F}" +EndProject +Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "VSTabPath.Interop.Shared", "VSTabPath.Interop.Shared\VSTabPath.Interop.Shared.shproj", "{064A5FF7-B156-4165-9594-9867F5A5D382}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "VSTabPath.Interop.X64", "VSTabPath.Interop.X64\VSTabPath.Interop.X64.csproj", "{ACD4939F-F3B4-4441-B140-BEFCBA0BE115}" +EndProject Global + GlobalSection(SharedMSBuildProjectFiles) = preSolution + VSTabPath.Interop.Shared\VSTabPath.Interop.Shared.projitems*{064a5ff7-b156-4165-9594-9867f5a5d382}*SharedItemsImports = 13 + VSTabPath.Interop.Shared\VSTabPath.Interop.Shared.projitems*{861326d9-89da-48aa-95ae-b8d39f2c654f}*SharedItemsImports = 5 + VSTabPath.Interop.Shared\VSTabPath.Interop.Shared.projitems*{acd4939f-f3b4-4441-b140-befcba0be115}*SharedItemsImports = 5 + EndGlobalSection GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Release|Any CPU = Release|Any CPU @@ -26,10 +41,28 @@ Global {13611075-94B6-4EA9-B777-D56A83DB16D6}.Debug|Any CPU.Build.0 = Debug|Any CPU {13611075-94B6-4EA9-B777-D56A83DB16D6}.Release|Any CPU.ActiveCfg = Release|Any CPU {13611075-94B6-4EA9-B777-D56A83DB16D6}.Release|Any CPU.Build.0 = Release|Any CPU + {9F749E75-5CC7-4358-9F65-E73DACCE9439}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9F749E75-5CC7-4358-9F65-E73DACCE9439}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9F749E75-5CC7-4358-9F65-E73DACCE9439}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9F749E75-5CC7-4358-9F65-E73DACCE9439}.Release|Any CPU.Build.0 = Release|Any CPU + {861326D9-89DA-48AA-95AE-B8D39F2C654F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {861326D9-89DA-48AA-95AE-B8D39F2C654F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {861326D9-89DA-48AA-95AE-B8D39F2C654F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {861326D9-89DA-48AA-95AE-B8D39F2C654F}.Release|Any CPU.Build.0 = Release|Any CPU + {ACD4939F-F3B4-4441-B140-BEFCBA0BE115}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {ACD4939F-F3B4-4441-B140-BEFCBA0BE115}.Debug|Any CPU.Build.0 = Debug|Any CPU + {ACD4939F-F3B4-4441-B140-BEFCBA0BE115}.Release|Any CPU.ActiveCfg = Release|Any CPU + {ACD4939F-F3B4-4441-B140-BEFCBA0BE115}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection + GlobalSection(NestedProjects) = preSolution + {9F749E75-5CC7-4358-9F65-E73DACCE9439} = {9BDB0B29-A5FB-464E-A0C1-C4F39FF9FB89} + {861326D9-89DA-48AA-95AE-B8D39F2C654F} = {9BDB0B29-A5FB-464E-A0C1-C4F39FF9FB89} + {064A5FF7-B156-4165-9594-9867F5A5D382} = {9BDB0B29-A5FB-464E-A0C1-C4F39FF9FB89} + {ACD4939F-F3B4-4441-B140-BEFCBA0BE115} = {9BDB0B29-A5FB-464E-A0C1-C4F39FF9FB89} + EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {73BC04EB-A8B6-4EF6-A137-3E4DC594D994} EndGlobalSection diff --git a/VSTabPath/Properties/AssemblyInfo.cs b/VSTabPath/Properties/AssemblyInfo.cs index 5b3346c..2448287 100644 --- a/VSTabPath/Properties/AssemblyInfo.cs +++ b/VSTabPath/Properties/AssemblyInfo.cs @@ -1,5 +1,4 @@ using System.Reflection; -using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following @@ -29,5 +28,5 @@ // 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: AssemblyVersion("1.2.2.0")] -[assembly: AssemblyFileVersion("1.2.2.0")] +[assembly: AssemblyVersion("1.3.0.0")] +[assembly: AssemblyFileVersion("1.3.0.0")] diff --git a/VSTabPath/TabPathPackage.cs b/VSTabPath/TabPathPackage.cs index 97f4c83..fc69765 100644 --- a/VSTabPath/TabPathPackage.cs +++ b/VSTabPath/TabPathPackage.cs @@ -1,12 +1,12 @@ -using System; +using Microsoft.VisualStudio.PlatformUI.Shell; +using Microsoft.VisualStudio.Shell; +using Microsoft.VisualStudio.Shell.Interop; +using System; using System.Diagnostics.CodeAnalysis; using System.Reflection; using System.Runtime.InteropServices; using System.Threading; using System.Windows; -using Microsoft.VisualStudio.PlatformUI.Shell; -using Microsoft.VisualStudio.Shell; -using Microsoft.VisualStudio.Shell.Interop; using Task = System.Threading.Tasks.Task; namespace VSTabPath @@ -29,7 +29,7 @@ namespace VSTabPath /// /// [PackageRegistration(UseManagedResourcesOnly = true, AllowsBackgroundLoading = true)] - [InstalledProductRegistration("#110", "#112", "1.2.2", IconResourceID = 400)] // Info on this package for Help/About + [InstalledProductRegistration("#110", "#112", Vsix.Version, IconResourceID = 400)] // Info on this package for Help/About [Guid(PackageGuidString)] [SuppressMessage("StyleCop.CSharp.DocumentationRules", "SA1650:ElementDocumentationMustBeSpelledCorrectly", Justification = "pkgdef, VS and vsixmanifest are valid VS terms")] [ProvideAutoLoad(UIContextGuids.SolutionExists, PackageAutoLoadFlags.BackgroundLoad)] diff --git a/VSTabPath/TabTitleManager.cs b/VSTabPath/TabTitleManager.cs index 35a2a14..08191ca 100644 --- a/VSTabPath/TabTitleManager.cs +++ b/VSTabPath/TabTitleManager.cs @@ -1,14 +1,12 @@ -using System; +using Microsoft.VisualStudio.Platform.WindowManagement; +using Microsoft.VisualStudio.PlatformUI.Shell; +using Microsoft.VisualStudio.Shell; +using System; using System.Collections.Generic; using System.IO; -using System.Linq; using System.Windows; using System.Windows.Data; -using EnvDTE; -using Microsoft.VisualStudio.Platform.WindowManagement; -using Microsoft.VisualStudio.PlatformUI.Shell; -using Microsoft.VisualStudio.Shell; -using Microsoft.VisualStudio.Shell.Interop; +using VSTabPath.Interop.Contracts; using VSTabPath.Models; using VSTabPath.ViewModels; @@ -18,13 +16,13 @@ public class TabTitleManager { #region TabTitleManagerProperty - public static readonly DependencyProperty TabTitleManagerProperty = + public static readonly DependencyProperty TabTitleManagerProperty = DependencyProperty.RegisterAttached( nameof(TabTitleManager), typeof(TabTitleManager), typeof(TabTitleManager)); public static TabTitleManager GetTabTitleManager(ViewGroup target) { - return (TabTitleManager) target.GetValue(TabTitleManagerProperty); + return (TabTitleManager)target.GetValue(TabTitleManagerProperty); } public static void SetTabTitleManager(ViewGroup target, TabTitleManager value) @@ -51,49 +49,32 @@ public static void SetTabViewModel(DependencyObject element, TabViewModel value) public static TabViewModel GetTabViewModel(DependencyObject element) { - return (TabViewModel) element.GetValue(TabViewModelProperty); + return (TabViewModel)element.GetValue(TabViewModelProperty); } #endregion private readonly Dictionary _viewModels = new Dictionary(); private readonly DisplayPathResolver _displayPathResolver = new DisplayPathResolver(); - private readonly DTE _dte; + private readonly IDteInterop _dte; public TabTitleManager() { ThreadHelper.ThrowIfNotOnUIThread(); - _dte = (DTE) Package.GetGlobalService(typeof(SDTE)); + _dte = DteInteropResolver.Interop; _displayPathResolver.SolutionRootPath = GetSolutionRootPath(); - _dte.Events.SolutionEvents.Opened += () => + _dte.SolutionOpened += () => _displayPathResolver.SolutionRootPath = GetSolutionRootPath(); - _dte.Events.SolutionEvents.Renamed += _ => + _dte.SolutionRenamed += _ => _displayPathResolver.SolutionRootPath = GetSolutionRootPath(); - _dte.Events.SolutionEvents.AfterClosing += () => + _dte.SolutionClosed += () => _displayPathResolver.SolutionRootPath = null; } - private string GetSolutionRootPath() - { - ThreadHelper.ThrowIfNotOnUIThread(); - - var solution = _dte.Solution; - if (solution == null) - return null; - - var fullName = solution.FullName; - if (string.IsNullOrEmpty(fullName)) - { - // A project has been opened without a solution, so a temporary one is created. - // Use the project root path instead. - fullName = solution.Projects.Cast().FirstOrDefault()?.FullName; - } - - return string.IsNullOrEmpty(fullName) ? null : Path.GetDirectoryName(fullName); - } + private string GetSolutionRootPath() => _dte.GetSolutionRootPath(); public void RegisterDocumentView(DocumentView view) { @@ -125,8 +106,8 @@ private void InstallTabTitlePath(DocumentView view) SetTabViewModel(view, viewModel); view.DocumentTabTitleTemplate = view.TabTitleTemplate = - (DataTemplate) Application.Current.FindResource("TabPathTemplate"); - + (DataTemplate)Application.Current.FindResource("TabPathTemplate"); + _viewModels.Add(view, viewModel); frame.FrameDestroyed += (sender, args) => @@ -139,7 +120,7 @@ private void InstallTabTitlePath(DocumentView view) private static TProperty EnsurePropertyValue(T target, DependencyProperty property, Func factory) where T : DependencyObject { - var value = (TProperty) target.GetValue(property); + var value = (TProperty)target.GetValue(property); if (value == null) { value = factory(); diff --git a/VSTabPath/VSTabPath.csproj b/VSTabPath/VSTabPath.csproj index 24c7ff7..92a738b 100644 --- a/VSTabPath/VSTabPath.csproj +++ b/VSTabPath/VSTabPath.csproj @@ -15,6 +15,7 @@ Key.snk + Debug AnyCPU @@ -59,6 +60,11 @@ + + True + True + source.extension.vsixmanifest + @@ -68,45 +74,21 @@ Designer + VsixManifestGenerator + source.extension.cs + + - - - - False - - - False - - - False - - - False - - - False - - - False - ..\..\..\..\..\..\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\Microsoft.VisualStudio.Platform.WindowManagement.dll - False - - - False - ..\..\..\..\..\..\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\Microsoft.VisualStudio.Shell.ViewManager.dll - False - + + - - False - @@ -133,22 +115,44 @@ - 2020.1.0 + 2021.3.0 - 16.7.30329.88 + $(_VisualStudioSdkVersion) - 16.8.3038 + 17.0.5234 runtime; build; native; contentfiles; analyzers; buildtransitive all 4.5.0 + + 2.8.4 + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + + + + {9f749e75-5cc7-4358-9f65-e73dacce9439} + VSTabPath.Interop.Contracts + + + {acd4939f-f3b4-4441-b140-befcba0be115} + VSTabPath.Interop.X64 + false + + + {861326d9-89da-48aa-95ae-b8d39f2c654f} + VSTabPath.Interop.X86 + false + + + + + 15.0 + + + + <_VisualStudioVersionRange>[15.0,16.0) + <_VisualStudioSdkVersion>15.0.26606 + + + + <_VisualStudioVersionRange>[16.0,17.0) + <_VisualStudioSdkVersion>16.0.28729 + + + + <_VisualStudioVersionRange>[17.0,18.0) + <_VisualStudioSdkVersion>17.0.32112.339 + + + \ No newline at end of file diff --git a/VSTabPath/VisualStudio.targets b/VSTabPath/VisualStudio.targets new file mode 100644 index 0000000..f788d6d --- /dev/null +++ b/VSTabPath/VisualStudio.targets @@ -0,0 +1,14 @@ + + + + + + + + + <_VisualStudioReference Include="@(Reference)" Condition="%(Reference->HasMetadata('IsVisualStudio')) == 'True'" /> + + + + + \ No newline at end of file diff --git a/VSTabPath/index.html b/VSTabPath/index.html deleted file mode 100644 index 1fee824..0000000 --- a/VSTabPath/index.html +++ /dev/null @@ -1,65 +0,0 @@ - - - - - - - - Getting Started - - - -
- - -
-
-

Creating a Visual Studio Extension

- -

This project enables developers to create an extension for Visual Studio. The solution contains a VSIX project that packages the extension into a VSIX file. This file is used to install an extension for Visual Studio.

-

Add new features

- -
    -
  1. Right-click the project node in Solution Explorer and select Add>New Item.
  2. -
  3. In the Add New Item dialog box, expand the Extensibility node under Visual C# or Visual Basic.
  4. -
  5. Choose from the available item templates: Visual Studio Package, Editor Items (Classifier, Margin, Text Adornment, Viewport Adornment), Command, Tool Window, Toolbox Control, and then click Add.
  6. -
- -

The files for the template that you selected are added to the project. You can start adding functionality to your item template, press F5 to run the project, or add additional item templates.

- -

Run and debug

-

To run the project, press F5. Visual Studio will:

- -
    -
  • Build the extension from the VSIX project.
  • -
  • Create a VSIX package from the VSIX project.
  • -
  • When debugging, start an experimental instance of Visual Studio with the VSIX package installed.
  • -
- -

In the experimental instance of Visual Studio you can test out the functionality of your extension without affecting your Visual Studio installation.

- -
-
-
-

Visual Studio Extensibility Resources

- -
    -
  1. Visual Studio documentation
    Detailed documentation and API reference material for building extensions.
  2. -
  3. Extension samples on GitHub
    Use a sample project to kickstart your development.
  4. -
  5. Extensibility chat room on Gitter
    Meet other extension developers and exchange tips and tricks for extension development.
  6. -
  7. Channel 9 videos on extensibility
    Watch videos from the product team on Visual Studio extensibility.
  8. -
  9. Extensibility Tools
    Install an optional helper tool that adds extra IDE support for extension authors.
  10. -
-

Give us feedback

- -
-
-
-
- - diff --git a/VSTabPath/source.extension.cs b/VSTabPath/source.extension.cs new file mode 100644 index 0000000..e03f3da --- /dev/null +++ b/VSTabPath/source.extension.cs @@ -0,0 +1,18 @@ +// ------------------------------------------------------------------------------ +// +// This file was generated by VSIX Synchronizer +// +// ------------------------------------------------------------------------------ +namespace VSTabPath +{ + internal sealed partial class Vsix + { + public const string Id = "VSTabPath.a8bf68de-eafb-40c2-bbb2-b8da07d67630"; + public const string Name = "TabPath"; + public const string Description = @"Shows file paths in tab titles."; + public const string Language = "en-US"; + public const string Version = "1.3.0"; + public const string Author = "Dark Daskin"; + public const string Tags = ""; + } +} diff --git a/VSTabPath/source.extension.vsixmanifest b/VSTabPath/source.extension.vsixmanifest index 5db9cd9..7d3a601 100644 --- a/VSTabPath/source.extension.vsixmanifest +++ b/VSTabPath/source.extension.vsixmanifest @@ -1,21 +1,26 @@ - + TabPath Shows file paths in tab titles. + + amd64 + - + - + + + - + \ No newline at end of file diff --git a/VSTabPath/stylesheet.css b/VSTabPath/stylesheet.css deleted file mode 100644 index d5e9c71..0000000 --- a/VSTabPath/stylesheet.css +++ /dev/null @@ -1,129 +0,0 @@ -body { - margin: 0; - padding: 0; - border: 0; - color: #1E1E1E; - font-size: 13px; - font-family: "Segoe UI", Helvetica, Arial, sans-serif; - line-height: 1.45; - word-wrap: break-word; -} - -/* General & 'Reset' Stuff */ - - -.container { - width: 980px; - margin: 0 auto; -} - -section { - display: block; - margin: 0; -} - -h1, h2, h3, h4, h5, h6 { - margin: 0; -} - -/* Header,
- header - container - h1 - project name - h2 - project description -*/ - -#header { - color: #FFF; - background: #68217a; - position:relative; -} -#hangcloud { - width: 190px; - height: 160px; - background: url("../images/bannerart03.png"); - position: absolute; - top: 0; - right: -30px; -} -h1, h2 { - font-family: "Segoe UI Light", "Segoe UI", Helvetica, Arial, sans-serif; - line-height: 1; - margin: 0 18px; - padding: 0; -} -#header h1 { - font-size: 3.4em; - padding-top: 18px; - font-weight: normal; - margin-left: 15px; -} - -#header h2 { - font-size: 1.5em; - margin-top: 10px; - padding-bottom: 18px; - font-weight: normal; -} - - -#main_content { - width: 100%; - display: flex; - flex-direction: row; -} - - -h1, h2, h3, h4, h5, h6 { - font-weight: bolder; -} - -#main_content h1 { - font-size: 1.8em; - margin-top: 34px; -} - - #main_content h1:first-child { - margin-top: 30px; - } - -#main_content h2 { - font-size: 1.4em; - font-weight: bold; -} -p, ul { - margin: 11px 18px; -} - -#main_content a { - color: #06C; - text-decoration: none; -} -ul { - margin-top: 13px; - margin-left: 18px; - padding-left: 0; -} - ul li { - margin-left: 18px; - padding-left: 0; - } -#lpanel { - width: 620px; - float: left; -} -#rpanel ul { - list-style-type: none; - width: 300px; -} - #rpanel ul li { - line-height: 1.8em; - } -#rpanel { - background: #e7e7e7; - width: 360px; - float: right; -} - -#rpanel div { - width: 300px; -}