Ethernet IPAddress class won’t port to Atmel Studio 7

This is a problem that was distilled from a larger sketch that exhibited similar symptoms usng the Arduino Zero with WiFi101 shield. None of my code is involved in this report. My question is whether this is a problem with the Arduino libaries or with Atmel Studio 7 and especially its “Create project from Arduino sketch” feature. I’m thinking compiler options or namespaces but certainly something isn’t working right.

I went to the Arduino online reference and found an example of the IPAddress class:

I copied that into a small Arduino Sketch and it compiled cleanly for the Arduino Zero using Arduino 1.6.12.

I went to Atmel Studio 7, File –> New –> Project… –> Create project from Arduino sketch and imported my IPAddressTest.ino project using the same Arduino 1.6.12 and the Arduino Zero (Programming Port) selection. It gave me the usual warning:
09:11:43: [WARNING] Error updating project settings:Object reference not set to an instance of an object.

I then clicked on Build –> Build Solution. It gave five error mesages. The key problem is that it does not recognize some class members declarations. In the larger case there were quite more messages.

IPAddressTest.ino (746 Bytes)

After trying many approaches I finally found the solution to this problem

The problem was that I had some libraries from older versions of Arduino software and “Create project from Arduino sketch” somehow used the older ones.

The fix was to delete all the arduino directories under:
Just for good measure I found some under Roaming and killed them too.

Then I re-installed the SAMD board package and I had to redo the preferences for line numbers and sketchbook location. With this correction both the small example and the bigger IoT Azure program will build on Atmel Studio 7, and the Atmel debugger does well on the Arduino Zereo/WiFi 101 lashup.