How to embed a DLL into a winForms project

Asked

Viewed 122 times

1

I need to incorporate a reference to a winforms project.

I clicked on References, selected the reference and clicked on properties, then changed the property Embed Interop Types to true.

When compiling the Solution gives the following error:

Severity Code Description Project File Line Suppression State Error CS1759 Cannot embed Interop types from Assembly 'Berechit.Data, Version=1.0.0.0, Culture=neutral, Publickeytoken=null' because it is Missing either the 'System.Runtime.Interopservices.Importadfromtypelibattribute' attribute or the 'System.Runtime.Interopservices.Primaryinteropassemblyattribute' attribute. Appteste C: project Appteste CSC 1 Active

  • Was this DLL developed by you? Or is it third-party?

  • this DLL is another project that I’m doing, but would like to incorporate several DLL’s, among them DLL developed by me and third-party. The main objective is that the final product does not have the apparent DLL used for the end user.

  • What is the intention to mark EmbedInteropTypes as true?

  • Actually I thought that Embedinteroptypes as true was the way to embed the DLL.

1 answer

0

To incoperate a dll you have and go to the window Ferences and right-click then click add

Browser other questions tagged

You are not signed in. Login or sign up in order to post.