首页 文章

“无法找到创建服务的路径的一部分

提问于
浏览
2

我尝试使用以下方法创建Azure Cloud 服务:

创建Cloud Service

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

我使用Azure SDK 2.9,它给出以下错误:

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 回答

  • 6

    我通过复制 folder 解决了这个问题
    C:\ Program Files(x86)\ Microsoft SDKs \ Azure \ PowerShell \ ServiceManagement \ Azure \ Services \ Resources

    C:\ Program Files(x86)\ Microsoft SDKs \ Azure \ PowerShell \ ResourceManager \ AzureResourceManager \ AzureRM.Profile

  • 1

    由于您希望创建仅在ASM模式下存在的 Could Service ,因此您应该使用以下命令登录: Add-AzureAccount .

    我第一次使用 Add-AzureRmAccount 登录,我得到了和你一样的错误 . 但是当我在ASM模式下使用 Add-AzureAccount 登录时,它可以工作 .

    因此,请确保您已登录ASM模式 .

相关问题