0

I have completed my code and i am looking to compile and release the software. I have worked my way through all of the bugs/error messages when i changed from debug to release except for 1 that has got my head hurting!

Looking for some help to solve this as dr google has not helped.

I have searched their SDK kit and there help text with no luck

Error CS1759

Cannot embed interop types from assembly 'smartsheet-csharp-sdk, Version=2.2.1.0, Culture=neutral, PublicKeyToken=null' because it is missing either the System.Runtime.InteropServices.ImportedFromTypeLibAttribute' attribute or the System.Runtime.InteropServices.PrimaryInteropAssemblyAttribute' attribute.

Andrew Little
  • 27
  • 1
  • 7
  • I'm not sure that I totally understand what is going on here either, but, have you tried with later versions of the Smartsheet SDK? Version 2.2.1 is pretty old at this point. – timwells Jan 30 '19 at 19:45
  • i downloaded this version in November last year so not sure. – Andrew Little Jan 30 '19 at 20:23

1 Answers1

0

I had the same problem some time ago and there are two things you should do.

  1. Update smartsheet-csharp-sdk NuGet package to latest version 2.6 (in my case). Keep in mind there are three dependencies that might need to be updated too.(NLog.Config, RestSharp & Newtonsoft.Json)
  2. It seems you are combining the "Embed Interop Types" feature with use of a class type. There is a limitation with this type restricting embed feature. Update its value "Embed Interop Type" to false.

Here is the screenshot if needed

Erik
  • 1
  • 1
  • 2