GithubHelp home page GithubHelp logo

googlecloudplatform / getting-started-dotnet Goto Github PK

View Code? Open in Web Editor NEW
84.0 57.0 123.0 1.37 MB

A tutorial for creating a complete application using .NET on Google Cloud Platform

Home Page: http://cloud.google.com/dotnet

License: Apache License 2.0

C# 36.66% PowerShell 33.74% JavaScript 11.83% HTML 15.65% Batchfile 0.39% CSS 1.40% Dockerfile 0.33%
samples

getting-started-dotnet's Introduction

Getting Started for .NET

This repo contains sample applications written in C# that run on Google Cloud Platform.

See https://cloud.google.com/dotnet/getting-started/hello-world for instructions on how to build, run, and deploy the samples.

The applications make use of two client libraries:

Build Status

Windows

aspnet

The aspnet directory contains ASP.NET samples that demonstrate how to access and use Google's APIs from C#. Review this section to learn how use Visual Studio to deploy an ASP.NET sample bookshelf app to the Google Cloud Platform. The sample bookshelf app provides examples of using the following Cloud APIs:

Contributing changes

Licensing

getting-started-dotnet's People

Contributors

amanda-tarafa avatar dependabot[bot] avatar jsimonweb avatar jskeet avatar justinbeckwith avatar surferjeffatgoogle avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

getting-started-dotnet's Issues

Dependency Dashboard

This issue provides visibility into Renovate updates and their statuses. Learn more

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.


  • Check this box to trigger a request for Renovate to run again on this repository

Add-Migration-Init Failure

'GoogleCloudSamples.ConfigurationException' in assembly '2-structured-data, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' is not marked as serializable.

Is there error after running Add-Migration-Init

Currently working through bookshelf tutorial on Using Cloud SQL with .NET and fails at this point.

BigquerySample builds twice before running

In runTests.ps1 of buildquery sample we edit program.cs, then do dotnet restore and then dotnet test. This in turn compiles the project before running tests, even though the project should have been compiled already in build process. We should rather use configuration and pass the right parameter when running the tests, as well as not prebuilding before running the tests.

CreatedById or CreateById

I was playing with this example and ran into this problem.
This was when looking at the 2-structured Data example, but it looks like is in 3-binary-data as well.

Books.cs:
public string CreatedById { get; set; }

DatastoreBookStore.cs:
["CreateById"] = book.CreatedById

One is 'Create' and the other is 'Created'...

Getting FileNotFoundException "grpc_csharp_ext.x86.dll"

Following instruktions and pressing F5 in Visual Studio gave me this. Visual Studio work well for many other ASP.NET Core project so this was a surprise. Searching for a solution did not give much

System.IO.FileNotFoundException
HResult=0x80070002
Message=Error loading native library. Not found in any of the possible locations:
C:\Users\user\Source\Repos\getting-started-dotnet\aspnet\3-binary-data\bin\grpc_csharp_ext.x86.dll,

C:\Users\user\Source\Repos\getting-started-dotnet\aspnet\3-binary-data\bin\runtimes/win/native\grpc_csharp_ext.x86.dll,
C:\Users\user\Source\Repos\getting-started-dotnet\aspnet\3-binary-data\bin../..\runtimes/win/native\grpc_csharp_ext.x86.dll

Source=Grpc.Core
StackTrace:
at Grpc.Core.Internal.UnmanagedLibrary.FirstValidLibraryPath(String[] libraryPathAlternatives)
at Grpc.Core.Internal.UnmanagedLibrary..ctor(String[] libraryPathAlternatives)
at Grpc.Core.Internal.NativeExtension.Load()
at Grpc.Core.Internal.NativeExtension..ctor()
at Grpc.Core.Internal.NativeExtension.Get()
at Grpc.Core.GrpcEnvironment.GrpcNativeInit()
at Grpc.Core.GrpcEnvironment..ctor()
at Grpc.Core.GrpcEnvironment.AddRef()
at Grpc.Core.Channel..ctor(String target, ChannelCredentials credentials, IEnumerable1 options) at Grpc.Core.Channel..ctor(String host, Int32 port, ChannelCredentials credentials, IEnumerable1 options)
at Google.Api.Gax.Grpc.ChannelPool.GetChannel(ServiceEndpoint endpoint, ChannelCredentials credentials)
at Google.Api.Gax.Grpc.ChannelPool.GetChannel(ServiceEndpoint endpoint)
at Google.Cloud.Datastore.V1.DatastoreClient.Create(ServiceEndpoint endpoint, DatastoreSettings settings)
at Google.Cloud.Datastore.V1.DatastoreDb.Create(String projectId, String namespaceId, DatastoreClient client)
at GoogleCloudSamples.Models.DatastoreBookStore..ctor(String projectId) in C:\Users\user\Source\Repos\getting-started-dotnet\aspnet\3-binary-data\Models\DatastoreBookStore.cs:line 86
at GoogleCloudSamples.UnityConfig.RegisterTypes(IUnityContainer container) in C:\Users\user\Source\Repos\getting-started-dotnet\aspnet\3-binary-data\App_Start\UnityConfig.cs:line 110
at GoogleCloudSamples.UnityConfig.<>c.<.cctor>b__8_0() in C:\Users\user\Source\Repos\getting-started-dotnet\aspnet\3-binary-data\App_Start\UnityConfig.cs:line 53
at System.Lazy`1.CreateValue()

Running samples purely locally

I've forked this project and managed to run the first sample projects 1-hello-world and 2-structured-data against the datastore emulator after updating to the latest dlls. 3-binary-data fails no matter what I do.

First the Datastore.Create fails because the API is too old for the current emulator, so I upgrade the Google.Cloud.Datastore.V1 package just like I had to do with the others. Then I get a new error on StorageClient.Create():

System.TypeLoadException was unhandled by user code
  HResult=-2146233054
  Message=Could not load type 'Google.Api.Gax.ScopedCredentialProvider' from assembly 'Google.Api.Gax, Version=2.2.1.0, Culture=neutral, PublicKeyToken=3ec5ea7f18953e47'.
  Source=Google.Cloud.Storage.V1
  TypeName=Google.Api.Gax.ScopedCredentialProvider
  StackTrace:
       at Google.Cloud.Storage.V1.StorageClient.Create(GoogleCredential credential, EncryptionKey encryptionKey)
       at GoogleCloudSamples.Services.ImageUploader..ctor(String bucketName) in C:\Users\naask\source\repos\getting-started-dotnet\aspnet\3-binary-data\Services\ImageUploader.cs:line 31
       at GoogleCloudSamples.UnityConfig.RegisterTypes(IUnityContainer container) in C:\Users\naask\source\repos\getting-started-dotnet\aspnet\3-binary-data\App_Start\UnityConfig.cs:line 123
       at GoogleCloudSamples.UnityConfig.<>c.<.cctor>b__8_0() in C:\Users\naask\source\repos\getting-started-dotnet\aspnet\3-binary-data\App_Start\UnityConfig.cs:line 53
       at System.Lazy`1.CreateValue()
  InnerException: 

If I update Google.Api.Gax package, v2.5.0 replaces v2.2.1 but I still receive the same error. Am I missing some configuration step, or will these samples simply not support running purely locally?

Auth README talks about Pub/Sub

The getting-started-dotnet/aspnet/6-auth/README.md was copied from the Pub/Sub project and does not document the google authentication it is an example of.

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.