Can't download code

I just got my Opta and trying to work on a project.

I have plugged the Opta into my computer with USB, did the initial connection and activated the product.
I was able to find the dhcp that the device was using and connected to it on the ModbusTCP (on-line-> Setup communications.
it then shows that I am connected.
I then uncommented the code in sketch to assign a static ip address. When I try to compile and download the code, I get:
"Can not download sketch: COM port must be used."
if I try to switch back to com port, it won't connect. I just get "Error" at the bottom right of the screen.
if I go back to the Opta at the top of the Project tree, I can manually download the code.

do I have to manually download every time? it says its for First setup and re-initialization.

I think that I have got through this.

I started a new project, uncommented the network stuff in sketch and uploaded to the opta.
as long as I don't switch the communication to modbustcp, the usb continues to work and the network is up on the opta at the static ip I assigned.
I am able to run the debugging while connected to usb. this is fine for the bench but will suck when I put this into production.