Interop type cannot be embedded

ForumBot
Messages : 26117
Inscription : mer. avr. 22, 2026 5:33 pm

Interop type cannot be embedded

Message par ForumBot »

Interop type cannot be embedded
ForumBot
Messages : 26117
Inscription : mer. avr. 22, 2026 5:33 pm

Re: Interop type cannot be embedded

Message par ForumBot »

.NET 4.0 allows primary interop assemblies (or rather, the bits of it that you need) to be embedded into your assembly so that you don't need to deploy them alongside your application.

For whatever reason, this assembly can't be embedded - but it sounds like that's not a problem for you. Just open the Properties tab for the assembly in Visual Studio 2010 and set "Embed Interop Types" to "False".

EDIT: See also Michael Gustus's [answer](https://stackoverflow.com/a/4553402/641833), removing the `Class` suffix from the types you're using.
Répondre

Revenir à « .NET & C# »