我尝试了很多不同的方法,请帮助。
我的目录结构如下:
trunk/Portal/MYAPPLICATION.Cloud (cloud project)
trunk/Portal/Portal/MYAPPLICATION.Portal (web app)
我的服务定义:
<?xml version="1.0" encoding="utf-8"?>
<ServiceDefinition name="MYAPPLICATION.Cloud" xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition" schemaVersion="2012-05.1.7">
<WebRole name="MYAPPLICATION.Portal" enableNativeCodeExecution="true">
<ConfigurationSettings>
<Setting name="DiagnosticsConnectionString" />
<Setting name="DataConnectionString" />
<Setting name="BaseUrl" />
<Setting name="DatabaseConnectionString" />
<Setting name="Environment" />
</ConfigurationSettings>
<Bindings>
<Binding name="HttpIn" endpointName="HttpIn" />
</Bindings>
</Site>
</Sites>
<Endpoints>
<InputEndpoint name="HttpIn" protocol="http" port="80" />
</Endpoints>
<Imports>
<Import moduleName="RemoteAccess" />
<Import moduleName="RemoteForwarder" />
</Imports>
</WebRole>
</ServiceDefinition>
我从代码中调用cspack作为构建服务器上构建过程的一部分。
csPackProcess.StartInfo = new ProcessStartInfo
{
FileName = @"C:\Program Files\Microsoft SDKs\Windows Azure\.NET SDK\2012-06\bin\cspack.exe",
Arguments = sb.ToString()
};
具体来说,我的论点应该是什么?
答案 0 :(得分:2)
您应该在 trunk / Portal 文件夹中运行以下命令:
cspack MYAPPLICATION.Cloud\ServiceDefinition.csdef /out:MYAPPLICATION.cspkg /role:MYAPPLICATION.Portal;Portal\MYAPPLICATION.Portal /sites:MYAPPLICATION.Portal;Web;C:\trunk\Portal\Portal\MYAPPLICATION.Portal
更多信息:http://msdn.microsoft.com/en-us/library/windowsazure/gg432988.aspx