问题:
I am creating a web application on the .NET 4.0 framework (beta2) in C#. 我正在用C#在.NET 4.0框架(beta2)上创建一个Web应用程序。
When I try to use a assembly called "ActiveHomeScriptLib", I get the following error: 当我尝试使用名为“ ActiveHomeScriptLib”的程序集时,出现以下错误:
Interop type 'ActiveHomeScriptLib.ActiveHomeClass' cannot be embedded. 无法嵌入互操作类型“ ActiveHomeScriptLib.ActiveHomeClass”。 Use the applicable interface instead. 请改用适用的界面。
When I change the framework to version 3.5, I don't have any errors. 当我将框架更改为版本3.5时,我没有任何错误。
What is an Interop Type and why does this only occur when I use the 4.0 framework? 什么是互操作类型?为什么仅在使用4.0框架时才会发生这种情况?
解决方案:
参考一: https://stackoom.com/question/AQ71/互操作类型无法嵌入参考二: https://oldbug.net/q/AQ71/Interop-type-cannot-be-embedded
来源:oschina
链接:https://my.oschina.net/u/4432649/blog/4355108