From cfc2a7dc00ad655d4fb658a5196283fe13ba6429 Mon Sep 17 00:00:00 2001 From: Jennifer Davis Date: Sun, 8 Feb 2026 20:26:00 -0800 Subject: [PATCH 1/3] fix(documentation): update READMEs to match current state of repo - `README.md`: Completely rewritten to reflect the current repository structure. It now correctly lists the four main sample applications (HelloWorld, Bookshelf, BackgroundProcessing, and Sessions) and the Google Cloud APIs they utilize (Firestore, Cloud SQL, Cloud Storage, Pub/Sub, Translation, and KMS). - `TESTING.md`: Updated with accurate instructions for setting up and running tests. It now lists the correct APIs to enable and provides the proper command to run tests from the root directory (.\BuildAndRunTests.ps1), removing outdated references to the non-existent aspnet directory. - `Bookshelf/README.md`: Updated the title from "Binary Data" to "Bookshelf Sample" and clarified the services used (adding Cloud SQL). Signed-off-by: Jennifer Davis --- Bookshelf/README.md | 6 +++--- README.md | 44 ++++++++++++++++++------------------------ TESTING.md | 47 +++++++++++++++++++++------------------------ 3 files changed, 44 insertions(+), 53 deletions(-) diff --git a/Bookshelf/README.md b/Bookshelf/README.md index 2fba6af..adbce1d 100644 --- a/Bookshelf/README.md +++ b/Bookshelf/README.md @@ -1,7 +1,7 @@ -# Binary Data +# Bookshelf Sample -This folder contains an ASP.NET end-to-end sample application written in C# that -uses Google Cloud services like Firestore and Cloud Storage. +This folder contains an ASP.NET Core end-to-end sample application written in C# that +uses Google Cloud services like Firestore, Cloud Storage, and Cloud SQL. ## Tutorial See https://cloud.google.com/dotnet/docs/getting-started/tutorial-app for diff --git a/README.md b/README.md index a70e254..9f9691f 100644 --- a/README.md +++ b/README.md @@ -1,37 +1,31 @@ -## Getting Started for .NET +# Getting Started for .NET -This repo contains sample applications written in C# that run on Google Cloud Platform. +This repository contains sample applications written in C# and ASP.NET Core that run on Google Cloud. -See [https://cloud.google.com/dotnet/getting-started/hello-world](https://cloud.google.com/dotnet/getting-started/hello-world) for instructions on how to build, run, and deploy the samples. +See [the documentation](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: +## Samples -* [.NET Cloud Client Library] -* [Google API Client Library] +* **[HelloWorld](./HelloWorld)**: A basic ASP.NET Core application that can be deployed to Cloud Run or Compute Engine. +* **[Bookshelf](./Bookshelf)**: An end-to-end sample application showing how to use Cloud Firestore, Cloud Storage, and Cloud SQL. +* **[BackgroundProcessing](./BackgroundProcessing)**: Demonstrates how to perform background tasks using Cloud Pub/Sub and the Cloud Translation API. +* **[Sessions](./Sessions)**: Shows how to manage user sessions using Cloud Firestore. -## aspnet +## Cloud APIs used -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: - -* [Cloud Datastore API] -* [Cloud SQL API] -* [Cloud Storage API] -* [Cloud Pub/Sub API] +The samples demonstrate how to use several Google Cloud APIs: + +* [Cloud Firestore](https://cloud.google.com/firestore/docs/) +* [Cloud SQL](https://cloud.google.com/sql/docs/) +* [Cloud Storage](https://cloud.google.com/storage/docs/) +* [Cloud Pub/Sub](https://cloud.google.com/pubsub/docs/) +* [Cloud Translation](https://cloud.google.com/translate/docs/) +* [Cloud Key Management Service (KMS)](https://cloud.google.com/kms/docs/) ## Contributing changes -* See [CONTRIBUTING.md](CONTRIBUTING.md) +* See [CONTRIBUTING.md](CONTRIBUTING.md) ## Licensing -* See [LICENSE](LICENSE) - -[.NET Cloud Client Library]: https://github.com/googlecloudplatform/gcloud-dotnet -[Google API Client Library]: https://github.com/google/google-api-dotnet-client -[aspnet]: ./aspnet -[Cloud Datastore API]: https://developers.google.com/api-client-library/dotnet/apis/datastore/v1beta3 -[Cloud SQL API]: https://cloud.google.com/sql/docs/admin-api/ -[Cloud Storage API]: http://googlecloudplatform.github.io/gcloud-dotnet/index.html -[Cloud Pub/Sub API]: https://developers.google.com/api-client-library/dotnet/apis/pubsub/v1 +* See [LICENSE](LICENSE) diff --git a/TESTING.md b/TESTING.md index c4e1404..d1b881f 100644 --- a/TESTING.md +++ b/TESTING.md @@ -1,16 +1,14 @@ # Testing ## Running tests -1. **Create a project in the Google Cloud Platform Console**. +1. **Create a project in the Google Cloud 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 + you to manage all Google Cloud resources for your app, including deployment, access control, billing, and services. - 1. Open the [Cloud Platform Console](https://console.cloud.google.com/). + 1. Open the [Cloud Console](https://console.cloud.google.com/). 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 + 3. Give your project a name. + 4. 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. 2. **Enable billing for your project**. @@ -23,11 +21,16 @@ If you haven't already installed the Google Cloud SDK, [install and initialize the Google Cloud SDK](https://cloud.google.com/sdk/docs/) now. The SDK contains tools and libraries that enable you to create and manage - resources on Google Cloud Platform. + resources on Google Cloud. 4. **Enable APIs for your project**. - [Click here](https://console.cloud.google.com/flows/enableapi?apiid=datastore,pubsub,storage_api,logging,plus&showconfirmation=true) - to visit Cloud Platform Console and enable the APIs. + Enable the following APIs in the Cloud Console: + * Cloud Firestore API + * Cloud Pub/Sub API + * Cloud Storage API + * Cloud Translation API + * Cloud SQL Admin API + * Cloud Key Management Service (KMS) API 5. Download or clone this repo with @@ -36,22 +39,16 @@ ``` 6. Set the environment variables: - - GoogleCloudSamples:ProjectId = your project id displayed on the Google Developers Console. - - GoogleCloudSamples:BucketName = the name of the Google Cloud Storage bucket you created. - - GoogleCloudSamples:ApplicationName = the name for your application. - - GoogleCloudSamples:AuthClientId = the service account id of the service account you created. - - GoogleCloudSamples:AuthClientSecret = the local path to the JSON file containing the service account's private key. - - GoogleCloudSamples:ConnectionStringCloudSql= the connection string for the Cloud SQL database you created, in the format of "Server=1.2.3.4;Database=bookshelf;Uid=dotnetapp;Pwd=password". - - GoogleCloudSamples:ConnectionStringSqlServer= the connection string for the SQL Server database you created, in the format of "Data Source=ServerName;Initial Catalog=DatabaseName;Integrated Security=False;User Id=userid;Password=password". + - `GoogleCloudSamples:ProjectId` = your project id displayed on the Google Cloud Console. + - `GoogleCloudSamples:BucketName` = the name of the Google Cloud Storage bucket you created. + - `GoogleCloudSamples:ConnectionStringCloudSql` = the connection string for the Cloud SQL database you created, in the format of "Server=1.2.3.4;Database=bookshelf;Uid=dotnetapp;Pwd=password". -7. Add the following tools to your path: - - MSBuild - - MSTest - - Nuget +7. Ensure you have the following tools installed and in your PATH: + - [.NET Core SDK](https://dotnet.microsoft.com/download) + - PowerShell -8. Run the test script: +8. Run the test script from the root of the repository: + ```powershell + .\BuildAndRunTests.ps1 ``` - C:\...\getting-started-dotnet\aspnet> powershell ..\BuildAndRunTests.ps1 - ``` - From b360738344506d50555c5b73ca39859450e1ec9f Mon Sep 17 00:00:00 2001 From: Jennifer Davis Date: Sun, 8 Feb 2026 20:29:44 -0800 Subject: [PATCH 2/3] fix: Update TESTING.md Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> --- TESTING.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/TESTING.md b/TESTING.md index d1b881f..2550887 100644 --- a/TESTING.md +++ b/TESTING.md @@ -39,9 +39,9 @@ ``` 6. Set the environment variables: - - `GoogleCloudSamples:ProjectId` = your project id displayed on the Google Cloud Console. - - `GoogleCloudSamples:BucketName` = the name of the Google Cloud Storage bucket you created. - - `GoogleCloudSamples:ConnectionStringCloudSql` = the connection string for the Cloud SQL database you created, in the format of "Server=1.2.3.4;Database=bookshelf;Uid=dotnetapp;Pwd=password". + * `GoogleCloudSamples:ProjectId` = your project id displayed on the Google Cloud Console. + * `GoogleCloudSamples:BucketName` = the name of the Google Cloud Storage bucket you created. + * `GoogleCloudSamples:ConnectionStringCloudSql` = the connection string for the Cloud SQL database you created, in the format of "Server=1.2.3.4;Database=bookshelf;Uid=dotnetapp;Pwd=password". 7. Ensure you have the following tools installed and in your PATH: - [.NET Core SDK](https://dotnet.microsoft.com/download) From 4dca9dd29e9595a9e531d12b6315ef9fd0b885b9 Mon Sep 17 00:00:00 2001 From: Jennifer Davis Date: Sun, 8 Feb 2026 20:29:54 -0800 Subject: [PATCH 3/3] fix: Update TESTING.md Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> --- TESTING.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/TESTING.md b/TESTING.md index 2550887..aab4d2c 100644 --- a/TESTING.md +++ b/TESTING.md @@ -44,8 +44,8 @@ * `GoogleCloudSamples:ConnectionStringCloudSql` = the connection string for the Cloud SQL database you created, in the format of "Server=1.2.3.4;Database=bookshelf;Uid=dotnetapp;Pwd=password". 7. Ensure you have the following tools installed and in your PATH: - - [.NET Core SDK](https://dotnet.microsoft.com/download) - - PowerShell + * [.NET Core SDK](https://dotnet.microsoft.com/download) + * PowerShell 8. Run the test script from the root of the repository: