Microsoft.Office.Interop.Excel.dll不包括在生成文件夹 [英] Microsoft.Office.Interop.Excel.dll not included in Build Folder
问题描述
我写的用C#控制台应用程序,.NET框架4.0。
I write a Console Application with C#, .NET Framework 4.0.
本项目参照 Microsoft.Office.Interop.Excel.dll
。
当我建立的项目成功了,但在build文件夹不包括Microsoft.Office.Interop.Excel.dll。
When i build project successful, but in build folder not included Microsoft.Office.Interop.Excel.dll.
当我改变到.NET 2.0和构建它,包括 Microsoft.Office.Interop.Excel.dll
!
When i change to .NET 2.0 and build it, Microsoft.Office.Interop.Excel.dll
is included!
但我想构建和运行我的.NET 4.0程序。
But i want to build and run my program in .NET 4.0.
我使用VS 2010。
I use VS 2010.
让我看看如何解决。
推荐答案
检查复制本地设置为true所引用的DLL。
搜索结果
。您首先需要将嵌入互操作类型属性设置为false。然后你可以设置
复制本地属性设置为true。
搜索结果
Check if the Copy Local is set to true for the referenced DLL.
You will first need to set "Embed Interop Types" property to false. Then you can set the
Copy Local" property to true.
搜索结果
嵌入互操作类型属性是的在VS 2010 介绍,除去部署PIA的的依赖。
Embed Interop Types property was introduced in VS 2010 to remove the dependency of deploying PIAs.
这篇关于Microsoft.Office.Interop.Excel.dll不包括在生成文件夹的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!