Microsoft.Office.Interop.Excel.ApplicationClass can not embedded 的问题

用c#进行开发时,要做一个excel导入功能,期间使用到Microsoft.Office.Interop.Excel程序集,在用vs2008开发的时候没有报错,将这个程序集引用到vs2010的时候,便报错了:interop type 'Microsoft.Office.Interop.Excel.ApplicationClass' cannot be embedded.

解决方法:点击程序集(DDL),右键-属性,将embed interop types 更改为false.

原文地址:https://www.cnblogs.com/work-at-home-helloworld/p/3832953.html