locked
Error after Upgrade to the Last Version RRS feed

  • Question

  • Im getting this error after update my project to the last version (Visual Studio 2013 Update 2)

    Error	621	An exception occurred when building the database for the application.
    Could not deploy package.
    Error SQL72014: .Net SqlClient Data Provider: Msg 2714, Level 16, State 5, Line 3 There is already an object named 'GestionProf_Files_GestionProfesionales' in the database.
    Error SQL72045: Script execution error.  The executed script:
    WAITFOR DELAY '00:00.010';
    
    ALTER TABLE [dbo].[GestionProf_Files] WITH NOCHECK
        ADD CONSTRAINT [GestionProf_Files_GestionProfesionales] FOREIGN KEY ([GestionProf_Files_GestionProfesionales]) REFERENCES [dbo].[GestionProfesionales] ([Id]) ON DELETE CASCADE;
    
    
    Error SQL72014: .Net SqlClient Data Provider: Msg 1750, Level 16, State 0, Line 3 Could not create constraint. See previous errors.
    Error SQL72045: Script execution error.  The executed script:
    WAITFOR DELAY '00:00.010';
    
    ALTER TABLE [dbo].[GestionProf_Files] WITH NOCHECK
        ADD CONSTRAINT [GestionProf_Files_GestionProfesionales] FOREIGN KEY ([GestionProf_Files_GestionProfesionales]) REFERENCES [dbo].[GestionProfesionales] ([Id]) ON DELETE CASCADE;
    
    
    	C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\LightSwitch\v4.5\Microsoft.LightSwitch.targets	160	10	Geo

    Its easy to avoid the above error, just closing the Visual Studio and then Reopen it, but its really annoying doing this over and over again. Its happend to other one?, thanks!



    Saturday, May 31, 2014 2:49 PM

Answers

  • Are you sure that you don't have a data integrity in your intrinsic database.  I had exactly this issue when I upgraded.

    Check to see if there are any records in "GestionProf_Files" that have a null value for the field "GestionProf_Files_GestionProfesionales" (or possibly a value in that field that does not point to an existing record in GestionProfesionales.

    If this is just development data, you could just delete the data in GestionProf_Files.

    I know it says "NOCHECK", but I did have this issue and fixed it by deleting the problem records.

    Mark

    • Marked as answer by NESTicle 8Bit Friday, July 25, 2014 2:19 PM
    Thursday, July 24, 2014 10:57 PM

All replies

  • Its easy to avoid the above error, just closing the Visual Studio and then Reopen it, but its really annoying doing this over and over again.
    According to your description above, it's recommended to clean and rebuild solution and debug your LightSwitchapplication.

    At the same time I'd also like to suggest you to redo your update procedure, and check whether it has same issue.

    Regards



    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Wednesday, June 4, 2014 12:34 PM
  • I did that you commented.

    1. Clean all the project

    2. Rebuild

    3. Build the solution.

    After that im getting the same error.

    Wednesday, June 4, 2014 8:57 PM
  • If you would be willing to share your project with us we could get a bug logged for this.  If you are willing to do so, shoot me an email at

    david (dot) kidder (at) microsoft (dot) com


    David Kidder | Senior SDET | Microsoft | LightSwitch

    Thursday, June 5, 2014 7:43 PM
    Moderator
  • Hi Dave, do you have any news about this issue?, i'll appreciate your answer :)
    Thursday, July 24, 2014 1:04 PM
  • Sorry, I completely spaced on this. I will get back to you soon.


    David Kidder | Senior SDET | Microsoft | LightSwitch

    Thursday, July 24, 2014 1:25 PM
    Moderator
  • Are you sure that you don't have a data integrity in your intrinsic database.  I had exactly this issue when I upgraded.

    Check to see if there are any records in "GestionProf_Files" that have a null value for the field "GestionProf_Files_GestionProfesionales" (or possibly a value in that field that does not point to an existing record in GestionProfesionales.

    If this is just development data, you could just delete the data in GestionProf_Files.

    I know it says "NOCHECK", but I did have this issue and fixed it by deleting the problem records.

    Mark

    • Marked as answer by NESTicle 8Bit Friday, July 25, 2014 2:19 PM
    Thursday, July 24, 2014 10:57 PM
  • That was the solution, im just "clean" my development database and the 'bug' dissapear.
    Friday, July 25, 2014 2:22 PM