[研究]ASP.NET, Font.Awesome 5.15.4套件試用、使用確認、非NuGet安裝移除
2024-05-10
環境:Visual Studio 2022 + ASP.NET + WebForm + Web Application + C# + SQL Server 2019 + SQL Server Management Studio (SSMS) 19
********************************************************************************
Mend 是「開源許可合規性」(Open Source License Compliance) 檢查軟體。
敝人某專案 packages.config 中並沒有 Font.Awesome,但 Mend軟體報告有使用,有可能外包商不是用 NuGet 安裝,測試看看到底有那些檔案。
沒有相依套件
檔案列表
- \packages\Font.Awesome.5.15.4
- \packages\Font.Awesome.5.15.4\.signature.p7s
- \packages\Font.Awesome.5.15.4\Content
- \packages\Font.Awesome.5.15.4\Font.Awesome.5.15.4.nupkg
- \packages\Font.Awesome.5.15.4\Content\Content
- \packages\Font.Awesome.5.15.4\Content\Scripts
- \packages\Font.Awesome.5.15.4\Content\webfonts
- \packages\Font.Awesome.5.15.4\Content\Content\all.css
- \packages\Font.Awesome.5.15.4\Content\Content\all.min.css
- \packages\Font.Awesome.5.15.4\Content\Content\brands.css
- \packages\Font.Awesome.5.15.4\Content\Content\brands.min.css
- \packages\Font.Awesome.5.15.4\Content\Content\fontawesome.css
- \packages\Font.Awesome.5.15.4\Content\Content\fontawesome.min.css
- \packages\Font.Awesome.5.15.4\Content\Content\regular.css
- \packages\Font.Awesome.5.15.4\Content\Content\regular.min.css
- \packages\Font.Awesome.5.15.4\Content\Content\solid.css
- \packages\Font.Awesome.5.15.4\Content\Content\solid.min.css
- \packages\Font.Awesome.5.15.4\Content\Content\svg-with-js.css
- \packages\Font.Awesome.5.15.4\Content\Content\svg-with-js.min.css
- \packages\Font.Awesome.5.15.4\Content\Content\v4-shims.css
- \packages\Font.Awesome.5.15.4\Content\Content\v4-shims.min.css
- \packages\Font.Awesome.5.15.4\Content\Scripts\fontawesome
- \packages\Font.Awesome.5.15.4\Content\Scripts\fontawesome\all.js
- \packages\Font.Awesome.5.15.4\Content\Scripts\fontawesome\all.min.js
- \packages\Font.Awesome.5.15.4\Content\Scripts\fontawesome\brands.js
- \packages\Font.Awesome.5.15.4\Content\Scripts\fontawesome\brands.min.js
- \packages\Font.Awesome.5.15.4\Content\Scripts\fontawesome\conflict-detection.js
- \packages\Font.Awesome.5.15.4\Content\Scripts\fontawesome\conflict-detection.min.js
- \packages\Font.Awesome.5.15.4\Content\Scripts\fontawesome\fontawesome.js
- \packages\Font.Awesome.5.15.4\Content\Scripts\fontawesome\fontawesome.min.js
- \packages\Font.Awesome.5.15.4\Content\Scripts\fontawesome\regular.js
- \packages\Font.Awesome.5.15.4\Content\Scripts\fontawesome\regular.min.js
- \packages\Font.Awesome.5.15.4\Content\Scripts\fontawesome\solid.js
- \packages\Font.Awesome.5.15.4\Content\Scripts\fontawesome\solid.min.js
- \packages\Font.Awesome.5.15.4\Content\Scripts\fontawesome\v4-shims.js
- \packages\Font.Awesome.5.15.4\Content\Scripts\fontawesome\v4-shims.min.js
- \packages\Font.Awesome.5.15.4\Content\webfonts\fa-brands-400.eot
- \packages\Font.Awesome.5.15.4\Content\webfonts\fa-brands-400.svg
- \packages\Font.Awesome.5.15.4\Content\webfonts\fa-brands-400.ttf
- \packages\Font.Awesome.5.15.4\Content\webfonts\fa-brands-400.woff
- \packages\Font.Awesome.5.15.4\Content\webfonts\fa-brands-400.woff2
- \packages\Font.Awesome.5.15.4\Content\webfonts\fa-regular-400.eot
- \packages\Font.Awesome.5.15.4\Content\webfonts\fa-regular-400.svg
- \packages\Font.Awesome.5.15.4\Content\webfonts\fa-regular-400.ttf
- \packages\Font.Awesome.5.15.4\Content\webfonts\fa-regular-400.woff
- \packages\Font.Awesome.5.15.4\Content\webfonts\fa-regular-400.woff2
- \packages\Font.Awesome.5.15.4\Content\webfonts\fa-solid-900.eot
- \packages\Font.Awesome.5.15.4\Content\webfonts\fa-solid-900.svg
- \packages\Font.Awesome.5.15.4\Content\webfonts\fa-solid-900.ttf
- \packages\Font.Awesome.5.15.4\Content\webfonts\fa-solid-900.woff
- \packages\Font.Awesome.5.15.4\Content\webfonts\fa-solid-900.woff2
- \WebApplication1\Content\all.css
- \WebApplication1\Content\all.min.css
- \WebApplication1\Content\brands.css
- \WebApplication1\Content\brands.min.css
- \WebApplication1\Content\fontawesome.css
- \WebApplication1\Content\fontawesome.min.css
- \WebApplication1\Content\regular.css
- \WebApplication1\Content\regular.min.css
- \WebApplication1\Content\solid.css
- \WebApplication1\Content\solid.min.css
- \WebApplication1\Content\svg-with-js.css
- \WebApplication1\Content\svg-with-js.min.css
- \WebApplication1\Content\v4-shims.css
- \WebApplication1\Content\v4-shims.min.css
- \WebApplication1\Scripts\fontawesome
- \WebApplication1\Scripts\fontawesome\all.js
- \WebApplication1\Scripts\fontawesome\all.min.js
- \WebApplication1\Scripts\fontawesome\brands.js
- \WebApplication1\Scripts\fontawesome\brands.min.js
- \WebApplication1\Scripts\fontawesome\conflict-detection.js
- \WebApplication1\Scripts\fontawesome\conflict-detection.min.js
- \WebApplication1\Scripts\fontawesome\fontawesome.js
- \WebApplication1\Scripts\fontawesome\fontawesome.min.js
- \WebApplication1\Scripts\fontawesome\regular.js
- \WebApplication1\Scripts\fontawesome\regular.min.js
- \WebApplication1\Scripts\fontawesome\solid.js
- \WebApplication1\Scripts\fontawesome\solid.min.js
- \WebApplication1\Scripts\fontawesome\v4-shims.js
- \WebApplication1\Scripts\fontawesome\v4-shims.min.js
- \WebApplication1\webfonts\fa-brands-400.eot
- \WebApplication1\webfonts\fa-brands-400.svg
- \WebApplication1\webfonts\fa-brands-400.ttf
- \WebApplication1\webfonts\fa-brands-400.woff
- \WebApplication1\webfonts\fa-brands-400.woff2
- \WebApplication1\webfonts\fa-regular-400.eot
- \WebApplication1\webfonts\fa-regular-400.svg
- \WebApplication1\webfonts\fa-regular-400.ttf
- \WebApplication1\webfonts\fa-regular-400.woff
- \WebApplication1\webfonts\fa-regular-400.woff2
- \WebApplication1\webfonts\fa-solid-900.eot
- \WebApplication1\webfonts\fa-solid-900.svg
- \WebApplication1\webfonts\fa-solid-900.ttf
- \WebApplication1\webfonts\fa-solid-900.woff
- \WebApplication1\webfonts\fa-solid-900.woff2
********************************************************************************
Default.aspx
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="WebApplication1.Default" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title></title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css" />
</head>
<body>
<form id="form1" runat="server">
<asp:Button ID="btnSubmit" runat="server" Text="Submit" CssClass="btn btn-primary">
</asp:Button>
<asp:Literal ID="litStarIcon" runat="server" Text='<i class="fas fa-star"></i>'></asp:Literal>
</form>
</body>
</html>
|
註解掉 Font.Awesome 引用後,特殊圖案字會不見。
********************************************************************************
要確定 ASP.NET WebForm 專案是否真的使用了 Font Awesome 資源,可考慮:
檢查 ASP.NET WebForm 頁面(.aspx 檔案)或使用者控制項(.ascx 檔案)中的 HTML 和 CSS 程式碼。 尋找是否有引用 Font Awesome 的 CSS 檔案(通常是 font-awesome.css 或 font-awesome.min.css)或字體檔案(通常在 font 資料夾中)。
尋找是否有使用 Font Awesome 的 CSS 類別或圖標,例如 <i class="fas fa-user"></i>。
********************************************************************************
注意,檢查packages.config檔案中套件,是否有任何套件使用(相依) Font.Awesome套件。
要移除非NuGet安裝的Font.Awesome,
********************************************************************************
沒有留言:
張貼留言