Powershell &引用;对象引用未设置为对象的实例;当我尝试通过CLI部署Azure云服务时
我正在Azure PowerShell中运行此命令以部署我的节点项目:Powershell &引用;对象引用未设置为对象的实例;当我尝试通过CLI部署Azure云服务时,powershell,azure,azure-powershell,Powershell,Azure,Azure Powershell,我正在Azure PowerShell中运行此命令以部署我的节点项目: Publish-AzureServiceProject -ServiceName <name> -Location "East US" DeployTesting.ps1脚本: $scriptDir = Split-Path $MyInvocation.MyCommand.Path -Parent Set-Location $ScriptDir Copy-Item $ScriptDir\CoreServer\
Publish-AzureServiceProject -ServiceName <name> -Location "East US"
DeployTesting.ps1脚本:
$scriptDir = Split-Path $MyInvocation.MyCommand.Path -Parent
Set-Location $ScriptDir
Copy-Item $ScriptDir\CoreServer\node_modules\dbResources.js.test -Destination $scriptDir\CoreServer\node_modules\dbResources.js
Publish-AzureServiceProject -ServiceName <name> -Location "East US" -Slot staging
$scriptDir=Split Path$MyInvocation.MyCommand.Path-Parent
设置位置$ScriptDir
复制项目$ScriptDir\CoreServer\node_modules\dbResources.js.test-目标$ScriptDir\CoreServer\node_modules\dbResources.js
发布AzureServiceProject-ServiceName-位置“美国东部”-插槽暂存
发布在Github上的问题:您可以在上提交问题并附加您的服务项目文件夹吗?这将有助于调试问题 谢谢,
Elogeel您使用的是哪个版本的PowerShell 我的猜测是,powersahell所期望的位置缺少组成服务的其中一个文件。较新版本的PowerShell需要服务目录中的以下文件: (1) ServiceDefinition.csdef (2) ServiceConfiguration.Cloud.cscfg (3) serviceConfiguration.Local.cscfg (4) 包含角色文件的目录,其名称与角色名称匹配 旧版本也需要 deploymentSettings.json 请按照Ogail的建议提交一个bug,并包括您的服务目录详细信息 或者github url已更改,现在是
您是否使用证书设置了azure powershell?您必须执行每一步,不要跳过任何一步。powershell命令是否有效?是的,我唯一要做的是建议您的
不存在或格式不正确,或“East US”
格式不正确。请检查此项。我正在运行PowerShell的第3版。问题已发布。谢谢你的帮助。发布的问题。我无法附加我的文件夹,因为它超过了最大大小,但我发布了一个指向压缩文件夹的Google驱动器共享的链接。
<?xml version="1.0" encoding="utf-8"?>
<ServiceDefinition xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="<name>" xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition">
<WorkerRole name="CoreServer" vmsize="ExtraSmall">
<Startup>
<Task commandLine="setup_worker.cmd > log.txt" executionContext="elevated">
<Environment>
<Variable name="EMULATED">
<RoleInstanceValue xpath="/RoleEnvironment/Deployment/@emulated" />
</Variable>
<Variable name="RUNTIMEID" value="node" />
<Variable name="RUNTIMEURL" value="http://az413943.vo.msecnd.net/node/0.8.4.exe" />
</Environment>
</Task>
<Task commandLine="node.cmd .\startup.js" executionContext="elevated" />
</Startup>
<LocalResources>
<LocalStorage name="AGS_Working_Directory" sizeInMB="1024" />
</LocalResources>
<Endpoints>
<InputEndpoint name="HttpIn" protocol="tcp" port="80" />
</Endpoints>
<Runtime>
<Environment>
<Variable name="PORT">
<RoleInstanceValue xpath="/RoleEnvironment/CurrentInstance/Endpoints/Endpoint[@name='HttpIn']/@port" />
</Variable>
<Variable name="EMULATED">
<RoleInstanceValue xpath="/RoleEnvironment/Deployment/@emulated" />
</Variable>
</Environment>
<EntryPoint>
<ProgramEntryPoint commandLine="node.cmd .\server.js" setReadyOnProcessStart="true" />
</EntryPoint>
</Runtime>
</WorkerRole>
</ServiceDefinition>
$scriptDir = Split-Path $MyInvocation.MyCommand.Path -Parent
Set-Location $ScriptDir
Copy-Item $ScriptDir\CoreServer\node_modules\dbResources.js.test -Destination $scriptDir\CoreServer\node_modules\dbResources.js
Publish-AzureServiceProject -ServiceName <name> -Location "East US" -Slot staging