Cannot Embed Interop Types from Assembly

The actual problem is that a reference in your solution is set to embed Interop Types to the target assembly! just check the properties of your references and set to all of them that flag to false.


Just so this isn't unmarked for the rest of eternity and for any potential future users with the same problem, the answer is, as suggested by @soohoonigan and @TnTinMn:

  • Clean and rebuild the solution.
  • If that doesn't work, remove the references, and re-add them again.

Seeing only errors 1 and 2, guided by the answers here and some further research, what solved the issue for me was:

References -> Microsoft.CSharp -> Properties - change 'Embed Interop Types' to 'False' and then rebuild.