ASP.net Bin目录 - dll加载 [英] ASP.net Bin directory - dll loading

查看:101
本文介绍了ASP.net Bin目录 - dll加载的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要在我的asp.net应用程序中使用dll。如何从bin目录加载dll?



也许我应该提到应用程序是asp代码和asp.net代码的混合。
所以,当我在我的机器上开发它,我将一个dll放在bin目录中,但是当我将代码移动到现场环境后,我不想为每个使用的程序都有一个单独的bin目录asp.net。



我正在移动的是.aspx和.aspx.cs文件。有没有办法加载dll NOT FROM / bin(用using语句指定)?看起来它会自动查看/ bin ....

解决方案

.net应用程序查看项目的/ bin,和GAC(全局程序集缓存),您将系统共享的DLL-s。



如果您的应用程序是一个.net应用程序(在IIS中配置为一个应用程序),但您有子文件夹中的aspx文件,他们应该看到根/ bin文件夹。我会坚持保持dll在/ bin,如果这不是十分之几的垃圾箱(这意味着你的应用程序组织有问题)。


I need to use a dll in my asp.net application. How do I load a dll not from a bin directory?

Perhaps I should mention that the application is a mixture of asp code and asp.net code. so, when I develop it on my machine, I place a dll in the bin directory, but after I move the code to the live environment, I don't want to have a separate bin directory for every piece that's using asp.net.

All I am moving is .aspx and .aspx.cs files. Is there a way to load a dll NOT FROM /bin (specify it with "using" statement)? Looks like it automatically looks in the /bin....

解决方案

.net app looks in the /bin of the project, and the GAC (Global Assembly Cache) where you put system shared DLL-s.

If your app is one .net app (configured in IIS as one app), but you have aspx files in subfolders, they should see the root /bin folder. i'd stick with keeping dlls in /bin, if that isn't several tenths of bins (which would mean that you have a problem with your app organization).

这篇关于ASP.net Bin目录 - dll加载的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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