当我发布 ASP.NET Web 应用程序时,复制 Local = false 被忽略

发布于 2024-08-17 10:18:36 字数 161 浏览 4 评论 0原文

我有一个 ASP.NET Web 应用程序,其中设置了多个引用。我已将其中几个的 Copy Local 设置为 False,但是当我发布应用程序时,它仍然会复制 .dll。我怎样才能永久关闭它?这些 dll 已在 Web 服务器上的 GAC 中注册,我想确保这些是引用而不是本地副本。

谢谢!

I have an ASP.NET Web Application that has several references set. I have Copy Local set to False for several of them, but when I Publish my application it copies the .dlls anyway. How can I turn that off for good? The dlls are registered in the GAC on the web server and I want to make sure that those are references instead of local copies.

Thanks!

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

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

发布评论

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

评论(3

秋凉 2024-08-24 10:18:36

您是否在本地开发人员计算机上的 GAC 中注册了程序集?如果没有,请在 GAC 中注册它们,当您在那里构建解决方案时,它应该遵循您的副本本地设置。

Do you have the assemblies registered in the GAC on your local developer machine? If not, register them in the GAC there and it should honor your copy local settings when you build the solution there.

无敌元气妹 2024-08-24 10:18:36

我可能是错的,但我不记得有一个发布选项来阻止引用的程序集的本地副本。您可能必须手动删除它们或编写一些脚本或批处理文件以使其自动化。

也许这篇文章可以提供帮助:http://www.beansoftware。 com/ASP.NET-Tutorials/Deploy-ASP.NET.aspx

I might be wrong but I don't recall a publish option to prevent local copy of the referenced assemblies. You might have to remove them manually or write some script or batch files to automate it.

Maybe this article can help: http://www.beansoftware.com/ASP.NET-Tutorials/Deploy-ASP.NET.aspx

空气里的味道 2024-08-24 10:18:36

您可以为此使用 Web 部署项目。您可以配置在构建过程后删除特定文件。

对于 Web 部署项目,您至少需要 VS 2008 SP1。

You could use a Web Deployment Project for this. You can configure that specific files will be deleted after the Build process.

For a Web Deployment Project you need at least VS 2008 SP1.

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