在构建服务器上使用Publish目标构建Cloud Service(Web角色)项目时,我在CSPack步骤中从构建服务器收到一些奇怪的错误.通过Visual Studio 2012发布工作正常,但不在构建服务器上.
Team City报告错误:
[Azure\AzureAPI\AzureAPI.ccproj.teamcity] CorePublish [15:58:49][CorePublish] CorePublish: PackageWebRole = True [15:58:49][CorePublish] Publishing starting... [15:58:49][CorePublish] RolePlugins is [15:58:49][CorePublish] Publishing to 'bin\Release\app.publish\' [15:58:49][CorePublish] MakeDir [15:58:49][CorePublish] TargetServiceDefinition is bin\Release\ServiceDefinition.csdef [15:58:49][CorePublish] TargetServiceConfiguration is bin\Release\ServiceConfiguration.cscfg [15:58:49][CorePublish] Roles is [15:58:49][CorePublish] CSPack [15:58:49][CSPack] D:\AzureAPI\bin\Release\ServiceDefinition.csdef error CloudServices077: Need to specify the physical directory for the virtual path 'Web/' of role Application.MyWebApi
我的ServiceDefinition文件包含该站点的这些设置.
<WebRole name="Application.MyWebApi" vmsize="Small"> <Sites> <Site name="Web"> <Bindings> <Binding name="Endpoint1" endpointName="www" /> </Bindings> </Site> </Sites> ... </WebRole
在构建服务器上,我有“Azure Authoring Tools v2.0”和“Windows Azure Libraries for .NET 2.0”.
在构建服务器上发布时是否需要定义物理路径,或者是否存在可能导致此错误的其他方案?