Поделиться через


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:
https://msdn.microsoft.com/library/default.asp?url=/library/en-us/dv_evtuv/html/etconerrormessagecannotloadresourceassembly.asp

[Author: Sandeep Prabhakar]

Disclaimers:
This posting is provided "AS IS" with no warranties, and confers no rights.
Some of the information contained within this post may be in relation to beta software. Any and all details are subject to change.

Comments

  • Anonymous
    October 31, 2006
    这是我初学.net cf下windows mobile 开发时候遇到的一个问题!当时被搞得焦头烂额,我想初学的朋友也可能会遇到这个问题,所以我把当初写的一篇日志分享给大家!

  • Anonymous
    January 26, 2007
    在做 .NET Compact Framework 开发的过程中,特别是访问 Web Service 的时候,常常会遇到这样的异常信息:“无法找到资源程序集”或

  • Anonymous
    January 26, 2007
    在做 .NET Compact Framework 开发的过程中,特别是访问 Web Service 的时候,常常会遇到这样的异常信息:“无法找到资源程序集”或

  • Anonymous
    March 26, 2007
    在做.NETCompactFramework开发的过程中,特别是访问WebService的时候,常常会遇到这样的异常信息:

  • Anonymous
    June 22, 2007
    在做 .NET Compact Framework 开发的过程中,特别是访问 Web Service 的时候,常常会遇到这样的异常信息:“无法找到资源程序集”或

  • Anonymous
    April 15, 2008
    We've seen a few users report getting the following error: "An error message cannot be displayed because an optional resource assembly containing it cannot be found".Being an alpha build, JiveTalk tries to display the technical error message

  • Anonymous
    August 19, 2008
    PingBack from http://blog.beejive.com/?p=62