Uploading assets using msbuild.
Copying Microsoft.WindowsAzure.Storage.dll to the sdk stage0 folder to get around issue https://github.com/Microsoft/msbuild/issues/658.
This commit is contained in:
parent
f63258ebaa
commit
6d7f110122
6 changed files with 305 additions and 13 deletions
|
@ -7,6 +7,7 @@ using System.Net.Http;
|
|||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.WindowsAzure.Storage;
|
||||
using Microsoft.WindowsAzure.Storage.Auth;
|
||||
using Microsoft.WindowsAzure.Storage.Blob;
|
||||
|
||||
namespace Microsoft.DotNet.Cli.Build
|
||||
|
@ -33,9 +34,27 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
_blobContainer = GetDotnetBlobContainer(_connectionString);
|
||||
}
|
||||
|
||||
public AzurePublisher(string accountName, string accountKey)
|
||||
{
|
||||
_blobContainer = GetDotnetBlobContainer(accountName, accountKey);
|
||||
}
|
||||
|
||||
private CloudBlobContainer GetDotnetBlobContainer(string connectionString)
|
||||
{
|
||||
CloudStorageAccount storageAccount = CloudStorageAccount.Parse(connectionString);
|
||||
|
||||
return GetDotnetBlobContainer(storageAccount);
|
||||
}
|
||||
|
||||
private CloudBlobContainer GetDotnetBlobContainer(string accountName, string accountKey)
|
||||
{
|
||||
var storageCredentials = new StorageCredentials(accountName, accountKey);
|
||||
var storageAccount = new CloudStorageAccount(storageCredentials, true);
|
||||
return GetDotnetBlobContainer(storageAccount);
|
||||
}
|
||||
|
||||
private CloudBlobContainer GetDotnetBlobContainer(CloudStorageAccount storageAccount)
|
||||
{
|
||||
CloudBlobClient blobClient = storageAccount.CreateCloudBlobClient();
|
||||
|
||||
return blobClient.GetContainerReference(s_dotnetBlobContainerName);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue