Microsoft.Office.Interop.Excel.dll未包含在构建文件夹中 [英] Microsoft.Office.Interop.Excel.dll not included in Build Folder

查看:108
本文介绍了Microsoft.Office.Interop.Excel.dll未包含在构建文件夹中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



此项目引用到 Microsoft.Office.Interop.Excel.dll



当我构建项目成功,但在构建文件夹不包括Microsoft.Office.Interop.Excel.dll。



当我更改为.NET 2.0并构建它, Microsoft.Office.Interop.Excel.dll 包含!



但是我想在.NET 4.0中构建和运行我的程序。



我使用VS 2010。



显示如何修复。

解决方案

检查Copy Local是否设置为true为引用的DLL。



您首先需要将Embed Interop Types属性设置为false。然后,您可以将
复制本地属性设置为true








嵌入Interop Types属性是 删除部署PIA的依赖。


I write a Console Application with C#, .NET Framework 4.0.

This project reference to Microsoft.Office.Interop.Excel.dll.

When i build project successful, but in build folder not included Microsoft.Office.Interop.Excel.dll.

When i change to .NET 2.0 and build it, Microsoft.Office.Interop.Excel.dll is included!

But i want to build and run my program in .NET 4.0.

I use VS 2010.

Show me how to fix.

解决方案

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.



Embed Interop Types property was introduced in VS 2010 to remove the dependency of deploying PIAs.

这篇关于Microsoft.Office.Interop.Excel.dll未包含在构建文件夹中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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