为什么Visual Studio 2015将stdole.dll和Microsoft.AnalysisServices.AdomdClient.dll添加到我的项目? [英] Why is Visual Studio 2015 adding stdole.dll and Microsoft.AnalysisServices.AdomdClient.dll to my project?

查看:699
本文介绍了为什么Visual Studio 2015将stdole.dll和Microsoft.AnalysisServices.AdomdClient.dll添加到我的项目?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这些DLL未在Visual Studio的先前版本中添加到我的项目中。我的猜测是,我的一个引用对这些DLL有依赖。从我看过的,突出显示的 Microsoft.Office.Interop.Excel 可能是一个。有人可以确认吗我还应该注意,VS 2015总是发布这些DLL,即使我把它从项目中排除。如果我删除它们,VS 2015将重新制作。



编辑:我已经确认Excel和Office引用是导致包含stdole.dll。请参阅下面的选择以删除stdole.dll。



我已经删除了自定义引用。让我知道如果需要更多的信息。以下是我目前的参考资料:





解决方案

如果您有选项,请使用Embed Interop Types并将stdole.dll从其中删除所有这些都会在每次移动stdole.dll未签名的应用程序(新服务器或dev机器)时遇到问题。



问题:有一个引用,要求stdole.dll和stdole.dll现在被自动推送到bin文件夹。



解决方案: / strong>




  • 找到需要stdole.dll的参考资料(更多关于如何做到这一点)

  • 转到它的属性(右cli ck->属性)

  • 将嵌入互操作类型从false更改为true。



如何查找引用:当您单击引用的属性时,请检查嵌入互操作类型是否设置为false。要进一步挖掘,尼克的回答有一些很棒的信息。



参考我已经确认使用stdole.dll (可能还有更多的办公程序)





  • Excel



  • Crystal Reports(感谢Lithium。正如Nick指出的那样,您可能没有设置 Embed Interop Types = true )的优势。 p>




如果您找到更多内容,请将它们添加到此列表中,或者在评论中注明,我会这样做。 p>

汉斯Passant 强烈阻止设置嵌入Interop Types = false 这里:有什么区别设置Embed Interop T在Visual Studio中,ypes是true和false吗?



Scott Hanselman还谈到了嵌入式互操作类型在这里: http://www.hanselman.com/blog/CLRAndDLRAndBCLOhMyWhirlwindTourAroundNET4AndVisualStudio2010Beta1.aspx


These DLLs are not added to my project in prior versions of Visual Studio. My guess is that one of my references has a dependency to these DLLs. From what I've read, the highlighted Microsoft.Office.Interop.Excel might be the one. Can anyone confirm this? I should also note that VS 2015 always publishes these DLLs as well even if I exclude them from the the project. If I delete them, VS 2015 will remake them.

Edit: I have confirmed that the Excel and Office references are what's causing the inclusion of stdole.dll. See selected answer below to remove stdole.dll.

I've crossed out the custom references. Let me know if more information is needed. Here's my current references:

解决方案

If you have the option, use Embed Interop Types and leave stdole.dll out of it all together or you will run into the problem every time you move the application (new servers or dev machines) where stdole.dll isn't signed.

Problem: There is a reference that is requiring stdole.dll and stdole.dll is now being automatically pushed to the bin folder.

Solution:

  • Find the reference requiring stdole.dll (more on how to do this below)
  • Go to it's properties (Right click->properties)
  • Change "Embed Interop Types" from false to true.

How to find the reference: When you click on the properties of your references, check to see if "Embed Interop Types" is set to false. To dig even further, Nick's answer has some great info.

References I've confirmed so far that use stdole.dll (probably more office programs as well)

  • Office

  • Excel

  • Core

  • Crystal Reports (Thanks Lithium. As Nick points out, you may not have the advantage of setting Embed Interop Types=true)

If you find more, add them to this list or note them in the comments and I'll do it.

Hans Passant strongly discourages setting Embed Interop Types=false here: What's the difference setting Embed Interop Types true and false in Visual Studio?

Scott Hanselman also talks about what the "Embed Interop Types" does here: http://www.hanselman.com/blog/CLRAndDLRAndBCLOhMyWhirlwindTourAroundNET4AndVisualStudio2010Beta1.aspx

这篇关于为什么Visual Studio 2015将stdole.dll和Microsoft.AnalysisServices.AdomdClient.dll添加到我的项目?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