Setting up a .NET development environment Stay organized with collections Save and categorize content based on your preferences.
This tutorial shows how to prepare your local machine fordeveloping.NETand.NET Frameworkapps that run on Google Cloud and call Google Cloud APIs.
Install a development environment
The recommended development environment for running the .NET tutorials andsample apps in this documentation isVisual Studio orVisual Studio Code.
Create a Google Cloud project
Create a Google Cloud project to run your apps. Google Cloud projects form the basis for creating,enabling, and using all Google Cloud services.
Set up authentication
Your .NET app must authenticate itself to use Google Cloud APIs. You useApplication Default Credentials (ADC),which let you provide credentials for either local development or in aproduction environment.
If you're using a local shell, then create local authentication credentials for your user account:
gcloudauthapplication-defaultlogin
You don't need to do this if you're using Cloud Shell.
If an authentication error is returned, and you are using an external identity provider (IdP), confirm that you have signed in to the gcloud CLI with your federated identity.
For more information, seeAuthenticate for using client libraries.For general information about authentication, seeAuthentication at Google.
(Optional) Install .NET tools and SDKs
Even though you can create and manage Google Cloud resources using yourweb browser using theGoogle Cloud console,if you'd prefer to manage your Google Cloud resources from withinVisual Studio or from the command-line, you can consider installing thefollowing tools:
Google Cloud CLI: The gcloud CLI is a command-line interface for Google Cloud products and services.
Tools for Visual Studio: Tools for Visual Studio enables development in Visual Studio on Google Cloud.
Tools for PowerShell: Tools for PowerShell is a set of cmdlets for PowerShell that lets you manage Google Cloud resources.
What's next
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-12-15 UTC.