Deleted class not removed from app.config

Thread is closed for posting
3 posts, 0 answers
  1. David Hufford
    David Hufford avatar
    9 posts
    Member since:
    Jun 2009

    Posted 24 Sep 2009 Link to this post

    I've been having this issue for a while now.

    1. I create a class, map it, use it normally,...
    2. Decide I do not want it and delete the class from the solution explorer.
    3. Rebuild.  This generates 2 errors of the form:

    Error    28    OpenAccess Error: Telerik.OpenAccess: Updating SQL schema failed. Mapping for class 'psDataEntities.Feedback' is specified in file 'config' but the class could not be found. --> C:\ps6Development\DataCode\PsBusinessLogicLayer\psDataEntities\App.config:mapping-id=mssqlMapping/namespace[psDataEntities]/class[Feedback]    psDataEntities    

    and:

    Error    29    OpenAccess Error: psDataEntities.Feedback    psDataEntities    

    Going to the Forward Mapping Wizard, the class is gone.

    If I manually delete the class from the app.config everything is fine, but, obviously, I would rather not muck around in there unless really required.

    Do I need to do something special before deleteing the class?

    Thanks






  2. Damyan Bogoev
    Admin
    Damyan Bogoev avatar
    581 posts

    Posted 24 Sep 2009 Link to this post

    Hello David Hufford,

    You can use the Forward Mapping wizard in order to avoid having invalid nodes in the App.config file.
    To achieve this please follow these steps:
    1.    Go to the Telerik menu in Visual Studio
    2.    From the OpenAccess submenu choose Forward Mapping
    3.    In the treeview find the class which you decided to delete and click on it
    4.    On the right side you see its properties, choose the Class Mapping tab and uncheck the ‘Make this class persistent’ checkbox
    5.    When you are done with making the class non-persistent, you can delete it from Solution Explorer
    ( Un-checking the ‘Make this class persistent’ checkbox removes the persistent attribute as well as the configuration entries for the selected class.)


    Regards,
    Damyan Bogoev
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. David Hufford
    David Hufford avatar
    9 posts
    Member since:
    Jun 2009

    Posted 24 Sep 2009 Link to this post

    Thanks
Back to Top