Last post Aug 27, 2019 07:51 AM by Lucifer_deep
Aug 23, 2019 01:57 PM|Lucifer_deep|LINK
I am trying to migrate a project to Framework 4.7.2, When I update my packages using nuget package manager, I get the build errors:
Interop type WindowKinds cannot be embedded. use the applicable interface instead.
Interop type constants cannot be embedded. Use the applicable interface instead.
The lines of code which returns the error is:
My idea is to build the solution without any errors and the solution will be updated to Framework 4.7.2. I would appreciate an optimal solution to migrate a solution as well if there is any. Please let me know.
Aug 26, 2019 03:57 AM|Yang Shen|LINK
To solve this problem, you need to right click on related reference, in the properties tab, check the "Embed Interop Types" as false.
For more information, please refer to Interop type cannot be embedded.
Aug 27, 2019 07:51 AM|Lucifer_deep|LINK
Hi Yang Shen,
Will it not affect the execution of our project in machines which do not have the SDK installed in their machines. Changing Embed Interop types solved my problem but just wanted a clarification sothat future deployments will be smooth.