jonkeda / VarTypeViewer

VarTypeViewer
The Unlicense
6 stars 0 forks source link

VS2019 (Preview) support #1

Open KoalaBear84 opened 5 years ago

KoalaBear84 commented 5 years ago

Also written it as Q & A on the Marketplace, and also writing it here.

I'm trying to install it in VS 2019 Preview, but it wont by default showing the following (only when trying to install it from VS, not through marketplace): https://i.imgur.com/WMpv2B9.png

Following these instructions to just remove it didn't work out. https://stackoverflow.com/questions/53652152/visual-studio-2019-mpf-15-0-is-missing

2019-04-19 09:18:09 - Beginning to install extension to Visual Studio Enterprise 2019 Preview... 2019-04-19 09:18:11 - The dependent package of 'Component.Srt2VarTypeViewerVsix,version=0.7' cannot be found: Microsoft.VisualStudio.Component.CoreEditor,version=[15.0,16.0). 2019-04-19 09:18:11 - Install Error : Microsoft.VisualStudio.Setup.Dependencies.DependencyGraphConstructionException: The dependent package of 'Component.Srt2VarTypeViewerVsix,version=0.7' cannot be found: Microsoft.VisualStudio.Component.CoreEditor,version=[15.0,16.0).

Could you please check the support with VS 2019? (Maybe a clean VM is needed because you might have the dependencies?)

Thanks in advance!

michaelm7456 commented 4 years ago

I've raised a Pull Request here with a change to allow the Extension to work with Visual Studio 2019.

This should also resolve Issue# 2 - Visual Studio 2019 Community support

Hope this helps!

KoalaBear84 commented 4 years ago

Great, thanks 👍

KoalaBear84 commented 4 years ago

Looks like it's last activity was in October 2019 for @jonkeda

Guess the plugin/extension needs a new owner.

I've tried to build this myself, but getting errors like this:

Assembly 'Microsoft.VisualStudio.Text.UI' with identity 'Microsoft.VisualStudio.Text.UI, Version=16.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' uses 'Microsoft.VisualStudio.CoreUtility, Version=16.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' which has a higher version than referenced assembly 'Microsoft.VisualStudio.CoreUtility' with identity 'Microsoft.VisualStudio.CoreUtility, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' in \VarTypeViewer\Support\IntraTextAdornmentTagger.cs

Any idea how to resolve?

michaelm7456 commented 4 years ago

@KoalaBear84 , I think I've fixed that issue with the conflicting 'Microsoft.VisualStudio.CoreUtility' package.

I had to upgrade the Project from .NET Framework '4.7' to '4.7.2' in order to resolve this one.

I've layered the changes on top of the original PR I had raised to allow VS 2019 compatibility.

The latest changes are here to allow local successful builds.

If you want to download the latest fork with my changes applied it's here

I've also attached a copy of the VSIX Installer compiled successfully via my local build if you need a copy to get by in the meantime. (You'll have to extract it first as it didn't let me upload the VSIX file directly.)

VarTypeViewer.zip

Hope this helps!

@jonkeda, is it possible to have these Pull Requests reviewed and hopefully approved/published?

Many thanks!

KoalaBear84 commented 4 years ago

I have installed it, but it doesn't seem to work on my Visual Studio 2019 Community Preview. Maybe it isn't supported?

michaelm7456 commented 4 years ago

Hmm, that may be the case unfortunately.

I only tested this against the vanilla VS 2019 Community Edition when I got the Build working.

I never tested this on VS 2019 Community Preview, so I can't confirm it's 100% working on the VS Preview versions.

KoalaBear84 commented 4 years ago

I see @jonkeda has merged, that is great news, thanks!

Hmm, I see for Community it has a lower number than the other versions.

    <InstallationTarget Id="Microsoft.VisualStudio.Community" Version="[15.0]" />
    <InstallationTarget Version="[15.0,16.0)" Id="Microsoft.VisualStudio.Pro" />
    <InstallationTarget Version="[15.0,16.0)" Id="Microsoft.VisualStudio.Enterprise" />

Maybe if you add 16 like in the others that it will work, and also swap Version and Id so it's the same as the others.

More info: https://devblogs.microsoft.com/visualstudio/visual-studio-extensions-and-version-ranges-demystified/ https://docs.microsoft.com/en-us/visualstudio/install/visual-studio-build-numbers-and-release-dates?view=vs-2019

michaelm7456 commented 4 years ago

Likewise @jonkeda, many thanks for the approval and merge!

It looks like the latest changes in the 'vsixmanifest' file after the merge are now reflecting as supporting 'Community/Professional/Enterprise' up to 17.0 (Which should cover every VS 2019 iteration including VS 2019 Preview according to those links)

@KoalaBear84, I think this should cover your requested change to have the 3 Version ranges corrected and tidied up.

Latest version of VSIX Manifest after PR# 3 merged

I'm not sure what would be involved in publishing the repo to the Visual Studio Marketplace as I've never done this, but if this can be done the latest changes for this Extension would be available to download for everyone.

