CSPack encodes directory name with space to %20

331 views Asked by At

I've recently setup a new build configuration in Teamcity to create an Cloud Services package for Azure. After building the project with msbuild, i'm calling cspack.exe (Azure SDK 2.2) to create the package.

This is the command i'm using:

cspack.exe "ServiceDefinition.csdef" 
"/out:%Package.RelativePath%package.cspkg" 
"/role:MyWebRole;%teamcity.build.checkoutDir%\t\%build.number%;bin\MyProject.Web.dll" 
"/sites:MyWebRole;MyWebSite;%teamcity.build.checkoutDir%\t\%build.number%"

This creates a cspkg which seems correct. I've uploaded this package to the Azure storage and executed an update of the webrole. But after a while it shows an error while executing that startup tasks. After that comes an loop of restarting the webrole.

While searching for a possible cause, i've noticed that one of the directories in my approot contains a space in my original project, but in the package encoded to %20. After changing the directory name to the original name and updating the webrole again the issues disappeared.

Is anyone familiar with this issue and can point me in the right direction of solving this?

1

There are 1 answers

2
astaykov On BEST ANSWER

The %20 only goes into the package, but not when deployed. Did you RDP to the Cloud Service Role to check whether the folder name is with the %20 or not? Because it seems, the %20 is only added to the package, but removed when unzipped. So your issue with restarting might be something else.

And by the way, the same applies for all non-URI characters, including Unicode characters that should go into the package. Which is imposed by the Open Packaging Conventions.