0

I have a VB.net application that runs against the TWS api. In the Tws1_updatePortfolioEx event, I am comparing the contract against a spreadsheet of data. When I am attempting to put a break point here and step through the code, I get the message "Contracts.cs not found". Here is the line of code:

If eventArgs.contract.Symbol = positions.Cells(i, 1).value Then

The program stops at the break point when the event fires, but when I try to press F8 to step to the next line, I get the message "Contracts.cs not found". Actually this message opens up in a new tab.

This application uses a C# library. There is a file called Contracts.cs in the C# library folder, but it is not included in the project.

Do I need to include it? Another problem is that as soon as this event gets fired and this line of code gets executed, the connection with the TWS server gets dropped.

user3229570
  • 853
  • 2
  • 10
  • 23

1 Answers1

0

Did you install as a Nuget package?

Probably it is missing a reference.

Kenner Dev
  • 327
  • 1
  • 4
  • 13
  • No, how do I do this? I just checked the value of positions.Cells(i, 1).value in the Immediate window and it gave me the error "A first chance exception of type 'System.ArgumentException' occurred in Microsoft.Office.Interop.Owc11.dll" – user3229570 Apr 16 '15 at 18:24
  • Please read this https://social.msdn.microsoft.com/Forums/vstudio/en-US/25597cc5-5c49-4187-8906-6506f3a3bdac/office-web-component-and-net-45?forum=netfxsetup – Kenner Dev Apr 16 '15 at 18:28