TypeLoadException未处理的错误 [英] TypeLoadException Unhandled error

查看:93
本文介绍了TypeLoadException未处理的错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我收到未处理的TypeLoadException错误:..../CacheProcessArea无法从程序集"xxx"中加载../Cache.EscalationPath.

设置catch块时,出现以下错误:

I am getting the TypeLoadException unhandled error : ..../CacheProcessArea can not load the ../Cache.EscalationPath from assembly "xxx"

I am getting the following error while setting the catch block as follows:

 Catch(TypeLoadException ex)
{
  string err = ex.ToString();
  throw;
}



变量"err"中的错误捕获如下:



The error in ''err'' variable captures as follows:

System.TypeLoadException: Could not load type 'com.Citi.Citigroup.RACFramework.Web.UI.Common.CacheObjects.CacheEscalationPath' from assembly 'IcapsUILayer'.
   at System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMarkHandle stackMark, Boolean loadTypeFromPartialName, ObjectHandleOnStack type)
   at System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark, Boolean loadTypeFromPartialName)
   at System.RuntimeType.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark)
   at System.Type.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase)
   at com.Citi.Citigroup.RACFramework.Web.UI.Common.Utils.CreateObject(String lsType)
   at com.Citi.Citigroup.RACFramework.Web.UI.Common.CacheManager.Load(CachingObjectRow lrowCaching)
   at com.Citi.Citigroup.RACFramework.Web.UI.Common.CacheManager.Load(Int32 liCacheID)
   at com.Citi.Citigroup.RACFramework.Web.UI.Common.CacheManager.Retrieve(Int32 liCacheID)
   at com.Citi.Citigroup.RACFramework.Web.UI.Common.CacheObjects.CacheProcessArea.Retrieve() in C:\iCAPS 6.0 Dev Latest\iCAPS_6.0\IcapsUILayer\Common\CacheProcessArea.cs:line 56
   at com.Citi.Citigroup.RACFramework.Web.UI.Common.CacheObjects.CacheProcessArea.GetProcessAreaToBind(Int32 liStartRecord, Int32 liMaxRecords, String lsSortExpression, String rowfilter) in C:\iCAPS 6.0 Dev Latest\iCAPS_6.0\IcapsUILayer\Common\CacheProcessArea.cs:line 215supratde@in.ibm.com

推荐答案

请确保您引用的是正确的程序集版本. GAC中可能存在较旧的版本-如果存在,则需要将其删除.

另外,如果类似的命名程序集不是强命名的,则也会造成问题.
Make sure you are referring correct version of assembly. It might be that an older version exists in GAC - if so, you need to remove it.

Also, similar named assemblies can create issue if they are not strong named.


这篇关于TypeLoadException未处理的错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