Poor Man’s T-SQL Formatter จะติดตั้งได้ใน SQL Server Management Studio ( SSMS ) เวอร์ชั่นเก่า ๆ ได้ แต่ตัวติดตั้งรุ่นใหม่ ๆ เมื่อติดตั้งแล้ว จะไม่สามารถคลิกเมนูของตัว extension ได้ แก้ได้ง่าย ๆ โดย
- เปิดไฟล์ C:\Program Files (x86)\Microsoft SQL Server Management Studio 18\Common7\IDE\Ssms.exe.config
- ค้นหาบรรทัด <assemblyBinding
- เพิ่มข้อความ
<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> - ปิดและเปิด SQL Server Management Studio ใหม่
เท่านี้ก็สามารถใช้ Poor Man’s T-SQL Formatter จัดรูปแบบ sql ได้แล้ว
About the author