Visual Studio 2010发布Web功能不包括所有DLL

编程入门 行业动态 更新时间:2024-10-21 06:01:32
本文介绍了Visual Studio 2010发布Web功能不包括所有DLL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 我有一个ASP.NET MVC 2应用程序。

  • Web项目包含对SomeProject的引用
  • SomeProject包含对ExternalAssembly1和ExternalAssembly2的引用。
  • SomeProject显式调用到ExternalAssembly1中,但不显示外部调用ExternalAssembly2。
  • ExternalAssembly1调用到ExternalAssembly2

当我执行本地构建时,一切都很酷。所有DLL都包含在bin\debug文件夹中。问题是,当我在Visual Studio 2010中使用Publish Web命令时,它将部署除ExternalAssembly2之外的所有内容。

它似乎忽略了不直接使用的程序集(记住,ExternalAssembly2仅由ExternalAssembly1使用)

有没有办法让Visual Studio 2010包含ExternalAssembly2?

我可以写一个调用ExternalAssembly2的虚拟方法。这样做是有效的,但是我真的不想让虚拟代码的唯一目的是使VS2010发布DLL。

解决方案

这些答案在我脑海中都没有了。这似乎是一个真正的错误。如果我找到一个非黑客解决方案,或者Microsoft修复了这个错误,我将更新此回复。

更新:

似乎没有希望。 https:/ /connect.microsoft/VisualStudio/feedback/details/731303/publish-web-feature-not-including-all-dlls

I have an ASP.NET MVC 2 application.

  • Web project contains a reference to SomeProject
  • SomeProject contains references to ExternalAssembly1 and ExternalAssembly2.
  • SomeProject explicitly calls into ExternalAssembly1, but NOT ExternalAssembly2.
  • ExternalAssembly1 calls into 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.

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

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

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.

解决方案

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.

Update:

Doesn't seem promising. connect.microsoft/VisualStudio/feedback/details/731303/publish-web-feature-not-including-all-dlls

更多推荐

Visual Studio 2010发布Web功能不包括所有DLL

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

发布评论

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

>www.elefans.com

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