This is a migrated thread and some comments may be shown as answers.
Deleted class not removed from app.config
2 Answers 48 Views
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
David Hufford
Top achievements
Rank 1
David Hufford asked on 24 Sep 2009, 06:03 AM
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 Answers, 1 is accepted

Sort by
0
Damyan Bogoev
Telerik team
answered on 24 Sep 2009, 03:44 PM
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.
0
David Hufford
Top achievements
Rank 1
answered on 24 Sep 2009, 11:43 PM
Thanks
Tags
General Discussions
Asked by
David Hufford
Top achievements
Rank 1
Answers by
Damyan Bogoev
Telerik team
David Hufford
Top achievements
Rank 1
Share this question
or