ERROR:unable to cast object of type 'Microsoft.SharePoint.SPsite' to type 'Microsoft.SharePoint.SPWeb' during deploy MOSS 2010 solution
原因:程序中有涉及到spweb的引用,註釋掉就可以了。
//SPSite curSite = (SPSite)properties.Feature.Parent;
//SPWeb curWeb = curSite.RootWeb;
SPWeb curWeb = (SPWeb)properties.Feature.Parent;
如果是想發佈到web上,將下面的scope設置爲web