Code Monkey home page Code Monkey logo

dotnet-docs-samples's Introduction

Google Cloud Platform .NET Docs Samples

A collection of samples that demonstrate how to call some Google Cloud services from C#.

The APIs and .NET Libraries page lists all the Cloud APIs you can call from .NET.

The samples in this repo cover only some of the total APIs that you can call from .NET.

Build Status

Windows Linux
Windows Linux

Build and Run

To build and run a sample, open the solution file (.sln) with Visual Studio 2015 or later and build it.

But no sample will work until you:

  1. Create a project in the Google Cloud Platform Console. If you haven't already created a project, create one now. Projects enable you to manage all Google Cloud Platform resources for your app, including deployment, access control, billing, and services.

    1. Open the Cloud Platform Console.
    2. In the drop-down menu at the top, select Create a project.
    3. Click Show advanced options. Under App Engine location, select a United States location.
    4. Give your project a name.
    5. Make a note of the project ID, which might be different from the project name. The project ID is used in commands and in configurations.
    6. In each sample directory, a README.md contains additional steps necessary to run the sample. Don't forget to follow those instructions too.
  2. Enable billing for your project. If you haven't already enabled billing for your project, enable billing now. Enabling billing allows the application to consume billable resources such as running instances and storing data.

  3. Download credentials.

    1. Visit the APIs & services dashboard and click Credentials.

    2. Click Create credentials and choose Service Account key.

    3. Under Service account, choose Compute Engine default service account, and leave JSON selected under Key Type. Click Create. A .json file will be downloaded to your computer.

    4. Set the environment variable GOOGLE_APPLICATION_CREDENTIALS to the path of the JSON key that was downloaded. In powershell, the command will like something like this:

      # For this powershell session.
      PS > $env:GOOGLE_APPLICATION_CREDENTIALS = "$env:USERPROFILE\Downloads\your-project-id-dea9fa230eae3.json"
      # For all processes created after this command.
      PS > [Environment]::SetEnvironmentVariable("GOOGLE_APPLICATION_CREDENTIALS", "$env:USERPROFILE\Downloads\your-project-id-dea9fa230eae3.json", "User")
  4. Enable APIs. Visit the APIs & services dashboard and click ENABLE API. Enable the APIs you plan to call. Are you going to use Cloud Datastore? Enable the Cloud Datastore API. Each API must be enabled individually.

  5. Download or clone this repo with

    git clone https://github.com/GoogleCloudPlatform/dotnet-docs-samples

    Browse the directories, find a solution (.sln) file, open it with Visual Studio 2015 or later, and run it!

Contributing changes

Licensing

Testing

dotnet-docs-samples's People

Contributors

surferjeffatgoogle avatar jsimonweb avatar deren-liao avatar meteatamel avatar carieshmarie avatar p42ul avatar gguuss avatar tswast avatar dzlier-gcp avatar benwulfe avatar iantalarico avatar jskeet avatar navinger avatar dzlier avatar jmdobry avatar mtabasko avatar sqlthinker avatar frankyn avatar devlance avatar chrisdunelm avatar mikejeffrey avatar noerog avatar starsandskies avatar

Watchers

Thierry Behin avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.