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