ドキュメントには頻繁に更新が加えられ、その都度公開されています。本ページの翻訳はまだ未完成な部分があることをご了承ください。最新の情報については、英語のドキュメンテーションをご参照ください。本ページの翻訳に問題がある場合はこちらまでご連絡ください。

Using Codespaces in Visual Studio

You can develop in your codespace directly in Visual Studio by connecting with your account on GitHub.

Codespacesは、GitHub FreeもしくはGitHub Proを使っているユーザアカウントで利用できます。 For more information, see "GitHub's products."

ここには以下の内容があります:

注釈: Codespaces は現在限定パブリックベータであり、変更されることがあります。 ベータ期間中、GitHubはCodespacesの可用性について保証しません。 Sign up for the limited public beta. ベータへの参加に関する詳しい情報については「Codespacesについて」を参照してください。

About Codespaces in Visual Studio

You can create a codespace in Visual Studio to develop applications in a Windows environment. When you use a codespace in Visual Studio, you can browse source code, build solutions, and commit changes to your repository.

You must create a codespace in Visual Studio to use it with the application. Codespaces created outside of Visual Studio can not currently be used with Visual Studio.

必要な環境

Before you configure a codespace in Visual Studio, you must download the latest version of Visual Studio Preview.

Enabling the connection between Visual Studio and GitHub Codespaces

Connecting to GitHub Codespaces with the Visual Studio Preview is not enabled by default, so you will first need to enable the Preview Features option.

  1. In Visual Studio Preview, use the Tools drop-down menu, then click Options.
  2. Under Environment, select Preview Features and check the Connect to GitHub Codespaces preview feature.
    Check the Connect to GitHub Codespaces preview feature
  3. You will need to restart Visual Studio for the feature to be available.

Creating a codespace in Visual Studio

  1. When you launch Visual Studio, the Start Window will show a Connect to a codespace button under "Get started".
    Visual Studio Start window with Connect to a codespace
  2. Click Connect to a codespace.
  3. Click Sign in to GitHub and follow the prompts, or click Create one! to create a new GitHub account and sign into the account.
    Visual Studio sign in to GitHub
  4. Under "Codespace details", type the repository's URL you want GitHub Codespaces to clone into your codespace.
  5. Optionally, use the Instance type and Suspend after drop-down menus to configure more codespace details.
    Visual Studio codespace details
  6. Click Create and Connect. GitHub Codespaces will begin preparing the codespace and open Visual Studio after the codespace is ready. The codespace name will appear in the remote indicator in the menu.
    Visual Studio connected to eShopOnWeb repository codespace

Visual Studio で codespace を開く

  1. Use the File drop-down menu, and click Connect to a Codespace.
    Visual Studio File Connect to a codespace menu item
  2. Under "GitHub Codespaces", click the codespace you want to connect to, then click Connect.
    Visual Studio displaying available codespaces and details

Configuring a codespace for Visual Studio

The default codespace environment created by Visual Studio includes popular frameworks and tools such as .NET Core, Microsoft SQL Server, Python, and the Windows SDK. GitHub Codespaces created with Visual Studio can be customized through a subset of devcontainers.json properties and a new tool called devinit, included with Visual Studio.

devinit

The devinit command-line tool lets you install additional frameworks and tools into your Windows development codespaces, as well as run PowerShell scripts or modify environment variables. devinit supports a configuration file called devinit.json, which can be added to your project for creating customized and repeatable development environments. For more information about Windows codespace configuration and devinit, see Customize a codespace in the Visual Studio documentation.

Did this doc help you?

Privacy policy

Help us make these docs great!

All GitHub docs are open source. See something that's wrong or unclear? Submit a pull request.

Make a contribution

OR, learn how to contribute.