答案 0 :(得分:0)
转到.csproj文件。编辑它并将值更改为False
<EmbedInteropTypes>False</EmbedInteropTypes>
.csproj文件的例子:
<ItemGroup>
....
<Reference Include="Microsoft.mshtml, Version=7.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<EmbedInteropTypes>True</EmbedInteropTypes>
</Reference>
....
</ItemGroup>