安裝 Visual StudioInstall Visual Studio

歡迎使用 Visual Studio 2019!Welcome to Visual Studio 2019! 在此版本中,您可以輕鬆選擇並安裝需要的功能。In this version, it's easy to choose and install just the features you need. 因為降低了磁碟使用量下限,所以安裝快速,且對系統影響更小。And because of its reduced minimum footprint, it installs quickly and with less system impact.

歡迎使用安裝 Visual Studio 的新方式!Welcome to a new way to install Visual Studio! 在此版本中,我們讓您能更輕鬆選取及安裝需要的功能。In this version, we've made it easier for you to choose and install just the features you need. 我們也已經減少 Visual Studio 的最少使用量,使它能以更快的速度完成安裝,並對系統產生較少的影響。We've also reduced the minimum footprint of Visual Studio so that it installs more quickly and with less system impact than ever before.

Note

本主題適用於 Windows 上的 Visual Studio。This topic applies to Visual Studio on Windows. 針對 Visual Studio for Mac,請參閱安裝 Visual Studio for MacFor Visual Studio for Mac, see Install Visual Studio for Mac.

是否想要深入了解此版本的其他新功能?Want to know more about what else is new in this version? 請參閱版本資訊See our release notes.

是否想要深入了解此版本的其他新功能?Want to know more about what else is new in this version? 請參閱版本資訊See our release notes.

準備要安裝了嗎?Ready to install? 我們將逐步引導完成安裝。We'll walk you through it, step-by-step.

步驟 1:請確定您的電腦已準備好安裝 Visual StudioStep 1 - Make sure your computer is ready for Visual Studio

在您開始安裝 Visual Studio 之前:Before you begin installing Visual Studio:

  1. 檢查系統需求Check the system requirements. 這些需求可以協助確定您的電腦是否支援 Visual Studio 2017。These requirements help you know whether your computer supports Visual Studio 2017.

  2. 套用最新的 Windows 更新。Apply the latest Windows updates. 這些更新可以確保您的電腦已具備最新的安全性更新,以及 Visual Studio 所需的系統元件。These updates ensure that your computer has both the latest security updates and the required system components for Visual Studio.

  3. 重新開機。Reboot. 重新開機可以確保不會有任何擱置的安裝或更新會阻礙 Visual Studio 安裝。The reboot ensures that any pending installs or updates don't hinder the Visual Studio install.

  4. 釋出空間。Free up space. 透過執行 [磁碟清理] 應用程式之類的方式,將不必要的檔案及應用程式從 %SystemDrive% 移除。Remove unneeded files and applications from your %SystemDrive% by, for example, running the Disk Cleanup app.

  1. 檢查系統需求Check the system requirements. 這些需求可以幫助您了解電腦是否支援 Visual Studio 2019。These requirements help you know whether your computer supports Visual Studio 2019.

  2. 套用最新的 Windows 更新。Apply the latest Windows updates. 這些更新可以確保您的電腦已具備最新的安全性更新,以及 Visual Studio 所需的系統元件。These updates ensure that your computer has both the latest security updates and the required system components for Visual Studio.

  3. 重新開機。Reboot. 重新開機可以確保不會有任何擱置的安裝或更新會阻礙 Visual Studio 安裝。The reboot ensures that any pending installs or updates don't hinder the Visual Studio install.

  4. 釋出空間。Free up space. 透過執行 [磁碟清理] 應用程式之類的方式,將不必要的檔案及應用程式從 %SystemDrive% 移除。Remove unneeded files and applications from your %SystemDrive% by, for example, running the Disk Cleanup app.

針對並存執行舊版 Visual Studio 及 Visual Studio 2017 的相關問題,請參閱 Visual Studio 相容性詳細資料For questions about running previous versions of Visual Studio side by side with Visual Studio 2017, see the Visual Studio compatibility details.

如有並存執行舊版 Visual Studio 及 Visual Studio 2019 的相關問題,請參閱 Visual Studio 2019 平台目標及相容性頁面。For questions about running previous versions of Visual Studio side by side with Visual Studio 2019, see the Visual Studio 2019 Platform Targeting and Compatibility page.

步驟 2:下載 Visual StudioStep 2 - Download Visual Studio

接下來,請下載 Visual Studio 啟動載入器檔案。Next, download the Visual Studio bootstrapper file. 若要這麼做,請依序選擇下列按鈕、您想要的 Visual Studio 版本、[儲存] 和 [開啟資料夾]。To do so, choose the following button, choose the edition of Visual Studio that you want, choose Save, and then choose Open folder.

步驟 3:安裝 Visual Studio 安裝程式Step 3 - Install the Visual Studio installer

