1
votes

When I upload a .appxbundle of my UWP app to HockeyApp, everything works fine. When I instead upload a .appxupload file, I get a Serialization error when I run my app, and try to serialize classes with the [DataContract] attribute.

The Exception I get is the following (on some machines, not all):

Value cannot be null.
Parameter name: format
   at System.String.FormatHelper(IFormatProvider provider, String format, ParamsArray args)
   at System.SR.Format(String resourceFormat, Object p1)
   at System.Runtime.Serialization.DataContract.GetDataContractFromGeneratedAssembly(Type type)
   at System.Runtime.Serialization.DataContract.DataContractCriticalHelper.CreateDataContract(Int32 id, RuntimeTypeHandle typeHandle, Type type)
   at System.Runtime.Serialization.DataContract.DataContractCriticalHelper.GetDataContractSkipValidation(Int32 id, RuntimeTypeHandle typeHandle, Type type)
   at System.Runtime.Serialization.DataContract.GetDataContract(RuntimeTypeHandle typeHandle, Type type, SerializationMode mode)
   at System.Runtime.Serialization.DataContractSerializer.get_RootContract()
   at System.Runtime.Serialization.DataContractSerializer.InternalWriteObject(XmlWriterDelegator writer, Object graph, DataContractResolver dataContractResolver)
   at System.Runtime.Serialization.XmlObjectSerializer.WriteObjectHandleExceptions(XmlWriterDelegator writer, Object graph, DataContractResolver dataContractResolver)
   at System.Runtime.Serialization.XmlObjectSerializer.WriteObject(XmlDictionaryWriter writer, Object graph)
   at System.Runtime.Serialization.XmlObjectSerializer.WriteObject(Stream stream, Object graph)
   at VungleSDK.DbTable_1`1.Serialize(T obj)

If I upload the .appxupload file to the Windows Store, I see no problems.

My question is, why is the happening? Is HockeyApp somehow modifying the .appx packages for .appxupload, but not for .appxbundle? Is something else going on?

2
Is there a reason you can't use the bundle in these scenarios?MattWhilden
There isn't any reason I can't use .appxbundle. The problem is, how would someone know when they should use the .appxbundle, and when they should use .appxupload? If HockeyApp doesn't do the correct thing with .appxupload files, one would think their UI wouldn't let upload them.Greg Thatcher
Totally fair and I think it would be helpful to provide a check and decent error message for .appxupload files! :-)MattWhilden

2 Answers

1
votes

Answering my own question:

Although HockeyApp will let you upload .appxupload files (like you can for the Windows Store), you should not. Instead, always upload the .appxbundle file.

I contacted [email protected], and quickly received the following response (thanks very much, HockeyApp support):

Hi Greg, thanks for getting in touch!

As the document How to sideload UWP applications indicates here it seems we only support .appxbundle file, so please upload the .appxbundle file instead of the .appxupload.

0
votes

AppxUpload packages are meant only for the Store ingestion pipeline and I wouldn't expect them to work properly. I don't have the full rundown but they're the set of artifacts we need to properly do security patching of your application and aren't meant to be a container for execution.