TaoK / PoorMansTSqlFormatter

A small free .Net and JS library (with demo UI, command-line bulk formatter, SSMS/VS add-in, notepad++ plugin, winmerge plugin, and demo webpage) for reformatting and coloring T-SQL code to the user's preferences.
http://www.architectshack.com/PoorMansTSqlFormatter.ashx
GNU Affero General Public License v3.0
947 stars 266 forks source link

SSMS 19 - Compatibility #283

Open verbeurew opened 2 years ago

verbeurew commented 2 years ago

Any plans to support SSMS 19?

Kind Regards

rahulmutreja commented 1 year ago

please update for ssms 19

adepew commented 1 year ago

SSMS 19.0 is now GA. Is there any timeline for adding support?

AlexanderStromer commented 1 year ago

@TaoK if someone were to put up a PR with SSMS 19 support, would this be merged here? I see there are a bunch of stale PRs, no activity to reconcile these.

thx

steelwil commented 1 year ago

I got it working this way.

  1. Install SSMS 17.9.1
  2. Install SSMS 19.x
  3. Install PoorMansTSqlFormatter
  4. copy PoorMansTSqlFormatterSSMSPackage.pkgdef to C:\Program Files (x86)\Microsoft SQL Server Management Studio 19\Extensions (located at C:\Program Files (x86)\Microsoft SQL Server Management Studio 17\Extensions or C:\Program Files (x86)\Microsoft SQL Server\140\Tools\Binn\ManagementStudio\Extensions)
  5. Re-open SSMS 19.x and it should appear under Tools. (you can now fix the shortcut keys CTRL-K CTRL-D)
  6. Uninstall SSMS 17.9.1
spike1234 commented 1 year ago

I got it working this way.

1. Install SSMS 17.9.1

2. Install SSMS 19.x

3. Install PoorMansTSqlFormatter

4. copy PoorMansTSqlFormatterSSMSPackage.pkgdef to C:\Program Files (x86)\Microsoft SQL Server Management Studio 19\Extensions (located at C:\Program Files (x86)\Microsoft SQL Server Management Studio 17\Extensions or C:\Program Files (x86)\Microsoft SQL Server\140\Tools\Binn\ManagementStudio\Extensions)

5. Re-open SSMS 19.x and it should appear under Tools. (you can now fix the shortcut keys CTRL-K CTRL-D)

6. Uninstall SSMS 17.9.1

Thanks a lot: it works!!

gggirj commented 1 year ago

I just made a working version for smss 19 https://simul-europe.com/PoorMansTSqlFormatterSSMSPackage.Setup.msi enjoy

kmills17 commented 1 year ago

thanks, it seems to install but the menu options are greyed out

gggirj commented 1 year ago

thanks, it seems to install but the menu options are greyed out

Edit ssms.exe.config C:\Program Files (x86)\Microsoft SQL Server Management Studio 18\Common7\IDE

In <assemblyBinding> Add

<dependentAssembly> <assemblyIdentity name="Microsoft.VisualStudio.Shell.12.0" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/> <bindingRedirect oldVersion="2.0.0.0-15.0.0.0" newVersion="15.0.0.0"/> </dependentAssembly> 
kmills17 commented 1 year ago

that worked a treat, thank you.

rahulmutreja commented 1 year ago

Yes it worked thanks

dwillis77 commented 1 year ago

I got it working this way.

1. Install SSMS 17.9.1

2. Install SSMS 19.x

3. Install PoorMansTSqlFormatter

4. copy PoorMansTSqlFormatterSSMSPackage.pkgdef to C:\Program Files (x86)\Microsoft SQL Server Management Studio 19\Extensions (located at C:\Program Files (x86)\Microsoft SQL Server Management Studio 17\Extensions or C:\Program Files (x86)\Microsoft SQL Server\140\Tools\Binn\ManagementStudio\Extensions)

5. Re-open SSMS 19.x and it should appear under Tools. (you can now fix the shortcut keys CTRL-K CTRL-D)

6. Uninstall SSMS 17.9.1

Thank you! This worked for me - although in my case I had SSMS v18 installed as the "older version" instead of v17 (since the extension will install successfully if it detects SSMS v18 being installed as well). To get it working with v18 though, I had to use the fix described here (which it seems is necessary if you are only running SSMS v18 without v17 alongside, since v18 does not include the VS 2015 Isolated Shell, it either needs the binding redirect or you have to install the VS 2015 Isolated Shell manually).

