Upgrading SharePoint 2007 Web controls to SharePoint 2010
While upgrading web controls to SharePoint 2010 , we found a issue with Sharepoint Dll in web controls even though Sharepoint and related Dlls are present in Assembly directory (C:\Windows\Assembly)
ERROR: Could not load file or assembly ‘Microsoft.SharePoint.ApplicationPages, Version=18.104.22.168, Culture=neutral, PublicKeyToken=71e9bce111e9429c’ or one of its dependencies. Access is denied.
You can go to the project properties page (can be accessed from the Project pull down menu), going to the references tab, and adding the path to the Microsoft.SharePoint dll ( Browse the Dll under the Assembly folder)