As for this Extension having issues on VS 2019 Preview as you had reported @KoalaBear84, I'll try and have a dig into it this week if I can.

Thanks for the updates guys!

KoalaBear84 commented 4 years ago

Aww. Looks like the 'online' extension version (0.8 published after this merge) is not the same as 0.6, which I see in the VSIX Manifest.

2020-08-18 14:15:22 - Beginning to install extension to Visual Studio Community 2019 Preview...
2020-08-18 14:15:22 - Upgrading 'VarTypeViewer.Vsix', version 0.6 to version 0.8.
2020-08-18 14:15:22 - Failed to create scheduled task: UpdateConfiguration_S-1-5-82-2189381752-3624650101-781368281-1150996245-1672453788
2020-08-18 14:15:22 - Failed to create the update configuration task for user IIS APPPOOL\Rand: (9,80):UserId:S-1-5-82-2189381752-3624650101-781368281-1150996245-1672453788
2020-08-18 14:15:22 - Failed to create scheduled task: UpdateConfiguration_S-1-5-82-2330413713-3179902198-1573397649-669180203-3527527918
2020-08-18 14:15:22 - Failed to create the update configuration task for user IIS APPPOOL\Dashboard: (9,80):UserId:S-1-5-82-2330413713-3179902198-1573397649-669180203-3527527918
2020-08-18 14:15:22 - Failed to create scheduled task: UpdateConfiguration_S-1-5-82-3006700770-424185619-1745488364-794895919-4004696415
2020-08-18 14:15:22 - Failed to create the update configuration task for user IIS APPPOOL\DefaultAppPool: (9,79):UserId:S-1-5-82-3006700770-424185619-1745488364-794895919-4004696415
2020-08-18 14:15:23 - Version value mismatch. VsixManifest value: '0.8'; Catalog manifest value: '0.6'; Package manifest value: '0.6'
2020-08-18 14:15:23 - Install Error : System.InvalidOperationException: The value of property 'Version' is not consistent amongst all manifests.
   at Microsoft.VisualStudio.ExtensionManager.PackageInstaller.ValidateManifestConsistency(VsixPackage catalogPackage, VsixPackage embeddedPackage, InstallableExtensionImpl extension, ILogger logger)
   at Microsoft.VisualStudio.ExtensionManager.PackageInstaller.Validate(ZipPackage packageContainer, IEngineHost engineHost)
   at Microsoft.VisualStudio.ExtensionManager.DefaultPackageInstaller.Validate(ZipPackage packageContainer, IEngineHost engineHost)
   at Microsoft.VisualStudio.ExtensionManager.ExtensionEngineImpl.PerformSetupEngineInstall(InstallableExtensionImpl extension, Boolean installPerMachine, Boolean isPackComponent, IDictionary`2 extensionsInstalledSoFar, List`1 extensionsUninstalledSoFar, IInstalledExtensionList modifiedInstalledExtensionsList, IProgress`1 progress, InstallFlags installFlags, AsyncOperation asyncOp, Version targetedVsVersion, IInstalledExtension& newExtension)
   at Microsoft.VisualStudio.ExtensionManager.ExtensionEngineImpl.InstallInternal(InstallableExtensionImpl extension, InstallFlags installFlags, IDictionary`2 extensionsInstalledSoFar, List`1 extensionsUninstalledSoFar, IInstalledExtensionList modifiedInstalledExtensionsList, AsyncOperation asyncOp, IProgress`1 progress, Version targetedVsVersion)
   at Microsoft.VisualStudio.ExtensionManager.ExtensionEngineImpl.BeginInstall(IInstallableExtension installableExtension, InstallFlags installFlags, AsyncOperation asyncOp, Version targetedVsVersion)
   at Microsoft.VisualStudio.ExtensionManager.ExtensionEngineImpl.InstallWorker(IInstallableExtension extension, InstallFlags installFlags, AsyncOperation asyncOp)

We're almost there! 😁

jonkeda commented 4 years ago

You might want to consider buying a licence of R# (resharper).

They have the var type viewing incorporated.

I don't use this extension anymore. :-)

KoalaBear84 commented 4 years ago

I understand, situation is getting better as there is a good refactorer.

And if with only a small change to the current extension is needed to keep it alive, I would appreciate it 😇

michaelm7456 commented 4 years ago

I've put in another Pull Request here to bump the Version Number in the Manifest from '0.6' to '0.9'. (Latest current Version in VS Gallery is Version '0.8' which allows Extension to work with Visual Studio 2019)

This should (hopefully) fix your reported issue of the Extension Version mismatch @KoalaBear84.

Sorry @jonkeda, this should hopefully be the last time we trouble you for a good while!

I actually used to use ReSharper a ton and was a huge fan but I'm now switched over to VS 2019's built in '.NET Productivity Tools' instead, they're getting really quite powerful now.

KoalaBear84 commented 4 years ago

@jonkeda If you have time, please release it to the marketplace 😇