Why do I sometimes have to manually edit app.config to get my project to compile?

5 posts, 1 answers
  1. Stuart Hemming
    Stuart Hemming avatar
    1622 posts
    Member since:
    Jul 2004

    Posted 06 Jul 2010 Link to this post

    I'm working on a project that's in the early stages of development and, consequently, the object model is in a state of flux.

    Sometimes when I make a change to a class, usually when I've deleted a property and subsequently tried to recompile the project, the compile will fail with an error about something being in the app.config file that can't be found in the model.

    I'm making my changes directly in the class' source and then recompiling the code. Is there something else I should be doing?

    -- 
    Stuart
  2. Damyan Bogoev
    Admin
    Damyan Bogoev avatar
    581 posts

    Posted 07 Jul 2010 Link to this post

    Hi Stuart Hemming,

    I recommend you to use the Schema Merge wizard which helps to merge the schema changes with the class model. The problem is that when you manually remove fields from the classes, their mapping configuration is still present in the App.config and errors are thrown. If you use the wizard to update the model the mapping will be automatically updated and no manual operations should be required.
    You could find useful the following help article - “Schema Merge”.
    Hope that helps.

    All the best,
    Damyan Bogoev
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. DevCraft banner
  4. Stuart Hemming
    Stuart Hemming avatar
    1622 posts
    Member since:
    Jul 2004

    Posted 07 Jul 2010 Link to this post

    OK. Perhaps should have said that, generally, I'm making changes in the object model then forward engineering the model and the docs seem to suggest that scheme merge is a reverse engineering tool.

    -- 
    Stuart
  5. Answer
    Ady
    Admin
    Ady avatar
    588 posts

    Posted 09 Jul 2010 Link to this post

    Hi Stuart Hemming,

     The Forward Mapping wizard does not currently track the changes in the code and update the app.config automatically. Hence, if you remove a field which already has a mapping in the config file, you get an error.

    You can use the 'Check Settings' dialog to fix such problems.The problems are reported and you can use the 'Fix' button to update the config file.

    Best wishes,
    Ady
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  6. Stuart Hemming
    Stuart Hemming avatar
    1622 posts
    Member since:
    Jul 2004

    Posted 14 Jul 2010 Link to this post

    Ady,

    Thanks for that; I'd not discovered the 'Check Settings' option.

    -- 
    Stuart
Back to Top
DevCraft banner