Pilih Nama deployment dan setelan Anda, pastikan
Izinkan Traffic HTTP dan Izinkan Traffic WebDeploy dicentang.
Pilih Deploy.
Menginstal Cloud Tools for Visual Studio
Untuk menginstal Cloud Tools for Visual Studio dari dialog Extensions and Updates di
Visual Studio:
Pilih Tools > Extensions and Updates.
Pilih aspek Online dari panel kiri.
Telusuri Google Cloud Tools for Visual Studio.
Klik Download dan ikuti petunjuknya.
Mulai ulang Visual Studio untuk memuat ekstensi.
Login ke Google
Login ke Akun Google yang Anda gunakan untuk men-deploy project ke App Engine.
Buka Visual Studio.
Luncurkan Cloud Explorer dengan memilih Tools >
Google Cloud Tools > Show Google Cloud Explorer.
Klik Pilih atau buat akun.
Klik Tambahkan akun.
Jendela browser baru akan terbuka dan meminta izin yang diperlukan untuk mengelola Google Cloud resource Anda.
Pilih akun yang akan digunakan untuk aplikasi Anda.
Klik Izinkan dan tutup jendela browser.
Memilih project
Untuk memilih project Google Cloud untuk men-deploy aplikasi Anda:
Di Cloud Explorer, klik Select Project.
Pilih project Anda dalam daftar.
Klik Oke.
Cloud Explorer akan dimuat ulang dan menampilkan resource untuk project yang dipilih.
Membuat aplikasi ASP.NET
Untuk membuat project ASP.NET baru dan menjalankannya secara lokal:
Pilih File > New > Project untuk membuka dialog New Project.
Gunakan panel kiri untuk membuka Installed > Visual C# >
Google Cloud Platform.
Pilih ASP.NET di Google Cloud Platform.
Untuk men-deploy aplikasi ke VM di Compute Engine, targetkan .NET Framework, bukan .NET Core. Gunakan template ASP.NET Core di Google Cloud Platform untuk GKE atau App Engine.
Masukkan Name (nama) project Anda.
Klik Oke.
Pilih Jenis template.
Klik Oke.
Bangun solusi dan jalankan secara lokal, lalu verifikasi bahwa solusi tersebut berfungsi.
Men-deploy aplikasi ASP.NET
Untuk men-deploy aplikasi ASP.NET ke VM Windows yang berjalan di Compute Engine:
Di Cloud Explorer, pilih project yang baru dibuat, lalu luaskan
GKE.
Klik kanan instance VM yang Anda buat di atas dengan Cloud Marketplace.
Pilih Kelola kredensial Windows.
Klik Tambahkan kredensial.
Masukkan nama pengguna.
Pastikan Buat sandi untuk saya dipilih dan
klik Simpan.
Klik Reset saat diminta dengan pertanyaan konfirmasi:
"Reset sandi untuk [nama pengguna Anda] di instance [instance yang Anda
buat]?"
Kemudian, klik tombol Tutup untuk menutup jendela
sandi.
Selanjutnya, klik tombol Tutup untuk menutup jendela Kredensial Windows.
Di panel Solution Explorer Visual Studio, klik kanan
aplikasi Anda.
Di menu konteks, klik Publikasikan ke Google Cloud
Di kotak dialog Publikasikan, pilih Compute Engine.
Klik Publish untuk membangun dan men-deploy aplikasi contoh.
Setelah publikasi selesai, Visual Studio akan membuka aplikasi di browser web default Anda:
Selesai — aplikasi Anda dihosting di Compute Engine.
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Sulit dipahami","hardToUnderstand","thumb-down"],["Informasi atau kode contoh salah","incorrectInformationOrSampleCode","thumb-down"],["Informasi/contoh yang saya butuhkan tidak ada","missingTheInformationSamplesINeed","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 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)."]]