Closed Grant-Rc closed 1 year ago
@stuartko can you have a look?
@Grant-Rc - can you try the CLI and see if that installs ok on your machine?
@stuartko - any ideas?
Hi team, just to add - I'm having the same issue in both PowerShell and CLI as reported by @Grant-Rc above. Tested on two different machines, one of which was new and clean windows VM.
@Grant-Rc : For the Powershell issue, can you run the following from the root Private Preview directory and try the installation again?:
.\bin\x64\sn.exe -Vr .\bin\modules\Az.Resources\Microsoft.Azure.Management.ResourceManager.dll
This will cause strong name verification to be bypassed for this particular assembly.
Install CLI MSI successfully and following tutorial I get the following
Thoughts?
@Grant-Rc - do you mind opening a new issue for this, it looks to be unrelated...
.\bin\x64\sn.exe -Vr .\bin\modules\Az.Resources\Microsoft.Azure.Management.ResourceManager.dll
here is my results from sunning this
.\bin\x64\sn.exe -Vr .\bin\modules\Az.Resources\Microsoft.Azure.Management.ResourceManager.dll
Microsoft (R) .NET Framework Strong Name Utility Version 4.0.30319.0
Copyright (c) Microsoft Corporation. All rights reserved.
Verification entry added for assembly 'Microsoft.Azure.Management.ResourceManager,31BF3856AD364E35'
then I rain the script and still got error
AzDeploymentStacks Private Preview
=============================================================
Manages installation of the cmdlets for the private preview
build of Az.Resources which can be used to manage/deploy
Deployment Stacks.
This script can perform multiple operations. Select the operation you'd like to perform:
1. Install module in current Powershell session
2. Install module system-wide
3. Uninstall module (previous system-wide installs)
Note: When you install the preview module, the preview functionality
will override the official/public Az.Resources module functionality until
the Powershell session is closed (if option 1 is selected) or until the
preview module is uninstalled through this script (if installed through
option 2).
Which operation (1, 2, or 3)?: 1
This action will install the Deployment Stack cmdlet(s) to the current
Powershell Session (prompt) so they can be previewed/tested.
Continue with install? (Y/N): y
Verifying Azure Powershell module availability...
Azure Powershell module verified!
Verifying you're logged into Azure...
Login verified!
Installing demo module 'Az.Resources'... (current session only)
Import-Module : Could not load file or assembly 'Microsoft.Azure.Management.ResourceManager, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one
of its dependencies. Strong name validation failed. (Exception from HRESULT: 0x8013141A)
At C:\Users\crowegr\Downloads\AzDeploymentStacksPrivatePreview_Powershell\AzDeploymentStacksPrivatePreview\AzDeploymentStacksPrivatePreview.ps1:260 char:5
+ Import-Module -Name $modulePsdPath
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [Import-Module], FileLoadException
+ FullyQualifiedErrorId : FormatXmlUpdateException,Microsoft.PowerShell.Commands.ImportModuleCommand
NP, Done
This error is expected to fixed in the next Deployment Stacks release.
@Grant-Rc : It's possible a reboot will be required after the sn.exe command is run. But my other thought is that group policy on your machine may be overwriting the disabled strong name verification flag.
Can you run "reg query HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\ -s" from an admin prompt and tell me if you have any values for Microsoft.Azure.Management.ResourceManager present in the output?
sure @stuartko
@Grant-Rc StrongName verification bypass is added for the binary. Is this machine joined to a domain? It's possible group policy is restricting the ability to disable strong name verification. This shouldn't require a reboot, but I'm presuming you're seeing the same failure even after rebooting after adding the registry key?
Eventually this won't be an issue in Public Preview because we'll sign all of our bits. I'm not aware of any Powershell specific policies for strong name verification, but they could also be buried in group policy or managed device policies. Were you able to install the AZ CLI preview client? If so, this narrows it down to being Powershell specific (meaning it's a non-standard policy/config set on your client somewhere within Powershell).
Hi team, just to add - I'm having the same issue in both PowerShell and CLI as reported by @Grant-Rc above. Tested on two different machines, one of which was new and clean windows VM.
@jonclyde Before passing of a new build I wanted to confirm if you were able to do a couple of things
Open powershell as admin Run the following command & "C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\python.exe" -m pip install -e path of unzipped sdk --force-reinstall
That error usually come from the CLI not being mapped to the SDK, the above command should fix that issue
Issue During Setup I got the following Error
I Looked into the PowerShell file and found that there is a function
function Enable-StrongNameVerificationSkip
But this function is not called any where as you can see from the screen shotSteps to reproduce the behavior:
Set-ExecutionPolicy Bypass -Scope Process
Set-Location
to the extracted zip location.\AzDeploymentStacksPrivatePreview.ps1
Expected behavior Expecting the function "Enable-StrongNameVerificationSkip" to run so that this error doesn't occur
Full output
Repro Environment Host OS : Windows 10![image](https://user-images.githubusercontent.com/3213940/180326572-4ef519b7-5e35-4424-91cf-a60226033d95.png)
Additional context This is the first Private Preview so let me know if there is anything missing, i have just to run the function manually to see if it work as i will rely on the community support.