locked
Updating data source in Lightswitch HTML VS 2013 deletes existing data items and changes screens by itself RRS feed

  • Question

  • I had many issues with VS 2012 LS HTML and I decided to use VS 2013 which has much better Intellisense. Everything looked OK until I refreshed my data source which I always do changing fields in database and then I realized all my screens have dropped some child data sources or related ones randomly. I thought maybe I did something to relationship and keep creating screens again and then I tried to updated datasource for some completely unrelated table and then bang all screen changed again deleting my stuff!

    I did some changes adding them again and this time I saved and updated without any changes to datasource and again all screens randomly (mostly related datsources ) removed from screens.

    I am not sure if I am doing anything wrong but this sounds like a major issue to me which means I can not technically use Vs 2013 LS HTML for any work as it keep deleting data items from screens by itself whenever I update data sources.

    Thanks

    Ray 

     


    • Edited by RayRowe Wednesday, August 28, 2013 4:04 PM
    Wednesday, August 28, 2013 3:54 PM

Answers

  • Ray, I talked to some developers and here are a couple of workarounds to try:

    Option 1:

    Prior to performing an "Update Data Source":

    1. Save and close your solution.
    2. Copy the contents of the "Screens" folder of the Client sub-project (e.g. LightSwitchProj\LightSwitchProj.HtmlClient) to a new folder called "ScreensBackup"
    3. Open your solution and perform the Update Data Source
    4. Save and close your solution
    5. Copy the contents of the "ScreensBackup" folder into the Client sub-project's "Screens" folder, overwriting all the files that currently exist in "Screens"
    6. Open your solution, screens should have their previous state.

    Option 2:

    If you are using Source Code Control: 

    1. Save your solution, check-in all pending changes
    2. Perform the Update Data Source
    3. In the Solution Explorer, select all the .lsml files in the Client sub-project's "Screens" folder
    4. Right-click one of the selected files and select "Source Control >> Undo Pending Changes"
    5. The "Undo Pending Changes" dialog will open, the files that you selected should be checked. Click the "Undo Changes" button.
    6. The "Confirm Undo Checkout" dialog will open. Click "Yes To All".  After this, screens should have their previous state.

    David Kidder | Senior SDET | Microsoft | LightSwitch

    • Proposed as answer by Dave KidderModerator Sunday, September 1, 2013 7:00 PM
    • Marked as answer by Angie Xu Wednesday, September 4, 2013 5:24 AM
    Sunday, September 1, 2013 6:59 PM
    Moderator

All replies

  • You aren't doing anything wrong.  Unfortunately, this is an issue with the Preview build that has been reported and we are addressing.


    David Kidder | Senior SDET | Microsoft | LightSwitch

    Thursday, August 29, 2013 2:41 AM
    Moderator
  • Hi Dave,

    This is not going to help us much. We have invested a lot on LS HTML and I want to be able to continue using VS 2013 until fix is ready.

    Is there any work around that we can update data sources or you are suggesting to stop using VS 2013 and go back to VS 2012 until fix is ready. VS 2012 (Preview 2 & 3) on its own had many other issues which forced us to look at VS 2013 which has been much better experience until now.

    Ray

     
    Thursday, August 29, 2013 3:11 PM
  • Ray, I talked to some developers and here are a couple of workarounds to try:

    Option 1:

    Prior to performing an "Update Data Source":

    1. Save and close your solution.
    2. Copy the contents of the "Screens" folder of the Client sub-project (e.g. LightSwitchProj\LightSwitchProj.HtmlClient) to a new folder called "ScreensBackup"
    3. Open your solution and perform the Update Data Source
    4. Save and close your solution
    5. Copy the contents of the "ScreensBackup" folder into the Client sub-project's "Screens" folder, overwriting all the files that currently exist in "Screens"
    6. Open your solution, screens should have their previous state.

    Option 2:

    If you are using Source Code Control: 

    1. Save your solution, check-in all pending changes
    2. Perform the Update Data Source
    3. In the Solution Explorer, select all the .lsml files in the Client sub-project's "Screens" folder
    4. Right-click one of the selected files and select "Source Control >> Undo Pending Changes"
    5. The "Undo Pending Changes" dialog will open, the files that you selected should be checked. Click the "Undo Changes" button.
    6. The "Confirm Undo Checkout" dialog will open. Click "Yes To All".  After this, screens should have their previous state.

    David Kidder | Senior SDET | Microsoft | LightSwitch

    • Proposed as answer by Dave KidderModerator Sunday, September 1, 2013 7:00 PM
    • Marked as answer by Angie Xu Wednesday, September 4, 2013 5:24 AM
    Sunday, September 1, 2013 6:59 PM
    Moderator
  • This issue is addressed in Visual Studio 2013 RC, available here:

    http://www.microsoft.com/visualstudio/eng/2013-preview


    David Kidder | Senior SDET | Microsoft | LightSwitch

    Friday, September 13, 2013 2:07 AM
    Moderator