Reputation: 75
On installing SQL Server Management Studio v20, the menu items for Poor Man's T-SQL Formatter are gone.
Things worked fine in v18 after following the advice here: https://stackoverflow.com/a/72996345/4830285 Not so in v20.
How do I use the tool in SQL Server Management Studio v20?
Upvotes: 4
Views: 7496
Reputation: 11
One SIMPLE solution is to use Notepad++ with the Poor Man's T-SQL Formatter plugin on it. Copy the script to Notepad++, format and bring the script back. This way you can use the formatter with SQL Server, Oracle and others.
Upvotes: 1
Reputation: 116
HKEY_CURRENT_USER\SOFTWARE\Microsoft\SQL Server Management Studio
19.0_IsoShell_Config
, if you have SSMS 20 installed you will find 20.0_IsoShell_Config
18.0_IsoShell_Config
19.0_IsoShell_Config
or 20.0_IsoShell_Config
Common7/IDE
folder (C:\Program Files (x86)\Microsoft SQL Server Management Studio 20\Common7\IDE
) and open the ssms.exe.config
file<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>
Upvotes: 6
Reputation: 71
I got it working this way.
Install SSMS 17.9.1
Install SSMS 20.x
Install PoorMansTSqlFormatter
copy PoorMansTSqlFormatterSSMSPackage.pkgdef to C:\Program Files (x86)\Microsoft SQL Server Management Studio 20\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)
Re-open SSMS 20.x and it should appear under Tools. (you can now fix the shortcut keys CTRL-K CTRL-D)
Uninstall SSMS 17.9.1
https://github.com/TaoK/PoorMansTSqlFormatter/issues/283#issuecomment-1493274817
Upvotes: 7