Escolha seu Nome de implantação e as configurações. Certifique-se de que as caixas de seleção Permitir tráfego HTTP e Permitir tráfego WebDeploy estejam marcadas.
Selecione Implantar.
Como instalar o Cloud Tools for Visual Studio
Veja como instalar o Cloud Tools for Visual Studio a partir da caixa de diálogo Extensões e Atualizações no Visual Studio:
Selecione Ferramentas > Extensões e Atualizações.
Selecione o atributo On-line no painel à esquerda.
Pesquise o Google Cloud Tools for Visual Studio.
Clique em Download e siga as instruções.
Reinicie o Visual Studio para carregar a extensão.
Como fazer login no Google
Faça login em uma conta do Google que você usa para implantar seu projeto no App Engine.
Abra o Visual Studio.
Inicie o Cloud Explorer selecionando Ferramentas > Google Cloud Tools > Mostrar Google Cloud Explorer.
Clique em Selecionar ou criar conta.
Clique em Adicionar conta.
Uma nova janela do navegador é aberta e solicita as permissões necessárias para gerenciar os recursos do Google Cloud .
Selecione a conta a ser usada para seu aplicativo.
Clique em Permitir e feche a janela do navegador.
Selecionar um projeto
Para selecionar um Google Cloud projeto em que implantar o aplicativo:
clique em Selecionar projeto no Cloud Explorer;
selecione seu projeto na lista;
Clique em OK.
O Cloud Explorer atualizará e exibirá os recursos para o projeto selecionado.
Como criar um aplicativo ASP.NET
Para criar um novo projeto ASP.NET e executá-lo localmente:
escolha Arquivo > Novo > Projeto para abrir a caixa de diálogo "Novo projeto";
use o painel esquerdo para navegar para Instalado > Visual C # > Google Cloud Platform;
selecione ASP.NET no Google Cloud Platform;
Para implantar o aplicativo em uma VM no Compute Engine, selecione o .NET Framework, não o .NET Core. Use o modelo ASP.NET Core no Google Cloud Platform para o GKE ou o Google App Engine.
digite o Nome do projeto;
Clique em OK.
selecione o tipo de modelo;
Clique em OK.
crie a solução e execute-a localmente. Verifique se ela funciona.
Como implantar um aplicativo ASP.NET
Para implantar seu aplicativo ASP.NET em uma VM do Windows em execução no Compute Engine:
selecione o projeto recém-criado e expanda o GKE no Cloud Explorer;
clique com o botão direito do mouse na instância da VM que você criou acima com o Cloud Marketplace;
Selecione Gerenciar credenciais do Windows.
Clique em Adicionar credenciais.
digite um nome de usuário;
verifique se a opção Criar uma senha para mim está selecionada e clique em Salvar;
clique em Redefinir quando solicitado com a pergunta de confirmação: "Redefinir a senha de [seu nome de usuário] na instância [instância criada]?";
clique no botão Fechar para fechar a janela de senha;
clique no botão Fechar para fechar a janela Credenciais do Windows;
no painel Explorador de soluções do Visual Studio, clique com o botão direito do mouse no seu aplicativo;
no menu de contexto, clique em Publicar no Google Cloud.
Na caixa de diálogo "Publicar", selecione Compute Engine;
clique em Publicar para criar e implantar o aplicativo de exemplo.
Depois que a publicação for concluída, o Visual Studio abrirá o aplicativo no navegador da Web padrão:
Pronto, seu aplicativo está hospedado no Compute Engine.
[[["Fácil de entender","easyToUnderstand","thumb-up"],["Meu problema foi resolvido","solvedMyProblem","thumb-up"],["Outro","otherUp","thumb-up"]],[["Difícil de entender","hardToUnderstand","thumb-down"],["Informações incorretas ou exemplo de código","incorrectInformationOrSampleCode","thumb-down"],["Não contém as informações/amostras de que eu preciso","missingTheInformationSamplesINeed","thumb-down"],["Problema na tradução","translationIssue","thumb-down"],["Outro","otherDown","thumb-down"]],["Última atualização 2025-08-17 UTC."],[],[],null,["# Quickstart: Deploy an ASP.NET app by using Tools for Visual Studio\n\nDeploy an ASP.NET app by using Tools for Visual Studio\n======================================================\n\nThis page shows you how to configure Microsoft Visual Studio and create and\ndeploy an ASP.NET application on Google Cloud.\n\nBefore you begin\n----------------\n\n1. In the Google Cloud console, on the project selector page,\n click **Create project** to begin creating a new\n Google Cloud project.\n\n [Go to project selector](https://console.cloud.google.com/projectselector2/home/dashboard)\n2.\n [Verify that billing is enabled for your Google Cloud project](/billing/docs/how-to/verify-billing-enabled#confirm_billing_is_enabled_on_a_project).\n\n3. Make sure that you have the following software installed on your local system:\n - [Visual Studio 2022](https://www.visualstudio.com/vs/), [Visual Studio 2019, or Visual Studio 2017](https://www.visualstudio.com/vs/older-downloads/), any Windows edition. Cloud Tools for Visual Studio doesn't support Visual Studio 2017 for Mac.\n - [gcloud CLI](/sdk/docs/install)\n4. Create a new Windows VM to host your app:\n 1. Navigate to the ASP.NET Framework image on the Google Cloud Marketplace. \n [Go to the ASP.NET Framework image](https://console.cloud.google.com/marketplace/details/click-to-deploy-images/aspnet)\n 2. Select **Launch on Compute Engine**.\n 3. Choose your **Deployment name** and settings, ensuring that **Allow HTTP Traffic** and **Allow WebDeploy Traffic** are checked.\n 4. Select **Deploy**.\n\nInstalling Cloud Tools for Visual Studio\n----------------------------------------\n\nTo install Cloud Tools for Visual Studio from the **Extensions and Updates** dialog in\nVisual Studio:\n\n1. Select **Tools** \\\u003e **Extensions and Updates**.\n2. Select the **Online** facet from the left pane.\n3. Search for **Google Cloud Tools for Visual Studio**.\n4. Click **Download** and follow the prompts.\n5. Restart Visual Studio to load the extension.\n\nSigning in to Google\n--------------------\n\nSign in to a Google account that you use to deploy your project to\nApp Engine.\n\n1. Open Visual Studio.\n2. Launch **Cloud Explorer** by selecting **Tools** \\\u003e **Google Cloud Tools** \\\u003e **Show Google Cloud Explorer**.\n3. Click **Select or create account**.\n4. Click **Add account**.\n5. A new browser window opens and asks for the permissions it needs to manage your Google Cloud resources.\n6. Select the account to use for your application.\n7. Click **Allow** and close the browser window.\n\n\u003cbr /\u003e\n\nSelecting a project\n-------------------\n\nTo select a Google Cloud project to deploy your application to:\n\n1. In the **Cloud Explorer** , click **Select Project**.\n2. Select your project in the list.\n3. Click **OK**.\n\nThe Cloud Explorer refreshes and displays the resources for the selected\nproject.\n\nCreating an ASP.NET app\n-----------------------\n\nTo create a new ASP.NET project and run it locally:\n\n1. Choose **File** \\\u003e **New** \\\u003e **Project** to open the New Project dialog.\n2. Use the left panel to navigate to **Installed** \\\u003e **Visual C#** \\\u003e **Google Cloud Platform**.\n3. Select **ASP.NET on Google Cloud Platform**.\n4. To deploy your app to a VM on Compute Engine, target the .NET Framework, not .NET Core. Use the **ASP.NET Core on Google Cloud Platform** template for GKE or App Engine.\n5. Enter the **Name** of your project.\n6. Click **OK**.\n7. Select the **Template type**.\n8. Click **OK**.\n9. Build the solution and run it locally, verifying that it works.\n\nDeploying an ASP.NET app\n------------------------\n\nTo deploy your ASP.NET app to a Windows VM running on Compute Engine:\n\n1. In Cloud Explorer, select the newly created project and expand GKE.\n2. Right-click on the VM instance that you created above with Cloud Marketplace.\n3. Select **Manage Windows credentials**.\n4. Click **Add credentials**.\n5. Enter a username.\n6. Ensure that **Create a password for me** is selected and click **Save**.\n7. Click **Reset** when prompted with the confirmation question: \"Reset the password for \\[your username\\] on the instance \\[instance you created\\]?\"\n8. Then click the **Close** button to close the password window.\n9. Next click the **Close** button to close the **Windows\n Credentials** window.\n10. In the Visual Studio **Solution Explorer** pane, right click your application.\n11. In the context menu, click **Publish to Google Cloud**\n12. In the Publish dialog box, choose **Compute Engine**.\n13. Click **Publish** to build and deploy the sample application. After publishing completes, Visual Studio opens the application in your default web browser:\n\nThat's it --- your application is hosted on Compute Engine.\n\nWhat's next\n-----------\n\n- Learn more about [Browsing Compute Engine Resources](/tools/visual-studio/docs/browse-compute)."]]