I am trying to build the Windows Azure PowerShell cmdlet, but facing issue while loading the cmdlet. I have followed the below steps:
- Cloned the latest code from master branch https://github.com/WindowsAzure/azure-sdk-tools
- Build the solution WindowsAzurePowershell.sln using VS 2010 SP1 Ultimate [I have Windows Azure SDK 1.7, VS 2010 tools for Windows Azure and WIX installed]
- After building the solution, opened the folder C:\repo\Windows-Azure-SDK-Nodejs-Git\azure-sdk-tools\Package\Debug and tried to load the cmdlet by running the command: Get-ChildItem '.*.psd1' | ForEach-Object {Import-Module $_}
And got the below error. Could someone please help me to resolve this issue?
If I install the official cmdlet bits using WebPI, everything works fine. But the cmdlet installed using the msi I built failed to load with the same error.
Error:
PS C:\repo\Windows-Azure-SDK-Nodejs-Git\azure-sdk-tools\Package\Debug> Get-ChildItem '.*.psd1' | ForEach-Object {Import-Module $} > error.txt Import-Module : Cannot load Windows PowerShell snap-in C:\Interop-TFS\Windows-Azure-SDK-Nodejs-Git\azure-sdk-tools\Pack age\Debug\Microsoft.WindowsAzure.Management.ServiceManagement.dll because of the following error: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information. Loader Exceptions: Could not load file or assembly 'Microsoft.WindowsAzure.Management, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31 bf3856ad364e35' or one of its dependencies. The system cannot find the file specified. Could not load file or assembly 'Microsoft.WindowsAzure.Management, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31 bf3856ad364e35' or one of its dependencies. The system cannot find the file specified. Could not load file or assembly 'Microsoft.WindowsAzure.Management, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31 bf3856ad364e35' or one of its dependencies. The system cannot find the file specified. Could not load file or assembly 'Microsoft.WindowsAzure.Management, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31 ..... bf3856ad364e35' or one of its dependencies. The system cannot find the file specified. Could not load file or assembly 'Microsoft.WindowsAzure.Management, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31 bf3856ad364e35' or one of its dependencies. The system cannot find the file specified. At line:1 char:57 + Get-ChildItem '.*.psd1' | ForEach-Object {Import-Module <<<< $} > error.txt + CategoryInfo : ResourceUnavailable: (:) [Import-Module], PSSnapInException + FullyQualifiedErrorId : PSSnapInLoadFailure,Microsoft.PowerShell.Commands.ImportModuleCommand