Simple thing but you often need to run VS2010 as administrator, certainly if you are going to be doing much debugging with SharePoint 2010. You can make this behaviour automatic by carrying out the following steps.
1. Right click the short cut to VS2010 and select ‘Properties’
2. From the properties window select the ‘Advanced’ button
3. Check the ‘Run as administrator’ checkbox – Your done