Excel Interop (Visual Studio C#) - "Embed Interop Type" property

Viewed 687

After adding the interop.excel reference to my C# winform in Visual Studio, I am no longer able to "Edit and Continue"....
error says "Modifying a 'method' which contains a usage of an embedded interop type/member will prevent the debug session from continuing while Edit and Continue is enabled. To enable Edit and Continue, try setting "Embed Interop Types" property to "False" for COM references when debugging"

Unfortunately, when I set the "Embed Interop Types" property to "False", VS gives me errors for the following code:
ws.Cells[2, 1].Value = xxx;
Error says "'object' does not contain a definition for 'Value' and no extension method 'Value' accepting a first argument of type 'object' could be found (are you missing a using directive or an assembly reference?)"

Ive looked all over SO for the answer with no luck...is there someone out there who can help?

1 Answers
Related