Closed glyph-se closed 2 years ago
Thanks, very helpful. It looks like it is too early to work on this as the Marketplace doesn't support both 2022 and pre-2022 versions yet. But from reading the docs it should be relatively straightforward (though a bit annoying compared to the previous updates as we'll have to maintain multiple vsix). I'll work on this when VS 2022 is closer to release (or if more people manifest that they really need this).
I agree that this might not be critical yet. I guess I am one of the few that have started to use it already :-)
But I don't understand what you mean by the Marketplace not supporting it?
There are several extensions that support both 2022 and pre-2022 versions. For example I looked into https://marketplace.visualstudio.com/items?itemName=MadsKristensen.OpenCommandLine and as far as I can see it only produces one Vsix file that can be installed into both.
This page says a separate VSIX will be needed for VS 2022: https://docs.microsoft.com/en-us/visualstudio/extensibility/migration/update-visual-studio-extension?view=vs-2022
For the preview releases of Visual Studio 2022, the Marketplace will only support a single VSIX file per Marketplace listing. While Visual Studio 2022 is in preview we encourage you to have a separate Visual Studio 2022 only Marketplace listing for your extension. That way you can iterate your Visual Studio 2022 extension as needed without impacting your customers on earlier versions of Visual Studio. You can also mark the extension as 'preview' to set the expectation it will likely be less reliable, even if the source of that unreliability is Visual Studio 2022, than your mainstream extension.
But based on what you've seen, maybe it works (just not recommended/fully supported) with the same VSIX. Good idea to test first.
Since the preview release of ReSharper I completely switched to VS 2022. Therefore, I would really appreciate if you could adjust this extension.
I don't have time to clean this up and make it a pull request. But for anyone who is interested - this patch here will give you something that you can compile in Visual Studio 2022 Preview and then use with Visual Studio 2022 (Pro or Community). If you do: be aware that this is likely to interfere with any upcoming official release.
I'm mostly posting this in the hope that it is useful to @mayerwin:
[17,18)
and need to be extended to the other editions.As file: vs2022-patch.txt
From 4d2519253f0631fb71c5dc0ef7126231687e2b7c Mon Sep 17 00:00:00 2001
From: Anon <anon@example.com>
Date: Fri, 10 Sep 2021 17:21:09 +0200
Subject: [PATCH] WIP
---
.../CustomizeVSWindowTitle.csproj | 26 +++++++++++++------
.../Properties/Resources.Designer.cs | 12 ++++++---
.../source.extension.vsixmanifest | 24 +++++++++++++----
3 files changed, 45 insertions(+), 17 deletions(-)
diff --git a/CustomizeVSWindowTitle/CustomizeVSWindowTitle.csproj b/CustomizeVSWindowTitle/CustomizeVSWindowTitle.csproj
index aeb3086..448c812 100644
--- a/CustomizeVSWindowTitle/CustomizeVSWindowTitle.csproj
+++ b/CustomizeVSWindowTitle/CustomizeVSWindowTitle.csproj
@@ -25,7 +25,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>ErwinMayerLabs.RenameVSWindowTitle</RootNamespace>
<AssemblyName>CustomizeVSWindowTitle</AssemblyName>
- <TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
+ <TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<GeneratePkgDefFile>true</GeneratePkgDefFile>
<UseCodebase>true</UseCodebase>
<IncludeAssemblyInVSIXContainer>true</IncludeAssemblyInVSIXContainer>
@@ -66,7 +66,7 @@
<Compile Include="FilePickerEditor.cs" />
<Compile Include="Globals.cs" />
<Compile Include="GlobalSettingsPageGrid.cs">
- <SubType>component</SubType>
+ <SubType>Component</SubType>
</Compile>
<Compile Include="GlobalSuppressions.cs" />
<Compile Include="Guids.cs" />
@@ -174,14 +174,24 @@
<Reference Include="WindowsBase" />
</ItemGroup>
<ItemGroup>
- <PackageReference Include="Microsoft.VisualStudio.SDK.Analyzers">
- <Version>15.8.36</Version>
+ <PackageReference Include="Microsoft.VisualStudio.SDK">
+ <Version>17.0.0-previews-3-31605-261</Version>
+ </PackageReference>
+ <PackageReference Include="Microsoft.VisualStudio.Shell.15.0">
+ <Version>17.0.0-previews-3-31605-261</Version>
</PackageReference>
- <PackageReference Include="Microsoft.VisualStudio.Shell.14.0">
- <Version>14.3.25407</Version>
+ <PackageReference Include="Microsoft.VisualStudio.Shell.Interop">
+ <Version>17.0.0-previews-3-31605-261</Version>
</PackageReference>
- <PackageReference Include="VSSDK.DTE.10">
- <Version>10.0.4</Version>
+ <PackageReference Include="Microsoft.VSSDK.BuildTools">
+ <Version>17.0.4207-preview4</Version>
+ <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
+ <PrivateAssets>all</PrivateAssets>
+ </PackageReference>
+ <PackageReference Include="Microsoft.VisualStudio.SDK.Analyzers">
+ <Version>16.10.10</Version>
+ <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
+ <PrivateAssets>all</PrivateAssets>
</PackageReference>
</ItemGroup>
<ItemGroup>
diff --git a/CustomizeVSWindowTitle/Properties/Resources.Designer.cs b/CustomizeVSWindowTitle/Properties/Resources.Designer.cs
index 623e6b8..818c795 100644
--- a/CustomizeVSWindowTitle/Properties/Resources.Designer.cs
+++ b/CustomizeVSWindowTitle/Properties/Resources.Designer.cs
@@ -19,7 +19,7 @@ namespace ErwinMayerLabs.RenameVSWindowTitle.Properties {
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources {
@@ -83,7 +83,7 @@ namespace ErwinMayerLabs.RenameVSWindowTitle.Properties {
///}
///
////* HTML5 display definitions
- /// ============== [rest of string was truncated]";.
+ /// ==================================== [rest of string was truncated]";.
/// </summary>
internal static string normalize {
get {
@@ -97,7 +97,7 @@ namespace ErwinMayerLabs.RenameVSWindowTitle.Properties {
///
///function selectText(obj) { // adapted from Denis Sadowski (via StackOverflow.com)
/// var range;
- /// if (document [rest of string was truncated]";.
+ /// if (document.sele [rest of string was truncated]";.
/// </summary>
internal static string script {
get {
@@ -139,7 +139,11 @@ namespace ErwinMayerLabs.RenameVSWindowTitle.Properties {
/// font-size: 10pt;
/// line-height: 22px;
/// text-align: left;
- /// [rest of string was truncated]";.
+ ///}
+ ///
+ ///p {
+ /// font-size: 11pt;
+ /// m [rest of string was truncated]";.
/// </summary>
internal static string style {
get {
diff --git a/CustomizeVSWindowTitle/source.extension.vsixmanifest b/CustomizeVSWindowTitle/source.extension.vsixmanifest
index a187f86..b0e4476 100644
--- a/CustomizeVSWindowTitle/source.extension.vsixmanifest
+++ b/CustomizeVSWindowTitle/source.extension.vsixmanifest
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<PackageManifest Version="2.0.0" xmlns="http://schemas.microsoft.com/developer/vsx-schema/2011" xmlns:d="http://schemas.microsoft.com/developer/vsx-schema-design/2011">
<Metadata>
- <Identity Id="5126c493-138a-46d7-a04d-ad772f6be159" Version="4.7.0" Language="en-US" Publisher="Erwin Mayer" />
+ <Identity Id="5126c493-138a-46d7-a04d-ad772f6be159" Version="4.7.1" Language="en-US" Publisher="Erwin Mayer" />
<DisplayName>Customize Visual Studio Window Title</DisplayName>
<Description xml:space="preserve">This lightweight extension allows changing the window title of Visual Studio to include a folder tree with a configurable min depth and max depth distance from the solution/project file, and the use of special tags to help with many other possible scenarios (Git, Hg, TFS, SVN...).
Solution-specific overriding rules are available as well to cover virtually any possible renaming needs. It can also be configured so that the rules apply only when at least two instances of Visual Studio are running with the same window title.
@@ -13,10 +13,24 @@ This is particularly useful when branching a solution/project: it becomes possib
<Tags>Git, Hg, TFS, Team Foundation Server, SVN, Window title, solution path, path, explicit title, multiple instances, rename title, change title, replace title, branch name</Tags>
</Metadata>
<Installation>
- <InstallationTarget Version="[14.0,)" Id="Microsoft.VisualStudio.Community" />
- <InstallationTarget Version="[14.0,)" Id="Microsoft.VisualStudio.Pro" />
- <InstallationTarget Version="[14.0,)" Id="Microsoft.VisualStudio.Enterprise" />
- <InstallationTarget Version="[14.0,)" Id="Microsoft.VisualStudio.IntegratedShell" />
+ <InstallationTarget Version="[14.0,)" Id="Microsoft.VisualStudio.Community">
+ <ProductArchitecture>x86</ProductArchitecture>
+ </InstallationTarget>
+ <InstallationTarget Version="[14.0,)" Id="Microsoft.VisualStudio.Pro">
+ <ProductArchitecture>x86</ProductArchitecture>
+ </InstallationTarget>
+ <InstallationTarget Version="[14.0,)" Id="Microsoft.VisualStudio.Enterprise">
+ <ProductArchitecture>x86</ProductArchitecture>
+ </InstallationTarget>
+ <InstallationTarget Version="[14.0,)" Id="Microsoft.VisualStudio.IntegratedShell">
+ <ProductArchitecture>x86</ProductArchitecture>
+ </InstallationTarget>
+ <InstallationTarget Version="[17.0,)" Id="Microsoft.VisualStudio.Pro">
+ <ProductArchitecture>amd64</ProductArchitecture>
+ </InstallationTarget>
+ <InstallationTarget Version="[17.0,)" Id="Microsoft.VisualStudio.Community">
+ <ProductArchitecture>amd64</ProductArchitecture>
+ </InstallationTarget>
</Installation>
<Dependencies>
<Dependency Id="Microsoft.Framework.NDP" DisplayName="Microsoft .NET Framework" d:Source="Manual" Version="[4.5,)" />
--
2.33.0.windows.1
Thanks! This will be helpful. Did you try following the official upgrade instructions (that's what I'm planning to do)?
Thanks! This will be helpful. Did you try following the official upgrade instructions (that's what I'm planning to do)?
No, not really. I happened to know that for some extensions you don't have to do much more than update the Install Targets
and rebuild in order to get 64-bit/amd64-compatible assemblies.
So I thought, I'd give it a try.
Turns out that wasn't enough because it stumbled over Microsoft.VisualStudio.Shell.14.0
at runtime (extension load failed)
So I went with: Remove packages that looked old, install alternative packages that had a 17.0.0-preview*
version number, see if it starts compiling again, run -> be lucky.
I am glad it's useful - thank you for your extension - it really helps with managing VS windows.
I applied the patch by @tskarman and removed the support for Team Foundation Server because the nuget packages was not setup correctly. The result worked in vs2022. https://github.com/AndersBillLinden/vs-customize-window-title/commits/master
Any ETA on when a new official release will arrive (with support for TFS) that works with VS 2022?
Planning to do this by year end. What really annoys me is the lack of possibility to release a version that supports both VS2019 and VS2022 on the same marketplace listing :(. Microsoft said it is planned which is a good thing, but who knows when. Some extension authors seem to have succeeded in finding a way, if you know how any insight is welcome.
A split isn't always necessary. It is possible to have an extension for both version ranges in a single vsix, depends on which VS api's you use.
First step would be replacing any DTE call with replacements from https://github.com/VsixCommunity/Community.VisualStudio.Toolkit
I have been able to release a version supporting VS 2022: https://github.com/mayerwin/vs-customize-window-title/releases/tag/5.0.1
Currently needs to be installed via the VSIX file as Microsoft still hasn't added the possibility to support both VS 2022 and prior versions on the marketplace :(. Let's hope they can complete this quickly.
Tried the new version: 1) no change in the window title with standard settings. Crazy: The title had been changed in the windows taskbar (Win 10). 2) VS2022 'hangs' when setting "farthest parent folder depth" to 2 (i know, its the very first version for VS2022. Hopefully my comments helps U to debug, I like the extension)
Tried the new version:
- no change in the window title with standard settings. Crazy: The title had been changed in the windows taskbar (Win 10).
- VS2022 'hangs' when setting "farthest parent folder depth" to 2 (i know, its the very first version for VS2022. Hopefully my comments helps U to debug, I like the extension)
@MFuxel
UR right, the option again... has to be switched off. Thx!
I think the Marketplace should now support extensions targeting both VS 2022 and <= VS 2019 in a single listing. See e.g. these extensions:
Why was this closed? I still do not see this extension in the VS Marketplace if I search for it from within VS2022. This is the last extension from VS2019 that I really miss in VS2022.
@IngmarBitter This issue has been closed because a release has been published for VS2022. It is not available through the marketplace yet as we're still waiting for MSFT to implement support for dual targeting (really looking forward to it), but you can already download the VSIX in GitHub.
Wouldn't you consider what I've written under https://github.com/mayerwin/vs-customize-window-title/issues/64#issuecomment-1008354918? In the meantime, we've done the same thing with our VS extension. It seems that the trick is that you can publish a VS 2022 extension over the existing older one, but at that point the Marketplace listing will be only for VS 2022. I think this is acceptable, and you can still make older versions of your extension available as manual download links.
Doing this instead of what some other extensions have done by publishing a new listing on the marketplace just for VS 2022 has the advantage of continuity, keeping accumulated install counts and ratings.
OK I have done that, thanks for the suggestion. I didn't want to do it earlier as almost nobody was using VS2022, but by now I guess most users would have switch (if not, they should).
Awesome, thank you!
While there are no support for it yet I found no existing GitHub issue, so I thought I would create one to keep track of it.
To start I just tried just adding the version to
source.extension.vsixmanifest
like thisBut upon starting VS 2022 with the extension I get the following error
I haven't done any Visual Studio Extension development myself so I don't really know how to proceed. But I found this page that might be helpful https://docs.microsoft.com/en-us/visualstudio/extensibility/migration/update-visual-studio-extension?view=vs-2022