4
votes

Am following Microsoft's "Getting Started" tutorial to deploy a Node.js Express app as a Cloud Service.

After carefully installing all the tools on two machines, one Win 7 and one Win 8, I get down to the point of generating "Hello World" and the tutorial suggests running the intuitively named: New-AzureServiceProject helloworld in Windows PowerShell.

Here is what happens:

PS C:\node> New-AzureServiceProject helloworld 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 expressapp + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : CloseError: (:) [New-AzureServiceProject], DirectoryNotFoundException + FullyQualifiedErrorId : Microsoft.WindowsAzure.Commands.CloudService.Development.Scaffolding.NewAzureServiceProjectCommand

Taking a look at my system after installing Powershell and the Azure SDK as instructed, I DO have a directory:

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

However, that directory does NOT have a subdirectory "Resources" and hence it never finds the scaffold.xml file....

I tried creating the subdirectory Resources\Scaffolding\General inside of AzureRM.profile. That changed the error to simply "could not find scaffold.xml"

I tried setting the write positions on "General" to be wide open. No change.

The above error is on the Win 8 machine. On my Win 7 machine after digging more carefully into the install and going multiple layers deep into prereqs not mentioned in the tutorial, AzureRM.Profile ends up installed in C:\Program Files\C:\Program Files\WindowsPowerShell\Modules rather than in C:\Program Files (x86)\Microsoft SDKs\Azure\PowerShell\ResourceManager\AzureResourceManager but the behavior is identical.

I have looked all over the web and have not been able to find any information on the missing scaffold.xml that might point to a solution. Is this a template that New-AzureServiceProject needs to create the app? Or is this something that is supposed to be generated by New-AzureServiceProject?

Any suggestions would be appreciated...

Thanks!

5
I answered the same question in here: stackoverflow.com/questions/36982157/…Redman

5 Answers

9
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

3
votes

Need to copy the Resources folder from:

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

to

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

0
votes

According your error message from PowerShell, it seems that you miss installed powershell AzureRM.* modules.

Please try to run the following commands from the Windows PowerShell console running as Administrator:

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

Then run New-AzureServiceProject helloworld again.

Meanwhile, if you want to get started with the node.js application on Azure Web Apps, you can refer to Azure Website Cmdlets.

0
votes

Apologies for the terrible experience. This looks like a bug in one particular version of Azure PowerShell. To diagnose, we would need to know which version - if you used the msi installer, or WebPI, you will find thins in the 'Uninstall a Program' control panel, the entry is 'Microsoft Azure PowerShell'.

One piece of confusion in some of the comments - the hosted service cmdlets are part of the older RDFE (Service Management) commands in Azure. The cmdlets that support these are in the 'Azure' module, and not in any of the 'AzureRM' modules.

To install the latest version, I highly encourage you to use Web Platform Installer, or the msi installer that you can retrieve from our GitHub repo. PowerShell Gallery is a great solution as well, if you are very comfortable with PowerShell module management.

I will bring this tutorial to the attention of the documentation team. Meanwhile, if you can identify the azure powershell version and the sdk version you are using, I can see if there is a fix for the problem.

0
votes

Copy content from

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

To

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