Sometimes, we need to develop with running VS 2010 as administrator, you can make this behaviour automatic by setting the following steps.
1. Right click the shot cut to VS 2010 and select 'Porperties'.
2. From the properties window select the 'shotcut' tab and click the 'Advanced' button.
3. Check the 'Run as administrator' checkbox.