執行啟動載入器檔案以安裝 Visual Studio 安裝程式。Run the bootstrapper file to install the Visual Studio Installer. 這個新輕量型安裝程式包含安裝及自訂 Visual Studio 所需的全部內容。This new lightweight installer includes everything you need to both install and customize Visual Studio.

  1. 從您的 [下載] 資料夾中,按兩下符合或類似於下列其中一項檔案的啟動載入器:From your Downloads folder, double-click the bootstrapper that matches or is similar to one of the following files:

    • vs_community.exe (適用於 Visual Studiofor Community)vs_community.exe for Visual Studio Community
    • vs_professional.exe (適用於 Visual Studio Professional)vs_professional.exe for Visual Studio Professional
    • vs_enterprise.exe (適用於 Visual Studio Enterprise)vs_enterprise.exe for Visual Studio Enterprise

    如果您收到使用者帳戶控制通知,請選擇 [是]。If you receive a User Account Control notice, choose Yes.

  2. 我們將會要求您認可 Microsoft 授權條款和 Microsoft 隱私權聲明We'll ask you to acknowledge the Microsoft License Terms and the Microsoft Privacy Statement. 選擇 [繼續]。Choose Continue.

    授權條款和隱私權聲明License Terms and Privacy Statement

步驟 4 - 選擇工作負載Step 4 - Choose workloads

在安裝程式安裝完畢之後,您可以利用它來選取所需的功能集 (或工作負載) 以自訂您的安裝。After the installer is installed, you can use it to customize your installation by selecting the feature sets—or workloads—that you want. 方式如下:Here's how.

  1. 在 [安裝 Visual Studio] 畫面中找到您想要的工作負載。Find the workload you want in the Installing Visual Studio screen.

    Visual Studio 2017:安裝工作負載

    例如,選擇「.NET 桌面開發」工作負載。For example, choose the ".NET desktop development" workload. 它隨附預設核心編輯器,其中包括超過 20 種語言的基本程式碼編輯支援、能夠從任何資料夾開啟及編輯程式碼而不需要專案,以及整合的原始程式碼控制。It comes with the default core editor, which includes basic code editing support for over 20 languages, the ability to open and edit code from any folder without requiring a project, and integrated source code control.

  2. 選擇您想要的工作負載之後,再選擇 [安裝]。After you choose the workload(s) you want, choose Install.

    接著會出現狀態畫面,顯示 Visual Studio 的安裝進度。Next, status screens appear that show the progress of your Visual Studio installation.

  1. 新的工作負載和元件安裝之後,請選擇 [啟動]。After the new workloads and components are installed, choose Launch.

    Visual Studio 2019:安裝工作負載

    例如,選擇 [ASP.NET 與網頁程式開發] 工作負載。For example, choose the "ASP.NET and web development" workload. 它隨附預設核心編輯器,其中包括超過 20 種語言的基本程式碼編輯支援、能夠從任何資料夾開啟及編輯程式碼而不需要專案,以及整合的原始程式碼控制。It comes with the default core editor, which includes basic code editing support for over 20 languages, the ability to open and edit code from any folder without requiring a project, and integrated source code control.

  2. 選擇您想要的工作負載之後,再選擇 [安裝]。After you choose the workload(s) you want, choose Install.

    接著會出現狀態畫面,顯示 Visual Studio 的安裝進度。Next, status screens appear that show the progress of your Visual Studio installation.

Tip

您可以在安裝後,隨時安裝一開始未安裝的工作負載或元件。At any time after installation, you can install workloads or components that you didn't install initially. 如果您已開啟 Visual Studio,請移至 [工具] > [Get Tools and Features] (取得工具和功能),以開啟 Visual Studio 安裝程式。If you have Visual Studio open, go to Tools > Get Tools and Features... which opens the Visual Studio Installer. 或者,從 [開始] 功能表開啟 [Microsoft Visual Studio 安裝程式]。Or, open Visual Studio Installer from the Start menu. 您可以在此選擇想要安裝的工作負載或元件。From there, you can choose the workloads or components that you wish to install. 然後,選擇 [修改]。Then, choose Modify.

步驟 5:選取個別元件 (選擇性)Step 5 - Choose individual components (Optional)

如果您不想要使用工作負載功能來自訂您的 Visual Studio 安裝,或您想要新增比工作負載所安裝元件的更多元件,您可以從 [個別元件] 索引標籤安裝或新增個別的元件來完成此作業。選擇您想要的項目,然後遵循提示作業。If you don't want to use the Workloads feature to customize your Visual Studio installation, or you want to add more components than a workload installs, you can do so by installing or adding individual components from the Individual components tab. Choose what you want, and then follow the prompts.

Visual Studio 2017 - 安裝個別元件Visual Studio 2017 - Install individual components

Visual Studio 2019 - 安裝個別元件Visual Studio 2019 - Install individual components

步驟 6:安裝語言套件 (選擇性)Step 6 - Install language packs (Optional)

根據預設,安裝程式會在第一次執行時,嘗試比對作業系統的語言。By default, the installer program tries to match the language of the operating system when it runs for the first time. 若要以您選擇的語言安裝 Visual Studio,請選擇 Visual Studio 安裝程式的 [語言套件] 索引標籤,然後遵循提示作業。To install Visual Studio in a language of your choosing, choose the Language packs tab from the Visual Studio Installer, and then follow the prompts.

Visual Studio 2017 - 安裝語言套件Visual Studio 2017 - Install language packs

Visual Studio 2019 - 安裝語言套件Visual Studio 2019 - Install language packs

