Interop cannot be embedded error using SLIK-DA in Visual Studio 2010 and newer development environments
I added the SLIK-DA Interop control to my form in Visual Studio. I am receiving 2 errors:
- Reference to class "SLIKServer" is not allowed when its assembly is linked using No-PIA mode.
- Interop type "SLIKServer" cannot be embedded. Use the applicable interface instead.
How do I get rid of these errors?
You can resolve this error by changing the Embed Interop Types property of the .dll to False. Follow the steps below to change this property.
- Click on the Interop.NDISLIKDA reference in your Solution Explorer References list.[1]
- View the Properties window and locate the Embed Interop Types property.
- Set this property to false.
[1]: If you do not see the References list in your Solution Explorer, click on the Show All Files icon at the top of the Solution Explorer Window.