最近,我决定尝试 Multilingual App Toolkit为了在我现有的 WP8 应用程序中添加本地化支持。
我按照说明进行操作,它为我选择的语言生成了 AppResources 文件,并且可以进行测试了。不幸的是,每次我将应用程序部署到我的设备(也尝试使用模拟器)时,它都会立即崩溃,没有任何异常、消息或任何其他类型的信息。我尝试清理项目,删除 bin 和 obj 文件夹,禁用我之前添加的语言和多语言应用程序工具包,但没有成功。
我只使用 AppResources 文件创建了一个新项目,它运行良好。但是,我不认为问题出在我的代码中,因为它在崩溃之前甚至没有到达 App.xaml.cs
文件中的 App()
方法.
谁知道这是怎么回事?
编辑:
Resources 文件夹有大小限制吗?
编辑 2:
我将调试器附加到 Visual Studio 进程,当我在手机上运行该项目时,抛出了以下异常:
The thread 0x3d34 has exited with code 259 (0x103).
A first chance exception of type 'System.NotSupportedException' occurred in PresentationCore.dll
A first chance exception of type 'System.NotSupportedException' occurred in PresentationCore.dll
EnC: Enter Debug Mode: project 'ProjectName'
A first chance exception of type 'System.OutOfMemoryException' occurred in JetBrains.Platform.ReSharper.VisualStudio.Core.dll
The thread 0x1900 has exited with code 259 (0x103).
A first chance exception of type 'Microsoft.Build.Exceptions.InvalidProjectFileException' occurred in Microsoft.Build.dll
A first chance exception of type 'Microsoft.Build.Exceptions.InvalidProjectFileException' occurred in mscorlib.dll
The thread 0x27d0 has exited with code 259 (0x103).
感谢
最佳答案
我要检查的前四件事是 AppResources.resx 访问修饰符是否是公共(public)的
设计者没有造成错误。
该文件夹名为 Resources。
在工具菜单中启用了多语言应用程序工具包。
我从未在资源文件夹中遇到过大小问题。我建议从一种语言开始,然后在它完全可用后添加到列表中。
关于c# - 本地化后 WP8 应用程序崩溃,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25939130/