So... There are already many topics about Mini, Pro Mini, Pro Mega,... where it is not possible to load programs in these boards...
Somewhere there is a problem by how the boards open and close their ports, I believe...
So is there already a final solution with this problem? I use a lot of Arduino Micro (genuine).
Someone already found a good solution, which is also easy to use by people who only use Arduino IDE?
Below applies if you haven't blown up you Arduino.
For boards with native USB, just write bug free code ( ) so you don't overwrite variables that are used by the CDC stack. Those boards are e.g. Leonardo, Micro and ProMicro (and nowadays a whole slew of others). Overwriting those variables can result in your board not being detected or not being able to upload (as the board no longer reacts on the software reset).
I'm working on a topic how to solve problems with boards with native USB and some tips what to do and not to do when it comes to HID usage.
This problem does not happen when using Mini, Uno, Mega, or Nano (and other boards without native USB) as they have a dedicated chip for the TTL-to-USB conversion (e.g. 16U2, CH340, FTDI...) so you can't overwrite the CDC stack.
What I found is that it is a problem with the newer IDE from Arduino itself...
When I use any of the boards (with 16U2, CH340,...) the program starts to load, then suddenly it says: comport not open...
Although before uploading a sketch, everything is working.
This is with all the boards I have that use an USB-mini port. Genuine Arduino Micro, Sparkfun Mini Pro, Mega Pro, etc..
I havent tried it yet with a FTDI. Might try that one.
I have not experienced what you're experiencing in 2.0 and also not in 1.8.x. Only thing is that I never upload large code so that might effect my experience.