Hi,
Sorry you are having problems.
You might have read that Arduino 1.5 system is beta and unfortunately you are hitting the bugs. There is a fix and new release due over the next few days but for now you have two choices.
1. You can use Atmel to write code and Arduino to upload. In the Arduino Ide there is a checkbox in "File>Preferences" called "External Editor". Clicking the checkbox will set the Arduino Ide into read-only mode. In read-only mode, the arduino ide will reload the sketch from disk each time you click upload. This allows the same sketch to be open in both Atmel Studio and the Arduino Ide. Thus you can edit and save in Atmel Studio and then upload with the Arduino Ide.
2. Make some changes to the Arduino Ide as a temp workaround First thing that fails is that the 1.5 beta of Visual Micro doesn't cater for the new hardware specific libraries.
You can remedy this problem by MOVING the folders from "ArduinoIde\Hardware\Arduino\Sam\Libraries" to "ArduinoIde\Hardware\Arduino\Libraries". This lack of support for hardware lib locations in the beta was documented at time of release however another bug that surfaced only recently is a pain and relates to libraries that have a "\utility" sub folder. I have just checked and unfortunately the Wifi library has a utility folder!
The bug is that when using Arduino 1.5 with Visual Micro the compiler -I include for a libraries utility folder is incorrectly omitted from the "c" and the "cpp" compiler script.
To remedy this problem with your specific project you can edit the platforms.txt file that is included with Arduino 1.5 (won't work if other libs that have utility files with the same name).
Use a text editor to edit "arduinoide\hardware\arduino\sam\platform.txt"
Please notice below I have added [-I"D:\Arduino\arduino-1.5.2\libraries\WiFi\utility"] to both recipe.c.o.pattern and recipe.cpp.o.pattern. You need to make this change to your platforms.txt and to ensure the path to the wifi utility folder is correct.
The following script is from platforms.txt in the sam hardware folder (above)
# SAM3 compile patterns
# ---------------------
## Compile c files
recipe.c.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.c.flags} -mcpu={build.mcu} -DF_CPU={build.f_cpu} -D{software}={runtime.ide.version} {build.extra_flags} {compiler.libsam.c.flags} {includes} -I"D:\Arduino\arduino-1.5.2\libraries\WiFi\utility" "{source_file}" -o "{object_file}"
## Compile c++ files
recipe.cpp.o.pattern="{compiler.path}{compiler.cpp.cmd}" {compiler.cpp.flags} -mcpu={build.mcu} -DF_CPU={build.f_cpu} -D{software}={runtime.ide.version} {build.extra_flags} {compiler.libsam.c.flags} {includes} -I"D:\Arduino\arduino-1.5.2\libraries\WiFi\utility" "{source_file}" -o "{object_file}"
After making changes to lib locations or platform.txt, if Atmel Studio is open, click "Tools>Arduino>Reload Toolchain" Documentation Under normal (non-beta) circumstances Visual Micro works the same way as Arduino so any documents concerning this area would normally be exactly the same as the ones for Arduino.
This is why I said the first thing to do was to make the sketch was created as a standard arduino sketch by correcting the #includes.
If you were to open the arduino ide and use the Import>Library feature you it would add the libs without the path names which is important in the arduino build process. Obviously this bug is a big confusion so I can see why you ended up trying to add full path #includes.
Sorry for the hacking, the next release in a few days caters for all types of arduino libraries including yet another new format soon to be released by Arduino.