Another problem with Atmel Studio 7

I have a sketch that runs on M0 Pro and MKR1000 in Arduino. When I make a project for my sketch, it doesn’t build. It complains of missing the file sam.h.

I tried this using Visual Micro and not using Visual Micro. Same problem in both cases.

I’m using Arduino IDE 1.8.2 and the latest Arduino Studio 7.

Anyone doing this successfully?