diff --git a/BatchDotnetTutorialFfmpeg/Program.cs b/BatchDotnetTutorialFfmpeg/Program.cs index 10f7cb6..4782dde 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); @@ -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.