The problem solved itself after updating visual studio. After trying everything I could come up with I sent the project to a colleague who could debug it. Apparently it was related to my VS installation.