We are getting the following exception when Importing the AzurePublishSettingsFile:
PS C:\Users\xxx> Import-AzurePublishSettingsFile "C:\xyz\azure.publishsettings" Import-AzurePublishSettingsFile : Exception of type 'System.Exception' was thrown. At line:1 char:1 + Import-AzurePublishSettingsFile "C:\xyz\azure.publishsettings" + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : CloseError: (:) [Import-AzurePublishSettingsFile], Exception + FullyQualifiedErrorId : Microsoft.WindowsAzure.Commands.Subscription.ImportAzurePublishSettingsCommand
Please let me know how to resolve this.
I had the same problem when I tried my first line for Azure:
PS C:\Windows\system32> Import-AzurePublishSettingsFile –PublishSettingsFile "C:\azure\1.publishsettings"
Import-AzurePublishSettingsFile : Exception of type 'System.Exception' was thrown.
At line:1 char:1
+ Import-AzurePublishSettingsFile –PublishSettingsFile "C:\ubuntu\azure\1.publishs ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : CloseError: (:) [Import-AzurePublishSettingsFile], Exception
+ FullyQualifiedErrorId : Microsoft.WindowsAzure.Commands.Profile.ImportAzurePublishSettingsCommand
Turned out I had the wrong filename.
I think
"Import-AzurePublishSettingsFile : Exception of type 'System.Exception' was thrown. At line:1 char:1"
could means the cmdlet didn't find the setting file ( this is the case for me).
If I run
Import-AzurePublishSettingsFile –PublishSettingsFile "C:\notexist.publishsettings"
It shows the same error.
Have to say this is a very unclear error message.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With