Using that in conjunction with this process got the extension working for me in both v18 and v19 (install v18, install v19, install extension, copy .pkgdef from the v18 installation folder to the v19 installation folder, perform the config file fix noted in the other thread).

PETERHUP commented 1 year ago

Installing https://simul-europe.com/PoorMansTSqlFormatterSSMSPackage.Setup.msi and Editing the ssms.exe.config C:\Program Files (x86)\Microsoft SQL Server Management Studio 19\Common7\IDE

In <assemblyBinding> Add

<dependentAssembly> <assemblyIdentity name="Microsoft.VisualStudio.Shell.12.0" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/> <bindingRedirect oldVersion="2.0.0.0-15.0.0.0" newVersion="15.0.0.0"/> </dependentAssembly> 

Works perfect using SSMS 19.1 too which is the only version I installed on my new machine.

Thanks gggirj

olibara commented 11 months ago

Unfortunately the update provided by [ggirj] still require .NET 2.0 And this is totally obsolete on Windows 11 It should be nice if Someone have the time and patience to update the solution for .NET 4* minimum

ImranMoTown commented 8 months ago

Hi Everyone, gggirj's link for an SSMS 19 compatible package no longer seems to work, does anyone know where else to get it? Old broken link: https://simul-europe.com/PoorMansTSqlFormatterSSMSPackage.Setup.msi

gggirj commented 8 months ago

Hi Everyone, gggirj's link for an SSMS 19 compatible package no longer seems to work, does anyone know where else to get it? Old broken link: https://simul-europe.com/PoorMansTSqlFormatterSSMSPackage.Setup.msi

The link is working again

Nygards commented 5 months ago

Unfortunately the update provided by [ggirj] still require .NET 2.0 And this is totally obsolete on Windows 11 It should be nice if Someone have the time and patience to update the solution for .NET 4* minimum

I got it working by searching for "Turn Windows features on or off" and checking ".NET Frameowrk 3.5 (includes .NET 2.0 and 3.0)"

leobarreto commented 3 months ago

Instalando https://simul-europe.com/PoorMansTSqlFormatterSSMSPackage.Setup.msi e editando o ssms.exe.config C:\Program Files (x86)\Microsoft SQL Server Management Studio 19\Common7\IDE

In <assemblyBinding> Add

<dependentAssembly> <assemblyIdentity name="Microsoft.VisualStudio.Shell.12.0" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/> <bindingRedirect oldVersion="2.0.0.0-15.0.0.0" newVersion="15.0.0.0"/> </dependentAssembly> 

Funciona perfeitamente usando SSMS 19.1 também, que é a única versão que instalei em minha nova máquina.

Obrigado, gggirj

In version SSMS 19.3, it doesn't work.

icebluejean commented 3 months ago

Edit ssms.exe.config C:\Program Files (x86)\Microsoft SQL Server Management Studio 18\Common7\IDE

In <assemblyBinding> Add

<dependentAssembly> <assemblyIdentity name="Microsoft.VisualStudio.Shell.12.0" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/> <bindingRedirect oldVersion="2.0.0.0-15.0.0.0" newVersion="15.0.0.0"/> </dependentAssembly> 

It works in all versions of 19.3.4, 20.0.70 thank you

rizi commented 3 months ago

@gggirj would it be possible to create a installer for version 20.x, or tell me how to do it?

br

pazetto commented 1 month ago

@gggirj would it be possible to create a installer for version 20.x, or tell me how to do it?

br

I did what PETERHUP said above and it's working for me in v20.0

WyattBest commented 1 month ago

I've used this tool with SSMS 18, 19, and now 20 just by installing Visual Studio 2015 Shell (Isolated). No need to modify assembly bindings.

viksamiles77 commented 1 month ago

@pazetto I tried to install this: https://simul-europe.com/PoorMansTSqlFormatterSSMSPackage.Setup.msi It wont allow me because it says that I need older version of SSMS (I have 20.1.10). I added the changes that @PETERHUP made (adding the line of code in ssms.exe.config) but when I try to install the same thing it shows the same error. Am I doing something wrong, can you help?