已发布网站中未找到的类型 [英] Types not found in published website

查看:65
本文介绍了已发布网站中未找到的类型的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我编写了一个类库,我在ASP.NET网站上使用了这个DLL(MyLibrary.dll)。在我的机器上,这很好用。但是,当我使用Visual Studio的功能将我的网站发布到FTP位置时,网站无法正确加载。我收到错误无法从程序集'MyWebsite.dll'加载类型'MyNamespace.MyClass'。问题是,这个错误的方式是正确的,因为在我的ASP.NET网站引用的类库中找到了MyNamespace.MyClass。



我的问题是的,为什么网站没有提到我的DLL?我在这里做错了什么或我错过了什么?到目前为止,我确保MyWebsite.dll和MyLibrary.dll都在\bin文件夹中找到。

I have written a class library and I'm using this DLL (MyLibrary.dll) in my ASP.NET website. Locally on my machine, this works fine. However, when I publish my website to an FTP location using the functionality from Visual Studio, the website is not loading properly. I'm getting the error "Could not load type 'MyNamespace.MyClass' from assembly 'MyWebsite.dll". The problem is that, this error is in a way correct because MyNamespace.MyClass is found in the class library that is referenced from my ASP.NET website.

My question is, why is the website not referring to my DLL? What am I doing wrong here or what am I missing? So far, I made sure that, both MyWebsite.dll and MyLibrary.dll are both found in the \bin folder.

推荐答案

如果您尝试使用如下

使用projectname.folder.classname

然后我认为问题将会解决。
If you try it with like following
using projectname.folder.classname
then I think problem will be solved.


这篇关于已发布网站中未找到的类型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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