Visual Studio 2010的发布网站功能不包括所有dll

编程入门 行业动态 更新时间:2024-10-21 18:44:38
本文介绍了Visual Studio 2010的发布网站功能不包括所有dll的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我有一个ASP.NET MVC 2应用程序。

I have an ASP.NET MVC 2 application.

  • Web项目包含对SomeProject参考
  • SomeProject包含ExternalAssembly1和ExternalAssembly2引用。
  • SomeProject明确要求到ExternalAssembly1,但不是ExternalAssembly2。
  • ExternalAssembly1调用到ExternalAssembly2

当我执行本地构建一切都很酷。所有的DLL都包含在bin \\ debug文件夹。问题是,当我使用Visual Studio 2010中发布网站命令,它部署一切,除了ExternalAssembly2。

When I perform a local build everything is cool. All DLLs are included in the bin\debug folder. The problem is that when I use the Publish Web command in Visual Studio 2010, it deploys everything except ExternalAssembly2.

这似乎忽略不直接使用的组件(记住,ExternalAssembly2仅由ExternalAssembly1)。

It appears to ignore assemblies that aren't directly used (remember, ExternalAssembly2 is only used by ExternalAssembly1).

有什么办法,我可以告诉Visual Studio 2010中包括ExternalAssembly2?

Is there any way I can tell Visual Studio 2010 to include ExternalAssembly2?

我可以写一个调用ExternalAssembly2一个虚拟的方法。这样做的工作,但我真的不希望有假code为VS2010造成发布的DLL的唯一目的。

I can write a dummy method that calls into ExternalAssembly2. This does work, but I really don't want to have dummy code for the sole purpose of causing VS2010 to publish the DLL.

推荐答案

以上答案都不是足够的在我的脑海。这似乎是一个真正的错误。我会更新这个反应,如果我曾经发现一个非黑客攻击的解决方案,或Microsoft修复了这个bug。

None of these answers are sufficient in my mind. This does seem to be a genuine bug. I will update this response if I ever find a non-hack solution, or Microsoft fixes the bug.

更新:

似乎并不乐观。connect.microsoft/VisualStudio/feedback/details/731303/publish-web-feature-not-including-all-dlls

更多推荐

Visual Studio 2010的发布网站功能不包括所有dll

本文发布于:2023-11-13 14:36:27,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1584592.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:不包括   功能   网站   Studio   Visual

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!