I have written a sample (COM) plugin for AVRStudio4 using VisualStudio 2008 Express.
Will post the src here. ATMEL requires you to sign a license agreement in order to get the C++ SDK.
This one is free, generated from the installed binaries. AVRStudio uses COM classes, so everything is publicly readable.
Just press "Debug". The DLL will be automatically registered by VisualStudio. You might have to adjust the path to AVRStudio.exe in the AVRStudioPlugin.csproj.
Once loaded by AVRStudio, the plugin will register a submenu "myPlugin" under "Tools" with a command.