简体   繁体   English

如何从 ASP.NET web 站点引用外部程序集

[英]How to reference external assemblies from an ASP.NET web site

I need to reference external assemblies from a dozen asp.net web sites.我需要从十几个 asp.net web 站点引用外部程序集。 These assemblies won't be in the GAC, but will be located in a location relative to the web site ("..\..\dlls\release").这些程序集不会在 GAC 中,但将位于相对于 web 站点(“..\..\dlls\release”)的位置。

From what I understand, Visual studio doesn't have an explicit assembly reference, or way to link a web site to an external.csproj or.dll library.据我了解,Visual Studio 没有明确的程序集引用,也没有将 web 站点链接到 external.csproj 或.dll 库的方法。 (Unlike a web project). (与 web 项目不同)。

These sites are sample projects for the open-source image-resizing HttpModule http://imageresizingin.net/ .这些站点是开源图像大小调整 HttpModule http://imageresizingin.net/的示例项目。

I don't want to make users run a.bat file to copy the dlls into each /bin folder.我不想让用户运行一个 .bat 文件来将 dll 复制到每个 /bin 文件夹中。

Is there some secret hints file I can use to let visual studio know where to look?是否有一些秘密提示文件可以让 Visual Studio 知道在哪里查看?

I'm working on dynamic assembly resolution, but that won't help visual studio at all, just hosted versions of the site.我正在研究动态程序集解决方案,但这根本对视觉工作室没有帮助,只是托管了网站的版本。

Add the assemblies' full names to the <compilation> element of Web.config, and put them in the GAC on your dev machine.将程序集的全名添加到 Web.config 的<compilation>元素中,并将它们放入开发机器上的 GAC 中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM