VS2022 Community 找不到 VB 的 ASP.NET 模板?一文看懂原因與解決方法

| CSharp | 4 Reads

很多開發者在使用 Visual Studio 2022 (Community 版) 時會遇到一個困惑:
在「建立新專案」對話框中,無論怎麼搜尋,都找不到 VB 語言的 ASP.NET Web 應用程式模板。而同樣的步驟,在 Enterprise 版卻能直接看到。

這究竟是 版本功能差異,還是 安裝配置問題?本文將完整解析。


問題現象

  • Community 版 VS2022
    預設只能找到 C# ASP.NET Core 模板,看不到任何 VB 相關的 ASP.NET Web Forms / MVC 專案模板。

  • Enterprise 版 VS2022
    除了 C# 的 ASP.NET Core 模板之外,還能找到 VB 的 ASP.NET Web Application (.NET Framework) 模板,可以直接建立 VB 的 Web Forms 或 MVC 專案。

這讓人誤以為「是不是只有 Enterprise 支援 VB ASP.NET?」


真正原因

其實 Community 與 Enterprise 功能幾乎一致,差別在於 安裝時的預設選項不同

  • Enterprise 版 → 預設會勾選更多 舊版相容性模板,因此能直接看到 VB 的 ASP.NET 模板。

  • Community 版 → 預設只裝了現代化的 ASP.NET Core 模板 (C#),VB Web 模板被隱藏了。

更關鍵的是:
VB 不支援 ASP.NET Core,只能透過 .NET Framework 專案模板 來建立 Web Forms / MVC。
而這個模板在 Community 中 需要手動啟用


解決方案:啟用 .NET Framework 專案模板

只要安裝額外的元件,Community 版就能和 Enterprise 一樣支援 VB 的 ASP.NET:

步驟一:打開 Visual Studio Installer

  1. 找到你的 Visual Studio 2022,點擊 Modify(修改)

步驟二:確認工作負載

  • 勾選:

    • ASP.NET and web development

    • .NET desktop development

步驟三:安裝單個元件

  1. 切換到 Individual components(單個元件) 標籤。

  2. 勾選以下選項:

    • .NET Framework project and item templates(關鍵,約 1.6GB)

    • Additional project templates (previous versions)(建議一併安裝)

步驟四:應用修改並重啟 VS

  • 點擊 Modify,等待安裝完成。

  • 重啟 Visual Studio 2022。

此時再去「建立新專案」→ 搜尋 ASP.NET Web Application (.NET Framework)
就能選擇 Visual Basic,順利建立 ASP.NET Web Forms / MVC 專案了。


總結

  • 不是版本差異:Community 也支援 VB ASP.NET,只是模板沒預裝。

  • 關鍵元件:一定要勾選 “.NET Framework project and item templates”

  • Enterprise 看似更多模板,只是因為預設安裝選項比較齊全。

只要完成上述設定,Community 版也能無痛開發 VB 的 ASP.NET 專案,和公司環境保持一致。

This article was last edited at