針對 Visual Studio 15.7 以下之版本建置 Microsoft Library Manager.vsix

Build Microsoft Library Manager.vsix for VS15.7 or below
如果是從 GitHub 上直接取得的 Vsix,在 Visual Studio 15.7 以下之版本安裝會得到以下錯誤
Install Error : System.InvalidOperationException: A value for 'Component' needs to be specified in the catalog.
這邊簡單介紹一下如何為 VS 15.7 或以下之版本建置出可用之 Vsix 安裝檔
首先先從專案 GitHub 下載完整原始碼,先不要打開方案
編輯 LibraryManager/src/LibraryManager.Vsix/Microsoft.Web.LibraryManager.Vsix.csproj 檔案
其中有一行程式碼為
<IsProductComponent>true</IsProductComponent>
將其修改為 false
<IsProductComponent>false</IsProductComponent>
當設為 false 時,就可於沒有 Library Manager 之 Visual Studio 版本上安裝 (15.7 或以下);然而此 vsix 無法更新於已經有 Library Manager 之 Visual Studio 版本 (15.8 Preview 或以上)
修改完後就可以開啟方案,並調整 Configuration 為 Release 後進行建置

建置完後打開相對應之資料夾即可看到產生的 Vsix 檔案,點選進行安裝即可


![[IT 鐵人賽] ASP.NET Core 與 Log 紀錄和追蹤的愛恨交織 - Day 05 - Elmah - 02](/_next/image?url=https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1776070454149%2Fa0702417-5357-4217-a572-7ba53ea36735.png&w=3840&q=75)
![[IT 鐵人賽] Azure Data Service - Day 04 - Cognitive Service - 辨識 - Video Indexer](/_next/image?url=https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1776070473207%2F6423fd4a-4041-4bb2-b918-4cfe3f9aea5e.png&w=3840&q=75)