zoukankan      html  css  js  c++  java
  • What is the "Could not find resource assembly" error message?

    There has been some confusion about the error message: "Could not find resource assembly". Basically, this means that there is some exception that has happened in the program. The error did not happen because it could not find the resource assembly. The resource assembly that it is searching for contains exception messages (strings) that would be helpful in debugging what went wrong with the program.

      Since the user is never expected to see this error message if the program works as expected and all exceptions are handled appropriately, it was decided (due to size constraints) that the resource assembly that has these error strings are never put on a user's device. Thus the main target audience of these error strings are developers who would like to debug issues. Hence, when you do an F5 deploy onto the device, the System.SR.dll assembly which have these error strings are copied to the device and the developer can see the error messages. But in case .Net Compact Framework is installed from a redistributable or you are using .Net Compact Framework that come with the device (as a user of the device would be doing), the System.SR.dll is not present on the device. Hence, if the application did come upon an exceptional condition that wasn't handled by the application, this "Could not find resource assembly" message would be shown to the user.

    If you are not using Visual Studio F5 deploy to the device and would still like to see the exception messages, you can achieve this by taking the System_SR_[Language].CAB  where [Language] corresponds to the language in which you want to see the error message to appear and clicking on the cab file to install it. For more information on how to do this, see the following link:
    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dv_evtuv/html/etconerrormessagecannotloadresourceassembly.asp

    PS: I made the same mistake again and again. Last time when in scanomat project, i find this problem from customer's feedback, it takes too much time to find and fix this bug. Arround one year later when in the new project, i met the same bug again, but luckly i remembered it quickly.

    Installation of the System_SR_[Language].CAB  is very easy, the link given above is invalid now, you can find the file in "C:\Program Files\Microsoft Visual Studio 8\SmartDevices\SDK\CompactFramework\2.0\v2.0\WindowsCE\Diagnostics", for any language.

  • 相关阅读:
    2014百度之星资格赛1001
    ZOJ1913 Euclid's Game (第一道简单的博弈题)
    博弈论(转)
    字典序全排列
    windows下用虚拟机安装ubuntu
    Windows多线程多任务设计初步(转)
    为什么我如此热爱这样一个比赛(转自vici)
    BFS/DFS算法介绍与实现(转)
    美丽的茧
    求N个数的最大公约数和最小公倍数(转)
  • 原文地址:https://www.cnblogs.com/swnuwangyun/p/867064.html
Copyright © 2011-2022 走看看