2
votes

I tried to create Azure cloud service using:

Create the Cloud Service

New-AzureServiceProject -ServiceName 'service-lift-and-shift' -Verbose

I am using Azure SDK 2.9 and it is giving the following error:

ServiceName: service-lift-and-shift
New-AzureServiceProject : Could not find a part of the path 'C:\Program Files (x86)\Microsoft 
SDKs\Azure\PowerShell\ResourceManager\AzureResourceManager\AzureRM.Profile\Resources\Scaffolding\General\scaffold.xml'.
At line:1 char:1
+ New-AzureServiceProject
+ ~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : CloseError: (:) [New-AzureServiceProject], DirectoryNotFoundException
    + FullyQualifiedErrorId : Microsoft.WindowsAzure.Commands.CloudService.Development.Scaffolding.NewAzureServiceProjectCommand
2

2 Answers

6
votes

I solved this problem by copying folder
C:\Program Files (x86)\Microsoft SDKs\Azure\PowerShell\ServiceManagement\Azure\Services\Resources
to
C:\Program Files (x86)\Microsoft SDKs\Azure\PowerShell\ResourceManager\AzureResourceManager\AzureRM.Profile

1
votes

Since you want create a Could Service which only exists in ASM mode, you should logged in with command: Add-AzureAccount.

I logged in with Add-AzureRmAccount in the first time and I got the same error as you. But when I logged in with Add-AzureAccount in ASM mode, it works.

So make sure you were logged in ASM mode.