Tag Info

Hot answers tagged

1

Your feature is scoped as web: Scope="Web" But your are working with a site in the activate event of the feature: Dim site As SPSite = TryCast(properties.Feature.Parent, SPSite) Try changing the scope of the feature or use in SPWeb in the code.


1

I guess your mistake is that SPSite is not the properties.Feature.Parent when your Feature has Scope Webapplication. Try this instead: SPWebApplication webApp = (SPWebApplication)properties.Feature.Parent; foreach (SPJobDefinition job in webApp.JobDefinitions){ if (job.Name == List_JOB_NAME) job.Delete(); }


1

I solved it this way: Create a site collection feature which is responsible for deploying font/spcolor files, master page, Background Image etc. Create a web scoped Feature which sets the theme, masterpage, font and the Background image in FeatureActivated-Method. Establish a Feature dependency, so the web Feature can only be activated when the site ...


1

Check solution's deployment type. If it's set to ApplicationServer, the features won't be installed automatically. You need to have it set to WebFrontEnd if you want to avoid doing Install-SPFeature after deploying your solution.



Only top voted, non community-wiki answers of a minimum length are eligible