從命令列變更安裝程式語言Change the installer language from the command line

另一個變更預設語言的方法,便是從命令列執行安裝程式。Another way that you can change the default language is by running the installer from the command line. 例如,您可以使用下列命令來強制安裝程式以英文執行:vs_installer.exe --locale en-USFor example, you can force the installer to run in English by using the following command: vs_installer.exe --locale en-US. 下次執行安裝程式時,它會記住這項設定。The installer will remember this setting when it is run the next time. 安裝程式支援下列語言權杖:zh-cn、zh-tw、cs-cz、en-us、es-es、fr-fr、de-de、it-it、ja-jp、ko-kr、pl-pl、pt-br、ru-ru 和 tr-tr。The installer supports the following language tokens: zh-cn, zh-tw, cs-cz, en-us, es-es, fr-fr, de-de, it-it, ja-jp, ko-kr, pl-pl, pt-br, ru-ru, and tr-tr.

步驟 7 - 變更安裝位置 (選擇性)Step 7 - Change the installation location (Optional)

15.7 版中的新功能:現在您可以減少 Visual Studio 在系統磁碟機上的安裝磁碟使用量。New in 15.7: You can now reduce the installation footprint of Visual Studio on your system drive. 您可以選擇將快取、共用元件、SDK 和工具下載至不同的磁碟機,並將 Visual Studio 保留在以最快速度執行它的磁碟機上。You can choose to move the download cache, shared components, SDKs, and tools to different drives, and keep Visual Studio on the drive that runs it the fastest.

Visual Studio 2017 - 變更安裝位置Visual Studio 2017 - Change installation locations

您可以減少系統磁碟機上的 Visual Studio 安裝磁碟使用量。You can reduce the installation footprint of Visual Studio on your system drive. 您可以選擇將快取、共用元件、SDK 和工具下載至不同的磁碟機,並將 Visual Studio 保留在以最快速度執行它的磁碟機上。You can choose to move the download cache, shared components, SDKs, and tools to different drives, and keep Visual Studio on the drive that runs it the fastest.

Visual Studio 2019 - 變更安裝位置Visual Studio 2019 - Change installation locations

Important

您只有在第一次安裝 Visual Studio 時才可以選取不同的磁碟機。You can select a different drive only when you first install Visual Studio. 如已安裝 Visual Studio 並想要變更磁碟機,您必須解除安裝它,再重新安裝。If you've already installed it and want to change drives, you must uninstall Visual Studio and then reinstall it.

如需詳細資訊,請參閱選取安裝位置頁面。For more information, see the Select installation locations page.

步驟 8 - 開始開發Step 8 - Start developing

  1. 在完成 Visual Studio 安裝後,請選擇 [啟動] 按鈕以開始使用 Visual Studio 來進行開發。After Visual Studio installation is complete, choose the Launch button to get started developing with Visual Studio.

  2. 選取 [檔案],然後選擇 [新增專案]。Choose File, and then choose New Project.

  3. 選取專案類型。Select a project type.

    例如,若要建置 C++ 應用程式,請選擇 [已安裝],展開 [Visual C++],然後選擇您要建置的 C++ 專案類型。For example, to build a C++ app, choose Installed, expand Visual C++, and then choose the C++ project type that you want to build.

    若要建置 C# 應用程式,請選擇 [已安裝],展開 [Visual C#],然後選擇您要建置的 C# 專案類型。To build a C# app, choose Installed, expand Visual C#, and then choose the C# project type that you want to build.

  1. 在完成 Visual Studio 安裝後,請選擇 [啟動] 按鈕以開始使用 Visual Studio 來進行開發。After Visual Studio installation is complete, choose the Launch button to get started developing with Visual Studio.

  2. 在開始視窗中,選擇 [建立新專案]。On the start window, choose Create a new project.

  3. 在搜尋方塊中,輸入您想要建立的應用程式類型,以查看可用的範本清單。In the search box, enter the type of app you want to create to see a list of available templates. 範本清單取決於您在安裝期間所選擇的工作負載。The list of templates depends on the workload(s) that you chose during installation. 若要查看不同的範本,請選擇不同的工作負載。To see different templates, choose different workloads.

    您也可以使用 [語言] 下拉式清單來篩選搜尋特定的程式設計語言。You can also filter your search for a specific programming language by using the Language drop-down list. 您也可以使用 [平台] 清單和 [專案類型] 清單篩選。You can filter by using the Platform list and the Project type list, too.

  4. Visual Studio 會開啟您的新專案,而您已準備好撰寫程式碼!Visual Studio opens your new project, and you're ready to code!

取得支援Get support

有時可能會發生一些問題。Sometimes, things can go wrong. 若 Visual Studio 安裝失敗,請參閱針對 Visual Studio 安裝和升級問題進行疑難排解中的逐步說明。If your Visual Studio installation fails, see Troubleshooting Visual Studio installation and upgrade issues for step-by-step guidance.

我們也提供即時聊天 (僅限英文) 支援選項,可回答有關安裝的相關問題。We also offer a live chat (English only) support option for installation-related issues.

以下是一些支援選項:Here are a few more support options:

另請參閱See also