Tag Info

New answers tagged

1

The visual web part should be included to the Site-scoped feature, as a result properties.Feature.Parent is a SPSite object. You need to check feature scope and use the code below if the scope is site. SPSite site = properties.Feature.Parent as SPSite; if (site != null){ SPWeb web = site.RootWeb; SPList laptopList = web.Lists["Laptops"]; ... }


0


0

If you feature is Site scoped, you can get the SPSite object as following: var spSite = properties.Feature.Parent as SPSite; If you feature is Web scoped, you can get the SPSite object as following: var spSite = (properties.Feature.Parent as SPWeb).Site;


0

Instructions for Visual Studio 2010: Click on "Project" in the menu and then " properties" Click on "SharePoint on the left, and then switch the Active Deployment Configuration to "No Activation". Start debugging, and then activate the feature manually through the UI. You should now be able to debug through your feature activation steps if you have set ...


0

In that case, event receiver still attached to the list and cause alot of problem to your site.Only thing you can do is simply delete it. run this script to get the event receiver attach to a list. $spWeb = Get-SPWeb -Identity http://web.spdev.local $spList = $spWeb.Lists["My List Name"] $spList.EventReceivers | Select Name,Assembly,Type Now you want to ...


2

as far as I know retracting solutions doesn't deactivate their features, so although you wont be able to find or activate/deactivate those features, their references are still there. on the particular case of event receivers, it could turn out to be a major problem. the receiver may still be attached and if you redeploy/reactivate you may end up with firing ...


0

Maybe you are trying to activate an event receiver feature in a site that doesn't have the list created -and needed- where the event receiver is attached.



Top 50 recent answers are included