Quickstart

This page shows you how to configure Microsoft Visual Studio and create and deploy an ASP.NET application on Google Cloud Platform.

Before you begin

  1. In the Cloud Platform Console, go to the Manage resources page and create a new project.

    Go to the Manage resources page

  2. Enable billing for your project.

    Enable billing

  3. Make sure that you have the following software installed on your local system:
  4. Create a new Windows VM to host your app:
    1. Navigate to the ASP.NET Framework image on the Google Cloud Launcher.
      Go to the ASP.NET Framework image
    2. Select Launch on Compute Engine.
    3. Choose your Deployment name and settings, ensuring that Allow HTTP Traffic and Allow WebDeploy Traffic are checked.
    4. Select Deploy.

Install Cloud Tools for Visual Studio

To install Cloud Tools for Visual Studio, complete one of the following installation processes:

  • Navigate to Google Cloud Platform Extension for Visual Studio in the Visual Studio Gallery and follow the instructions to download and install the extension.
  • Install the extension from the Extensions and Updates dialog in Visual Studio:

    Extensions and Updates dialog

    1. Select Tools > Extensions and Updates.
    2. Select the Online tab from the left pane.
    3. Search for Google Cloud extension for Visual Studio.
    4. Click Download and follow the prompts.
    5. Restart Visual Studio for the new extension to be loaded.

Sign In to Google

Sign in to a Google account that you use to deploy your project to App Engine.

  1. Open Visual Studio.
  2. Launch Cloud Explorer by selecting Tools > Google Cloud Tools > Show Google Cloud Explorer.
  3. Add your Google account to access Google Cloud platform resources:
    1. Click Select or Create Account.

      Select Create Account

    2. Click Add account.
    3. A new browser window opens and asks for the permissions it needs to manage your App Engine applications.
    4. Select the account to use for your application.
    5. Click Allow and close the browser window.

Create an ASP.NET app

To create a new ASP.NET project and run it locally:

  1. Open Visual Studio.
  2. Choose File > New > Project to open the New Project dialog.
  3. The New Project dialog. On the left, it displays the available
                project types, with Google Cloud Platform selected. The center
                shows the available templates, with ASP.NET on Google Platform
                selected. It also shows the fields for entering the project
                name, location, and solution name.

  4. Use the left panel to navigate to Installed > Visual C# > Google Cloud Platform.
  5. Select ASP.NET on Google Cloud Platform.
  6. Enter the Name of your project.
  7. Click OK.
  8. In the dialog, select the target framework for your project.
  9. Dialog to select the target framework for the new project. There
                are 2 drop downs for the target framework selection, a Google
                Cloud Project ID selector, and 2 radio buttons.

  10. Click Select Project to select the Google Cloud Project ID.
  11. Select a Feature.
  12. Click OK.
  13. Build the solution and run it locally, verifying that it works.

Deploy an ASP.NET app

To deploy your ASP.NET app to a Windows VM running on Compute Engine:

  1. In Google Cloud Explorer, select the newly created project and expand Google Compute Engine.
  2. Right-click on the VM instance that you created above with Cloud Launcher.
  3. Select Manage Windows credentials.

    Manage Accounts

  4. Click Add credentials.
  5. Enter a username.
  6. Ensure that Create a password for me is selected and click Save.
  7. Click Reset when prompted with the confirmation question: "Reset the password for [your username] on the instance [instance you created]?"
  8. Then click the Close button to close the password window.
  9. Next click the Close button to close the Windows Credentials window.
  10. In the Visual Studio Solution Explorer pane, right click your application.
  11. In the context menu, click Publish to Google Cloud...

    Publish to Google Cloud

  12. In the Publish dialog box, choose Compute Engine.

    Choose to publish to Compute Engine

  13. Click Publish to build and deploy the sample application. After publishing completes, Visual Studio opens the application in your default web browser:

    Test application

That's it — your application is hosted on Compute Engine.

What's next

Send feedback about...

Cloud Tools for Visual Studio