bobo2000
bobo2000

Reputation: 1877

Getting publish files windows azure

The steps I have taken:

1) Get-AzurePublishSettingsFile

I then download the file.

2) Import-AzurePublishSettingsFile

now the problem is here, I have put the first file in the C drive, but it cant seem to find it.

I do the following

Import-AzurePublishSettingsFile C:\-credentials.publishsettings

powershell returns the following error

any idea how to resolve this.

thanks

Upvotes: 2

Views: 1765

Answers (2)

Julie S.
Julie S.

Reputation: 127

From what I understand, there are 2 ways to publish to Azure using VS 2012: the first one is 1) via "publish" and 2) the second one is "publish via azure".

1) If you are selecting "publish" which is just to Azure websites the while it gives up an option to select the downloaded publish settings these settings do not actually import and the only way I get the website deployed is by setting up the profile manually.

2) to use your downloaded publish settings, you must select "publish to azure", which then imports the certificate and allows you proceed to the next steps within the VS 2012 deployment to a cloud service.

It took me a while to understand that publishing via VS 2012 is a completely separate process from using Azure Powershell to manage Azure VMs (or blobs) which also requires you to work with the downloaded publishsettings which I left in my "downloads" folder per below:

PS C:> Import-AzurePublishSettingsFile 'C:\Users[me]\Downloads[Pay-As-You-Go-credentials.publishsettings]'

Note: the single quotes seem to be required.

Upvotes: 0

AvkashChauhan
AvkashChauhan

Reputation: 20571

You are passing the the incorrect publishsettings file location in your command as below and that's why you are getting the exception:

PS> import-AzurePublishSettingsFile C:\-credentials.publishsettings

Nobody knows where you are storing the publishsettings in your machine so what you really need is to download publishsettings file again using Get-AzurePublishSettingsFile PS command and this time remember where you are saving it in your local machine.

Once you know the publishsettings file path pass it correctly with import-AzurePublishSettingsFile PS command and it will work.

PS> import-AzurePublishSettingsFile CORRECT_PATH_TO_PUBLISHSETTINGS_FILE

I have created a sample PS script menu to use Windows Azure so you can take a look here.

Upvotes: 1

Related Questions