Skip to content

Instantly share code, notes, and snippets.

@yzorg
Created August 7, 2015 13:02
Show Gist options
  • Save yzorg/fe47c795a7fc89e8d4ad to your computer and use it in GitHub Desktop.
Save yzorg/fe47c795a7fc89e8d4ad to your computer and use it in GitHub Desktop.
# path to cspack
$cspackPath = Join-Path $env:ProgramFiles 'Microsoft SDKs\Azure\.NET SDK\v2.7\bin\cspack.exe'
$PackagePath = 'c:\mycloudpackage.cspkg'
$serviceDefinitionFile = 'c:\myProject\ServiceDefinition.csdef'
$webRoleName = 'MyWebRole'
$webRolePath = 'c:\myProject'
$webRoleEntryPoint = 'MyWebRole.dll'
# define the cspack parameters
$cspackParameter = @(
"/out:$PackagePath",
$serviceDefinitionFile,
"/role:$webRoleName;$webRolePath;$webRoleEntryPoint",
"/sites:$webRoleName;Web;$webRolePath"
)
# execute cspack
& $cspackExe @cspackParameter
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment