發表文章

目前顯示的是有「visual studio」標籤的文章

LIB002 "cdnjs" 提供者無法解析 "jquery@3.6.1" 程式庫_Libraries could not be resolved by the "cdnjs" provider

圖片
  若接獲有人給的visual studio專案 如出現此錯誤訊息 LIB002 "cdnjs" 提供者無法解析 "jquery@3.6.1" 程式庫 LIB002 "cdnjs" 提供者無法解析 "twitter-bootstrap@5.2.2" 程式庫 LIB002 "cdnjs" 提供者無法解析 "font-awesome@6.2.0" 程式庫 .... LIB002 "cdnjs" 提供者無法解析 "XXXXXX" 程式庫 不外乎就是缺乏這些前端套件 有經驗的開發者 我們都知道 libman 主要就是一套前端庫管控的工具 基本上可切至套件管理器主控台中 下command 先確認libman cli可運行正常 查看已安裝的CLI 版本 libman --version 若要查看詳細幫助可輸入 libman --help libman help說明 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 Usage: libman [options] [ command ] Options: --help|-h Show help information --version Show version information Commands: cache 列出或清除 libman 快取內容 clean 從專案刪除 libman.json 中定義的所有程式庫檔案 config 取得或進行組態設定 init 建立新的 libman.json install 將程式庫定義新增到 LibMan.json 檔案,並將程式庫下載到指定的位置 restore 從提供者下載所有檔案,並將其儲存到指定的目的地 uninstall 從指定的目的地刪除指定程式庫的所有檔案,然後從 libman.json 移除指定的程式庫定義 update 更新指定的程式庫 Use "libman [command] --help" for more ...

錯誤CS8026 C# 5 中無法使用 'null 散佈運算子' 功能。請使用語言版本 6 或更高的版本。_Error CS8026: Feature 'xxxxx' is not available in C# 5. Please use language version 6 or greater.

圖片
  若vs 遇到此錯誤通常 是因為有用到某些C#6才有的語法 以我情境就是用到 C# 6.0 版後才有提供的語法糖Null 散佈運算子( ?. 和 ?[]) https://docs.microsoft.com/zh-tw/dotnet/csharp/whats-new/csharp-version-history 比方本來專案用的是vs2015 , 2013而比較舊版的尚未支援到C#6.0以後的語法時候 就容易跑出滿江紅... Error CS8026 :  Feature  ' xxxx ' is  not available  in  C# 5 .  Please use language version 6  or  greater . 此時可能你可能會手癢想要把專案做升級 而參考到這篇做法(由於專案性質是website) https://stackoverflow.com/questions/31548699/how-to-use-c-sharp-6-with-web-site-project-type 一種方式是去Nuget載此package Microsoft.CodeDom.Providers.DotNetCompilerPlatform2.0 進行語法支援程度的升級(專案必須是.net4.5 framework) 以我的情境由於既有專案是4.6.1就有出現怪問題 而連鎖影響到其他在用舊版vs開發的人,所以套件相依性還是要在用之前多留意啊!! Ref: [C#] 在 Visual Studio 2015 使用 C# 7 https://dotblogs.com.tw/regionbbs/2017/03/31/using-cs7-in-vs2015 [C#] C# 7 不能編譯? 其實是 Microsoft.Net.Compilers 版本問題 https://dotblogs.com.tw/regionbbs/2017/03/30/vs2017-cs7-compiler-issue [Visual Studio]限制Visual Studio 2015開發時只能使用C# 5.0以前的語法 https://dotblogs.com.tw/stan...