Restarted the PC, and now compile trough MPLAB works fine, but it is not handy to do so.