See Invoking Legacy Code on Google Cloud Platform.
A C# application designed to run on Google Compute Engine. It demonstrates how to use Google Cloud Pub/Sub.
- Invoking Legacy Code on Google Cloud Platform.
- .NET on Google Cloud Platform
- Google Cloud Pub/Sub API Client Library for .NET
-
On your Windows development machine,
-
In the Google Developers Console, select the project you created running the code in appengine-python-flask.
-
In the Google Developers Console, on the left-hand side, click "APIs & auth", then click Credentials. Click the button to "Generate a new JSON key." Set the environment variable
GOOGLE_APPLICATION_CREDENTIALS
to the path of the JSON key you downloaded. -
Clone this repo with
git clone https://github.com/GoogleCloudPlatform/pubsub-shout-csharp
-
Open ShoutService.sln with Microsoft Visual Studio version 2012 or later.
-
Edit
ShoutLib/Constants.cs
. Update the variableProjectId
. -
Build the Solution.
-
Run it locally by pressing F5 or choosing "Debug -> Start Debugging" from Microsoft Visual Studio's Menu.
To deploy the application:
-
Use the Google Developers Console to create a new VM instance with a Windows Server 2012 boot disk image. Before clicking the
Create
button, click "Management, disk, networking, access & security options" and under "Access & security", changeCloud Platform
toEnabled
. Now click 'Create.' -
Wait for the instance to be created, then connect to it via Remote Desktop.
-
Copy the contents of your Release folder from your development machine to the VM instance.
-
Using Windows explorer, give the user
Local Service
permission to read and execute the Release directory. -
Install the service with installutil.exe:
C:\Users\shout7q\Desktop\Release>\Windows\Microsoft.NET\Framework\v4.0.30319\InstallUtil.exe ShoutService.exe
Read the readme in the appengine-python-flask directory.
Star this repo if you found it useful. Use the github issue tracker to give feedback on this repo.
See LICENSE
Jeffrey Rennie