locked
remove property from table,at runtime get error. RRS feed

  • Question

  • I remove property 'Platform' from table 'Sales', then i get error in my code at runtime.

    "The property 'Platform' does not exist on type 'LightSwitchApplication.Sales'. Make sure to only use property names that are defined by the type."

    my code

    Sales sales= this.DataWorkspace.ApplicationData.SalesSet_SingleOrDefault(SaleId);
                    //this.DataWorkspace.ApplicationData.SalesSet.Where(a => a.Id == SaleId).SingleOrDefault();

    If i change my code to get entity with linq(where) not use SalesSet_SingleOrDefault(),it's work.Is there miss something after remove property?

    I tried unload and reload project not working.

    Monday, June 9, 2014 7:36 AM

All replies

  • That sounds like the property has not been fully removed when you updated the data source.

    If you open the relevant LSML file(s) with a text editor you may be able to search for the word 'Platform' which should not now exist. If it does, that would confirm the problem.

    Beware that manually editing LSML files is difficult and can easily corrupt your project to the point where it will not load. Take a backup before you do anything.


    Simon Jones
    If you found this post helpful, please "Vote as Helpful". If it actually answered your question, please remember to "Mark as Answer". This will help other people find answers to their problems more quickly.

    Monday, June 9, 2014 7:59 AM
  • I search LSML file (screen and table), didn't found 'Platform'.

    but i publish the project,that's working fine.

    Friday, June 13, 2014 8:28 AM
  • Is this working OK now or do you still have a problem during debug?

    If so, have you tried cleaning and rebuilding the solution? Does that make a difference?


    Simon Jones
    If you found this post helpful, please "Vote as Helpful". If it actually answered your question, please remember to "Mark as Answer". This will help other people find answers to their problems more quickly.

    Friday, June 13, 2014 9:15 AM
  • i tried cleaning and rebuilding solution,still got same error during debug.

    after error message,screen as below.

    Friday, June 13, 2014 10:08 AM