在dll中存储类文件并在asp.net中将dll用于多个网站

发布于 2024-08-15 14:48:44 字数 98 浏览 3 评论 0原文

我想在 VS2005 中创建一个类文件,并能够在我的计算机/生产服务器上的其他网站中使用它。如何创建这个 dll 并将其存储在一个公共位置,以便我可以在开发时以及生产服务器上引用它?

I want to create a class file in VS2005 and be able to use it in other websites on my computer / production server. How do I create this dll and store it in a common place where I can reference it while developing and also on the production server ?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

給妳壹絲溫柔 2024-08-22 14:48:44

除非您拥有主机服务器的完全管理权限,否则请避免使用 GAC。

您可以做的是创建一个包含共享 DLL 源代码的项目。然后,您可以将此项目添加到每个网站解决方案中,并将网站解决方案中的引用添加到该项目中。这样做的另一个优点是使您能够在调试期间进入共享源代码。

Avoid the GAC unless you have full administration rights on the host server.

What you could do is create a project containing the source for your shared DLL. You can then add this project into each of your web site solutions, and add a reference in your site solutions to the project. This has the added advantage of enabling you to step into your shared source during debugging.

幼儿园老大 2024-08-22 14:48:44

首先将类库项目添加到您的解决方案中。将此类添加到该库中。并将此类部署到全局程序集缓存 (GAC)。您可以按照这些步骤将程序集安装到 GAC。

First add a class library project to your solution. Add this class into this library. And deploy this class to Global Assembly Cache (GAC). You can follow these steps to install your assembly to GAC.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文