azure-powershell icon indicating copy to clipboard operation
azure-powershell copied to clipboard

SDK v2.0 : New-AzureRmResourceGroup : Could not load file or assembly 'Microsoft.Rest.ClientRuntime.Azure.Authentication'

Open whilke opened this issue 10 years ago • 22 comments

Looks like a new SDK version just hit, getting this error on several different OS versions:

New-AzureRmResourceGroup : Could not load file or assembly 'Microsoft.Rest.ClientRuntime.Azure.Authentication, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. Strong name validation

whilke avatar Aug 09 '16 00:08 whilke

@whilke How did you install the SDK? This is likely a version mismatch between installed SDK versions, can you execute Get-Module -ListAvailable when this occurs?

markcowl avatar Aug 09 '16 00:08 markcowl

@markcowl came in via the normal web platform installer channel. Seems to have installed a build that was released just today though it lists an update date of 7/11.

(Get-Module -ListAvailable | Where-Object{ $_.Name -eq 'Azure' })

ModuleType Version Name ExportedCommands


Manifest 2.0.0 Azure {Get-AzureAutomationCertificate, Get-AzureAutomationConnection, New-AzureAutomationConnection, R...

whilke avatar Aug 09 '16 02:08 whilke

I have the same error. On several machines update through web platform installer, that doesn't list this as a new release image

sjkp avatar Aug 09 '16 08:08 sjkp

Anyone have a link to the 1.6 (previous version) installer? Our deployment system is down currently because of this issue.

whilke avatar Aug 09 '16 12:08 whilke

You can download if from the release page https://github.com/Azure/azure-powershell/releases/tag/v1.6.0-July2016

sjkp avatar Aug 09 '16 12:08 sjkp

I'm facing the same issue, when I downgrade to version 1.6 it works fine.

guibirow avatar Aug 09 '16 12:08 guibirow

I can confirm downgrade to v1.6 works, as commented by @guibirow

christofferjerrebo avatar Aug 09 '16 12:08 christofferjerrebo

Just to add an extra information, when updated to V2, the following error happens:

Command

Login-AzureRmAccount
Set-AzureRmCurrentStorageAccount -ResourceGroupName $TemplateResourceGroup -Name $TemplateStorageAccount

Error:

Set-AzureRmCurrentStorageAccount : Could not load file or assembly 'Microsoft.Rest.ClientRuntime.Azure.Authentication, Version=2.0.0.0, Culture=neutral, 
PublicKeyToken=31bf3856ad364e35' or one of its dependencies. Strong name validation failed. (Exception from HRESULT: 0x8013141A)
At line:70 char:5
+     Set-AzureRmCurrentStorageAccount -ResourceGroupName $TemplateReso ...
+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : CloseError: (:) [Set-AzureRmCurrentStorageAccount], FileLoadException
    + FullyQualifiedErrorId : Microsoft.Azure.Commands.Management.Storage.SetAzureRmCurrentStorageAccount

guibirow avatar Aug 09 '16 13:08 guibirow

We have a root cause for the issue. A hotfix will be forthcoming.

markcowl avatar Aug 09 '16 19:08 markcowl

Will this hotfix apply to Azure Automation as well? I am getting this error trying to create a Resource Group with a Powershell Workflow runbook after upgrading several Powershell Modules in Azure Automation to their latest version.

markvsql avatar Aug 09 '16 20:08 markvsql

Yes, we will push out new installers and new modules.

markcowl avatar Aug 09 '16 21:08 markcowl

Meanwhile, we have delisted the AzureRM and Azure modules and pulled back the msi update. Individual modules have not been delisted.

markcowl avatar Aug 09 '16 21:08 markcowl

See http://screencast.com/t/dXo7juaBnH can't run Get-AzureRmVM either.

marckean avatar Aug 10 '16 02:08 marckean

For the record I have a clean install from webpi that I did yesterday on a freshly installed windows laptop, I do not see this issue. is there clarification on what the actual cause might be? Are the folks that are getting this error all upgrading? it seems that way from the handful of comments I read through.

jeffpatton1971 avatar Aug 10 '16 17:08 jeffpatton1971

@jeffpatton1971 It would appear I definitely got this error from upgrading. My CI process started to fail after the update to azure powershell 2.0, 2 days ago, and after uninstalling and installing 1.6, it's back to normal.

edtheshed avatar Aug 10 '16 17:08 edtheshed

I got this error on a clean install of v2 and also on upgrade from 1.6 to 2. from WebPI and from PS command line, both fails. When downgraded worked fine. @jeffpatton1971, yesterday they rolled-back to previous version, see if you installed the V2 or V1.6

guibirow avatar Aug 10 '16 18:08 guibirow

Interesting we talked a little about this internally and a couple of us did fresh installs and didn't hit this whereas a few of us did upgrades and did see this issue

Get Outlook for Androidhttps://aka.ms/ghei36

On Wed, Aug 10, 2016 at 1:42 PM -0500, "Diego" <[email protected]mailto:[email protected]> wrote:

I got this error on a clean install of v2 and also on upgrade from 1.6 to 2. from WebPI and from PS command line, both fails. When downgraded worked fine. @jeffpatton1971https://github.com/jeffpatton1971, yesterday they rolled-back to previous version, see if you installed the V2 or V1.6

You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/Azure/azure-powershell/issues/2747#issuecomment-238963297, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ABIxe-Qy7Pv4NGyDGDeiIMLOUItaNJV7ks5qehuJgaJpZM4JfmJb.

jeffpatton1971 avatar Aug 10 '16 18:08 jeffpatton1971

@guibirow just noticed your second comment, to my knowledge i'm running the latest

ModuleType Version Name


Manifest 2.0.2 AzureRM.Resources

jeffpatton1971 avatar Aug 10 '16 18:08 jeffpatton1971

Could be related or not, @jeffpatton1971 i noticed you did a fresh install of Windows, you would have Windows 10 Anniversary edition I'm assuming. I'm on Windows 10 yet to upgrade to Anniversary edition, i tried upgrading yesterday and had to roll back half way due to my Surface getting stuck on "windows 10 anniversary working on updates 32% don't turn off your pc" didn't progress further than 32%

So maybe Windows 10 Anniversary edition has other updates that allow the Azure PowerShell module v2.0.0 to function.

marckean avatar Aug 10 '16 20:08 marckean

I'm on windows 10 enterprise...don't think I'm on the anniversary yet...?

Get Outlook for Androidhttps://aka.ms/ghei36

From: Marc Kean Sent: Wednesday, August 10, 3:19 PM Subject: Re: [Azure/azure-powershell] SDK v2.0 : New-AzureRmResourceGroup : Could not load file or assembly 'Microsoft.Rest.ClientRuntime.Azure.Authentication' (#2747) To: Azure/azure-powershell Cc: Jeffrey Patton, Mention

Could be related or not, @jeffpatton1971https://github.com/jeffpatton1971 i noticed you did a fresh install of Windows, you would have Windows 10 Anniversary edition I'm assuming. I'm on Windows 10 yet to upgrade to Anniversary edition, i tried upgrading yesterday and had to roll back half way due to my Surface getting stuck on "windows 10 anniversary working on updates 32% don't turn off your pc" didn't progress further than 32%

So maybe Windows 10 Anniversary edition has other updates that allow the Azure PowerShell module v2.0.0 to function.

You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/Azure/azure-powershell/issues/2747#issuecomment-238990929, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ABIxew2LwuHUFFZXM8YVIU1O8AT2eIoBks5qejJPgaJpZM4JfmJb.

jeffpatton1971 avatar Aug 10 '16 20:08 jeffpatton1971