Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Amna Butt 20 posts 140 karma points
    Apr 20, 2017 @ 10:22
    Amna Butt
    0

    Uninstalling package is not removing application from application.config

    I have added application as follow:

    [Application("customalias", "customaname", "custom-icon", 8)]
    public class CustomApplication :IApplication
    {
    
    }
    

    When I uninstall package, it is not removing it from application.config. It is really required to remove it from config file too. Please tell me how to remove it by code

  • David Brendel 792 posts 2970 karma points MVP 3x c-trib
    May 03, 2017 @ 10:41
    David Brendel
    100

    Hi Amna,

    there is a SectionService that can be used for this:

    var services = ApplicationContext.Current.Services;
    
    var sectionService = services.SectionService;
    var userService = services.UserService;
    
    userService.DeleteSectionFromAllUsers("yourSection");
    var section = sectionService.GetByAlias("yourSection");
    sectionService.DeleteSection(section);
    

    Hope that gets your in the right direction.

    Regards David

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies