appxupload和appxbundle之间的编译区别? [UWP]

人气:100 发布:2022-09-22 其他开发语言 wpdevelop

问题描述

我正在使用MVVMLight处理UWP中的项目。目前,应用程序在visual studio中本地运行,并且当生成的appxbundle被侧面加载到计算机上时也会运行。当我将应用程序加载到商店时,应用程序崩溃了。我们能够找到几个错误,但它们似乎都是我们使用的一些第三方库的内部。就像NLog在代码中实例化配置时无法找到日志消息的布局渲染器,然后Newtsonsoft.Json 为反序列化抛出默认设置/上下文的字段未找到异常。

Im currently working on a project in UWP with MVVMLight. Currently the application runs locally from visual studio and also runs when the appxbundle generated is side loaded onto a machine. When I load the application to the store the app crashes. Weve been able to find at couple errors but they all seem to be internal to some of the 3rd party libraries that we use. Like NLog not being able to find the layout renderer for the log messages when instantiating the configuration in code and then Newtsonsoft.Json throwing a Field not found exception for default settings/context for deserialization.

我已经尝试为试图反序列化的类和Newtonsoft本身添加运行时指令,并尝试在之前的日期添加Nlog运行时指令。

Ive tried adding runtime directives for both the class thats trying to be deserialized and Newtonsoft itself along with trying to add Nlog runtime directives at a previous date.

所以我想知道如果appxupload的编译存在一些差异,那么在发布到商店的软件包与它同时创建的软件包之间会导致这个问题,或者如果它更可能是我们的代码中存在某些内容造成了这个问题。这让我很困惑,因为我的印象是appxupload和appxbundle的编译都是一样的。

So Im wondering if there is some difference in compilation for the appxupload when making packages to post to the store vs the bundle it creates at the same time for sideloading that causes this issue or if its more likely that there is something in our code that is causing the issue. It confuses me because I was under the impression that the compilation of both the appxupload and appxbundle were the same.

先谢谢了,

Daniel

推荐答案

是的,appxupload和appxbundle存在一些差异。 .appxupload文件是作为Visual Studio打包过程的一部分创建的,包含另外两个文件:.appx和.appxsym。 .appxsym文件是一个压缩的.pdb文件,其中包含用于Windows开发人员中心崩溃分析的应用程序的公共符号。当您上传它时,它将由商店再次编译。因此,您无法使用appupload文件直接安装应用程序。

Yep theappxupload and appxbundle have some differences. The .appxupload file is created as part of the Visual Studio packaging process and contains two other files: .appx and .appxsym. The .appxsym file is a compressed .pdb file containing public symbols of your app used for crash analytics in the Windows Dev Center. It will be compiled again by the store when you upload it. So you could not directly install the app use the appupload file.

appxbundle文件是一种包可以包含多个应用程序包的程序包,每个应用程序包都是为支持特定设备而构建的建筑。它由Visual Studio编译,您可以通过它直接安装应用程序。

The appxbundlefile is a type of package that can contain multiple app packages each of which is built to support a specific device architecture. It is compiled by the Visual Studio and you could directly install the app via it.

您可以在此处获得有关它们的更多信息:应用程序包类型

You could get more information about them here:Types of app packages

祝你好运,

Roy

750