Azure Node.js Express App scaffold.xml缺失

按照Microsoft的“入门”教程,将Node.js Express应用程序部署为Cloud Service。

在仔细安装两台机器上的所有工具之后,一个Win 7和一个Win 8,我就到了生成“Hello World”的地步,本教程build议在Windows PowerShell中直观地运行名为New-AzureServiceProject的helloworld

这是发生了什么事情:

PS C:\ node> New-AzureServiceProject helloworld New-AzureServiceProject:找不到path的一部分“C:\ Program Files(x86)\ Microsoft SDK \ Azure \ PowerShell \ ResourceManager \ AzureResourceManager \ AzureRM.Profile \ Resources \ Scaffolding \一般\ scaffold.xml”。 在行:1 char:1 + New-AzureServiceProject expressapp + ~~~~~~~~~~~~~ + CategoryInfo: CloseError:(:) [New-AzureServiceProject],DirectoryNotFoundException + FullyQualifiedErrorId:Microsoft.WindowsAzure.Commands.CloudService.Development.Scaffolding.NewAzureServiceProjectCommand

按照指示安装Powershell和Azure SDK后,看看我的系统,我有一个目录:

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

但是,该目录没有一个子目录“资源”,因此它从来没有findscaffold.xml文件….

我试图在AzureRM.profile里创build子目录Resources \ Scaffolding \ General。 这改变了错误只是“找不到scaffold.xml”

我试图把“一般”的写作职位设置得很宽敞。 不用找了。

上面的错误是在Win 8机器上。 在我的Win 7机器上仔细研究安装,并深入到本教程中未提及的prereqs深入多层后,AzureRM.Profile最终安装在C:\ Program Files \ C:\ Program Files \ WindowsPowerShell \ Modules中,而不是C:\ Program Files文件(x86)\ Microsoft SDKs \ Azure \ PowerShell \ ResourceManager \ AzureResourceManager但行为是相同的。

我已经看遍了整个networking,一直没能find任何信息丢失scaffold.xml可能指向一个解决scheme。 这是一个新的AzureServiceProject需要创build应用程序的模板吗? 或者这是否应该由New-AzureServiceProject生成?

任何build议,将不胜感激…

谢谢!

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

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

需要从以下位置复制资源文件夹:

C:\ Program Files \ WindowsPowerShell \ Modules \ Azure \ 3.1.0 \ Compute

C:\ Program Files \ WindowsPowerShell \ Modules \ AzureRM.profile \ 2.3.0 \ Resources \ Scaffolding \ General

根据你从PowerShell的错误消息,似乎你错过了安装的PowerShell AzureRM.*模块。

请尝试从以pipe理员身份运行的Windows PowerShell控制台运行以下命令:

 PS C:\> Install-Module AzureRM PS C:\> Install-AzureRM 

然后再次运行New-AzureServiceProject helloworld

同时,如果您想开始使用Azure Web Apps上的node.js应用程序,则可以参考Azure网站Cmdlet 。

为可怕的经历道歉。 这看起来像是一个特定版本的Azure PowerShell中的错误。 为了进行诊断,我们需要知道哪个版本 – 如果您使用的是msi安装程序或WebPI,则会在“卸载程序”控制面板中find简洁版,条目是“Microsoft Azure PowerShell”。

在某些注释中出现了一些混淆 – 托pipe服务cmdlet是Azure中较早的RDFE(服务pipe理)命令的一部分。 支持这些的cmdlet位于“Azure”模块中,而不在任何“AzureRM”模块中。

要安装最新版本,我强烈build议您使用Web平台安装程序或可从我们的GitHub仓库中检索的msi安装程序。 PowerShell Gallery也是一个很好的解决scheme,如果你对PowerShell模块pipe理非常的熟悉的话。

我将把这个教程带给文档小组。 同时,如果你能确定你使用的azure powershell版本和sdk版本,我可以看看是否有解决这个问题的方法。

复制内容

C:\ Program Files \ WindowsPowerShell \ Modules \ Azure \ 4.3.1 \ Services \ Resources \ Scaffolding \ General

C:\ Program Files \ WindowsPowerShell \ Modules \ AzureRM.profile \ 3.3.1 \ Resources \ Scaffolding \ General