Hi Stephan,
Thanks for your kind reaction.
I discovered the cause to my problem and a workaround, but I think it must be a bug in Atmel Studio.
Although I upgraded to Studio 7.0.1006 as you suggested, the problem persisted.
I finally identified the cause of my error. It happens when I try to declare my global lcd variable using
a multi-argument constructor.
When I use the following global var declaration in my .ino file, the import in AS7 works:
LiquidCrystal_I2C lcd(0x27);
However, when using the following, I get the error "AtmelStudio: Not enough arguments for format string"
LiquidCrystal_I2C lcd(0x27,BACKLIGHT_PIN, POSITIVE);
This constructor simply does the same thing as LiquidCrystal_I2C lcd(0x27); just adding in its body:
lcd.setBacklightPin(BACKLIGHT_PIN, POSITIVE);
If I use the LiquidCrystal_I2C lcd(0x27); version and add the lcd.setBacklightPin part in the setup() function in the same .ino file, the import in Atmel Studio works.
It only fails if I use other constructors with more than 1 argument.
I reported potential bug on the official Atmel AVR forum:
http://www.avrfreaks.net/forum/sketch-import-bug-atmel-studio-7
Expecting the Atmel team to react to that message.
As a workaround, I just used the single-parameter constructor in the .ino file, then import it in Atmel Studio, then replace it again there. It builds, uploads and runs correctly from Atmel Studio then.
Good!