无法从程序集加载类型 [英] Could not load type from assembly

查看:133
本文介绍了无法从程序集加载类型的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

例外:



无法从程序集'Service.WorkFlowForm.Contract,Version = 1.0.0.0加载'Service.WorkFlowForm.Contract.RequestDto'类型, Culture = neutral,PublicKeyToken = null'。



我被引用了Service.WorkFlowForm.Contract.dll,类RequestDto是新添加的,我可以加载

Service.WorkFlowForm.Contract.dll中的其他类但是RequestDto,这有什么问题?任何帮助?

谢谢!

The Exception:

Could not load type 'Service.WorkFlowForm.Contract.RequestDto' from assembly 'Service.WorkFlowForm.Contract, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.

I was referenced the Service.WorkFlowForm.Contract.dll, the class RequestDto was new add,i can load
other class in Service.WorkFlowForm.Contract.dll but RequestDto, what's wrong with that?any help?
thanks!

推荐答案

1.此错误表示您的Service.WorkFlowForm.Contract.dll不包含RequestDto类,或者您尝试访问的类是私有的。



2.如果您的类是新增加的DLL,可能您的DLL指的是错误的版本,您必须清理解决方案并重建所有。
1.This error signals that your Service.WorkFlowForm.Contract.dll do not contains the RequestDto class, or the class that you are trying to access is private.

2.If your class was new added in your DLL, maybe your are referring a wrong version of the DLL and you have to clean your solution and rebuild all.


当您添加一个dll的新类,服务器和客户端都使用该类,你必须部署新的d ll服务器和客户端(注意:当你做这样的改变时你应该改变版本号!)。
When you add a new class to the dll, and that class is used by both the server and the client, you have to deploy the new dll on both the server and the client (note: you ought to change the version number when you do such a change!).


这篇关于无法从程序集加载类型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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