From 081ee2c5f3406823c595982ba1ad50df1bba99e0 Mon Sep 17 00:00:00 2001 From: Tuangtuang Date: Fri, 11 Jun 2021 10:54:28 +0800 Subject: [PATCH 1/2] fix: storage account connection string --- BatchDotnetTutorialFfmpeg/Program.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/BatchDotnetTutorialFfmpeg/Program.cs b/BatchDotnetTutorialFfmpeg/Program.cs index 10f7cb6..de3cea2 100644 --- a/BatchDotnetTutorialFfmpeg/Program.cs +++ b/BatchDotnetTutorialFfmpeg/Program.cs @@ -87,8 +87,8 @@ private static async Task MainAsync() timer.Start(); // Construct the Storage account connection string - string storageConnectionString = String.Format("DefaultEndpointsProtocol=https;AccountName={0};AccountKey={1}", - StorageAccountName, StorageAccountKey); + string storageConnectionString = String.Format("DefaultEndpointsProtocol=https;AccountName={0};AccountKey={1};EndpointSuffix=core.windows.net", + StorageAccountName, StorageAccountKey); // Retrieve the storage account CloudStorageAccount storageAccount = CloudStorageAccount.Parse(storageConnectionString); From e40ad2f990e36c9cdb23f9bc74919b3220dfa42f Mon Sep 17 00:00:00 2001 From: Tuangtuang Date: Fri, 11 Jun 2021 11:32:07 +0800 Subject: [PATCH 2/2] fix: add application reference to every task --- BatchDotnetTutorialFfmpeg/Program.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/BatchDotnetTutorialFfmpeg/Program.cs b/BatchDotnetTutorialFfmpeg/Program.cs index de3cea2..4782dde 100644 --- a/BatchDotnetTutorialFfmpeg/Program.cs +++ b/BatchDotnetTutorialFfmpeg/Program.cs @@ -393,6 +393,16 @@ private static async Task> AddTasksAsync(BatchClient batchClient // Create a cloud task (with the task ID and command line) and add it to the task list CloudTask task = new CloudTask(taskId, taskCommandLine); task.ResourceFiles = new List { inputFiles[i] }; + + // Specify the application and version to install on the compute nodes for the task + task.ApplicationPackageReferences = new List + { + new ApplicationPackageReference + { + ApplicationId = appPackageId, + Version = appPackageVersion + } + }; // Task output file will be uploaded to the output container in Storage.