So, you have a brand new Windows Phone Silverlight 8.1 application and you wish to distribute it as a company app, like you were doing with “old-school” WP8 app. You think, it won’t be a great deal, just sign the XAP file with the XapSignTool, as you used to do in the past.
Then, you will get an error message like the one I got:
“XapSignTool error: illegal characters in path”
If you google this up, it seems to be a valid error that happened now and then to a few folks out there. Keep in mind that this is not the case!
Unlike, Windows Phone 8, in Windows Phone Silverlight 8.1 you cannot use the XapSignTool to sign your XAP file with your enterprise certificate. You need to follow the new process described in MSDN:
Further reading: Preparing company apps for distribution for Windows Phone
A couple of tips before trying it at home or office!
- You will need to set the execution policy for PowerShell to allow scripts signed by a trusted publisher:
- You will need to install the latest Silverlight runtime if not already installed in your dev environment, otherwise you will end up with an error like:
SignTool Error: This file format cannot be signed because it is not recognized
Further reading: Set-ExecutionPolicy
Happy signing your XAP files!