Publish of Database Project fails because deployment script attempts to drop and re-create an unmodified...





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}







6















I'm using Visual Studio 15.8.5 with Sql Server Data Tools 15.1.



I've created an SQL Server database project and imported the schema of an already existing database. I've made several minor changes to a few tables of the database and published the updates to the development database without any problems.



After adding a few SQL scripts to the project, all of them with:



Build Action = None


publish fails, despite no changes have been made in any of the database objects of the project.



This is the part of the auto-generated publish script that causes the problem:



/*
The table [lut].[KAE] is being dropped and re-created since all
non-computed columns within the table have been redefined.
*/

IF EXISTS (select top 1 1 from [lut].[KAE])
RAISERROR (N'Rows were detected. The schema update is terminating
because data loss might occur.', 16, 127) WITH NOWAIT

GO


Table [lut].[KAE] has not been changed, though. One of the scripts is redefining its schema but this should make no difference since this is a 'No Build' script.



What am I possibly doing wrong here?



Edit:



I've done a schema comparison as @MadBert advised. I originally used my actual database as source and my sql server visual studio project as target. No differences were found.



I then switched source and target databases and compared again. The following 'difference' was detected.



enter image description here



As you can see this is not an actual difference, it looks like a Visual Studio bug in schema comparison. Any ideas on how I could circumvent this behavior?










share|improve this question

























  • Can you try unchecking "Verify Deployment" in publish profile deployment advanced settings and try again?

    – MadBert
    Nov 23 '18 at 16:57













  • @MadBert I tried this, unfortunately same thing happens.

    – Giorgos Betsos
    Nov 26 '18 at 14:35











  • Another thing I would try is to use Schema Compare tool against an environment you are deploying to. There could be some small change that you might have missed. Let me know if you get to resolve the issue.

    – MadBert
    Nov 28 '18 at 10:22













  • @MadBert I did a schema comparison, no differences, still same error.

    – Giorgos Betsos
    Dec 28 '18 at 7:52











  • @GiorgosBetsos Does the script contain an actual drop of the table [lut].[KAE]? In Visual Studio 2017, go to Tools > SQL Server > New Schema Comparison.... Click on Options and uncheck Block on possible data loss in General. If you do this you need to manually check the script so nothing gets dropped that you wan't to save.

    – Ogglas
    Dec 28 '18 at 9:29


















6















I'm using Visual Studio 15.8.5 with Sql Server Data Tools 15.1.



I've created an SQL Server database project and imported the schema of an already existing database. I've made several minor changes to a few tables of the database and published the updates to the development database without any problems.



After adding a few SQL scripts to the project, all of them with:



Build Action = None


publish fails, despite no changes have been made in any of the database objects of the project.



This is the part of the auto-generated publish script that causes the problem:



/*
The table [lut].[KAE] is being dropped and re-created since all
non-computed columns within the table have been redefined.
*/

IF EXISTS (select top 1 1 from [lut].[KAE])
RAISERROR (N'Rows were detected. The schema update is terminating
because data loss might occur.', 16, 127) WITH NOWAIT

GO


Table [lut].[KAE] has not been changed, though. One of the scripts is redefining its schema but this should make no difference since this is a 'No Build' script.



What am I possibly doing wrong here?



Edit:



I've done a schema comparison as @MadBert advised. I originally used my actual database as source and my sql server visual studio project as target. No differences were found.



I then switched source and target databases and compared again. The following 'difference' was detected.



enter image description here



As you can see this is not an actual difference, it looks like a Visual Studio bug in schema comparison. Any ideas on how I could circumvent this behavior?










share|improve this question

























  • Can you try unchecking "Verify Deployment" in publish profile deployment advanced settings and try again?

    – MadBert
    Nov 23 '18 at 16:57













  • @MadBert I tried this, unfortunately same thing happens.

    – Giorgos Betsos
    Nov 26 '18 at 14:35











  • Another thing I would try is to use Schema Compare tool against an environment you are deploying to. There could be some small change that you might have missed. Let me know if you get to resolve the issue.

    – MadBert
    Nov 28 '18 at 10:22













  • @MadBert I did a schema comparison, no differences, still same error.

    – Giorgos Betsos
    Dec 28 '18 at 7:52











  • @GiorgosBetsos Does the script contain an actual drop of the table [lut].[KAE]? In Visual Studio 2017, go to Tools > SQL Server > New Schema Comparison.... Click on Options and uncheck Block on possible data loss in General. If you do this you need to manually check the script so nothing gets dropped that you wan't to save.

    – Ogglas
    Dec 28 '18 at 9:29














6












6








6








I'm using Visual Studio 15.8.5 with Sql Server Data Tools 15.1.



I've created an SQL Server database project and imported the schema of an already existing database. I've made several minor changes to a few tables of the database and published the updates to the development database without any problems.



After adding a few SQL scripts to the project, all of them with:



Build Action = None


publish fails, despite no changes have been made in any of the database objects of the project.



This is the part of the auto-generated publish script that causes the problem:



/*
The table [lut].[KAE] is being dropped and re-created since all
non-computed columns within the table have been redefined.
*/

IF EXISTS (select top 1 1 from [lut].[KAE])
RAISERROR (N'Rows were detected. The schema update is terminating
because data loss might occur.', 16, 127) WITH NOWAIT

GO


Table [lut].[KAE] has not been changed, though. One of the scripts is redefining its schema but this should make no difference since this is a 'No Build' script.



What am I possibly doing wrong here?



Edit:



I've done a schema comparison as @MadBert advised. I originally used my actual database as source and my sql server visual studio project as target. No differences were found.



I then switched source and target databases and compared again. The following 'difference' was detected.



enter image description here



As you can see this is not an actual difference, it looks like a Visual Studio bug in schema comparison. Any ideas on how I could circumvent this behavior?










share|improve this question
















I'm using Visual Studio 15.8.5 with Sql Server Data Tools 15.1.



I've created an SQL Server database project and imported the schema of an already existing database. I've made several minor changes to a few tables of the database and published the updates to the development database without any problems.



After adding a few SQL scripts to the project, all of them with:



Build Action = None


publish fails, despite no changes have been made in any of the database objects of the project.



This is the part of the auto-generated publish script that causes the problem:



/*
The table [lut].[KAE] is being dropped and re-created since all
non-computed columns within the table have been redefined.
*/

IF EXISTS (select top 1 1 from [lut].[KAE])
RAISERROR (N'Rows were detected. The schema update is terminating
because data loss might occur.', 16, 127) WITH NOWAIT

GO


Table [lut].[KAE] has not been changed, though. One of the scripts is redefining its schema but this should make no difference since this is a 'No Build' script.



What am I possibly doing wrong here?



Edit:



I've done a schema comparison as @MadBert advised. I originally used my actual database as source and my sql server visual studio project as target. No differences were found.



I then switched source and target databases and compared again. The following 'difference' was detected.



enter image description here



As you can see this is not an actual difference, it looks like a Visual Studio bug in schema comparison. Any ideas on how I could circumvent this behavior?







sql-server visual-studio sql-server-data-tools






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Dec 28 '18 at 13:10







Giorgos Betsos

















asked Nov 23 '18 at 16:29









Giorgos BetsosGiorgos Betsos

62.4k73366




62.4k73366













  • Can you try unchecking "Verify Deployment" in publish profile deployment advanced settings and try again?

    – MadBert
    Nov 23 '18 at 16:57













  • @MadBert I tried this, unfortunately same thing happens.

    – Giorgos Betsos
    Nov 26 '18 at 14:35











  • Another thing I would try is to use Schema Compare tool against an environment you are deploying to. There could be some small change that you might have missed. Let me know if you get to resolve the issue.

    – MadBert
    Nov 28 '18 at 10:22













  • @MadBert I did a schema comparison, no differences, still same error.

    – Giorgos Betsos
    Dec 28 '18 at 7:52











  • @GiorgosBetsos Does the script contain an actual drop of the table [lut].[KAE]? In Visual Studio 2017, go to Tools > SQL Server > New Schema Comparison.... Click on Options and uncheck Block on possible data loss in General. If you do this you need to manually check the script so nothing gets dropped that you wan't to save.

    – Ogglas
    Dec 28 '18 at 9:29



















  • Can you try unchecking "Verify Deployment" in publish profile deployment advanced settings and try again?

    – MadBert
    Nov 23 '18 at 16:57













  • @MadBert I tried this, unfortunately same thing happens.

    – Giorgos Betsos
    Nov 26 '18 at 14:35











  • Another thing I would try is to use Schema Compare tool against an environment you are deploying to. There could be some small change that you might have missed. Let me know if you get to resolve the issue.

    – MadBert
    Nov 28 '18 at 10:22













  • @MadBert I did a schema comparison, no differences, still same error.

    – Giorgos Betsos
    Dec 28 '18 at 7:52











  • @GiorgosBetsos Does the script contain an actual drop of the table [lut].[KAE]? In Visual Studio 2017, go to Tools > SQL Server > New Schema Comparison.... Click on Options and uncheck Block on possible data loss in General. If you do this you need to manually check the script so nothing gets dropped that you wan't to save.

    – Ogglas
    Dec 28 '18 at 9:29

















Can you try unchecking "Verify Deployment" in publish profile deployment advanced settings and try again?

– MadBert
Nov 23 '18 at 16:57







Can you try unchecking "Verify Deployment" in publish profile deployment advanced settings and try again?

– MadBert
Nov 23 '18 at 16:57















@MadBert I tried this, unfortunately same thing happens.

– Giorgos Betsos
Nov 26 '18 at 14:35





@MadBert I tried this, unfortunately same thing happens.

– Giorgos Betsos
Nov 26 '18 at 14:35













Another thing I would try is to use Schema Compare tool against an environment you are deploying to. There could be some small change that you might have missed. Let me know if you get to resolve the issue.

– MadBert
Nov 28 '18 at 10:22







Another thing I would try is to use Schema Compare tool against an environment you are deploying to. There could be some small change that you might have missed. Let me know if you get to resolve the issue.

– MadBert
Nov 28 '18 at 10:22















@MadBert I did a schema comparison, no differences, still same error.

– Giorgos Betsos
Dec 28 '18 at 7:52





@MadBert I did a schema comparison, no differences, still same error.

– Giorgos Betsos
Dec 28 '18 at 7:52













@GiorgosBetsos Does the script contain an actual drop of the table [lut].[KAE]? In Visual Studio 2017, go to Tools > SQL Server > New Schema Comparison.... Click on Options and uncheck Block on possible data loss in General. If you do this you need to manually check the script so nothing gets dropped that you wan't to save.

– Ogglas
Dec 28 '18 at 9:29





@GiorgosBetsos Does the script contain an actual drop of the table [lut].[KAE]? In Visual Studio 2017, go to Tools > SQL Server > New Schema Comparison.... Click on Options and uncheck Block on possible data loss in General. If you do this you need to manually check the script so nothing gets dropped that you wan't to save.

– Ogglas
Dec 28 '18 at 9:29












2 Answers
2






active

oldest

votes


















6














It turned out that a refactor log file was the culprit.



I tried to publish to an empty database, as @Ogglas wisely advised. I noticed that during publish I was getting the following message:




The following operation was generated from a refactoring log file
8e659d92-10bb-4ce9-xxxx-xxxxxxxxx Rename [lut].[KAE].[xxxxx] to
$$$$$$$$$ Caution: Changing any part of an object name could
break scripts and stored procedures.




I then noticed that my SQL Server Database project contained a .refactorlog file



enter image description here



It seems that this log file was generated after I changed the offending table schema. The schema of the table was later reverted to its original state but the log file remained.



I deleted this log file and after that publish finally succeeded!






share|improve this answer































    3





    +250









    Had a similar problem when a SQL Server Database project was set to the wrong Target platform. Edit this in project properties to match the target server. Initiate a schema compare again by right clicking on the project and select Schema Compare....



    enter image description here



    Also check if Ignore whitespace is marked in Schema Compare Options. If you still have a difference one way or another try pasting the text in Notepad++ with Show All Characters on and see if you can spot a difference.



    If you still can't find any difference, try creating a new database from the project and use SSMS GUI to compare. Does the table have the same Lock Escalation settings etc?



    enter image description here






    share|improve this answer


























    • I've checked SQL Server version, it is the same on both sides. I also did an Update after Schema comparison setting the Visual Studio Database Project as target. Tried then to publish once more. Same error.

      – Giorgos Betsos
      Dec 28 '18 at 15:31













    • @GiorgosBetsos Can you create a new database from your project to compare with?

      – Ogglas
      Dec 28 '18 at 15:36











    • I just did so. I noticed that although I was publishing to an empty database, I was getting this message: The following operation was generated from a refactoring log file .... I then noticed that a MyProject.refactorlog file exists (placed on the root level of the project folder). I deleted this file and Voila! Publish worked!!!

      – Giorgos Betsos
      Dec 28 '18 at 15:47













    • Tricky! Glad everything worked out! If anyone else finds this thread here is some information about the dbo.__RefactorLog and refactorlog file. social.msdn.microsoft.com/Forums/en-US/… :)

      – Ogglas
      Dec 28 '18 at 15:50














    Your Answer






    StackExchange.ifUsing("editor", function () {
    StackExchange.using("externalEditor", function () {
    StackExchange.using("snippets", function () {
    StackExchange.snippets.init();
    });
    });
    }, "code-snippets");

    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "1"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53450150%2fpublish-of-database-project-fails-because-deployment-script-attempts-to-drop-and%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    6














    It turned out that a refactor log file was the culprit.



    I tried to publish to an empty database, as @Ogglas wisely advised. I noticed that during publish I was getting the following message:




    The following operation was generated from a refactoring log file
    8e659d92-10bb-4ce9-xxxx-xxxxxxxxx Rename [lut].[KAE].[xxxxx] to
    $$$$$$$$$ Caution: Changing any part of an object name could
    break scripts and stored procedures.




    I then noticed that my SQL Server Database project contained a .refactorlog file



    enter image description here



    It seems that this log file was generated after I changed the offending table schema. The schema of the table was later reverted to its original state but the log file remained.



    I deleted this log file and after that publish finally succeeded!






    share|improve this answer




























      6














      It turned out that a refactor log file was the culprit.



      I tried to publish to an empty database, as @Ogglas wisely advised. I noticed that during publish I was getting the following message:




      The following operation was generated from a refactoring log file
      8e659d92-10bb-4ce9-xxxx-xxxxxxxxx Rename [lut].[KAE].[xxxxx] to
      $$$$$$$$$ Caution: Changing any part of an object name could
      break scripts and stored procedures.




      I then noticed that my SQL Server Database project contained a .refactorlog file



      enter image description here



      It seems that this log file was generated after I changed the offending table schema. The schema of the table was later reverted to its original state but the log file remained.



      I deleted this log file and after that publish finally succeeded!






      share|improve this answer


























        6












        6








        6







        It turned out that a refactor log file was the culprit.



        I tried to publish to an empty database, as @Ogglas wisely advised. I noticed that during publish I was getting the following message:




        The following operation was generated from a refactoring log file
        8e659d92-10bb-4ce9-xxxx-xxxxxxxxx Rename [lut].[KAE].[xxxxx] to
        $$$$$$$$$ Caution: Changing any part of an object name could
        break scripts and stored procedures.




        I then noticed that my SQL Server Database project contained a .refactorlog file



        enter image description here



        It seems that this log file was generated after I changed the offending table schema. The schema of the table was later reverted to its original state but the log file remained.



        I deleted this log file and after that publish finally succeeded!






        share|improve this answer













        It turned out that a refactor log file was the culprit.



        I tried to publish to an empty database, as @Ogglas wisely advised. I noticed that during publish I was getting the following message:




        The following operation was generated from a refactoring log file
        8e659d92-10bb-4ce9-xxxx-xxxxxxxxx Rename [lut].[KAE].[xxxxx] to
        $$$$$$$$$ Caution: Changing any part of an object name could
        break scripts and stored procedures.




        I then noticed that my SQL Server Database project contained a .refactorlog file



        enter image description here



        It seems that this log file was generated after I changed the offending table schema. The schema of the table was later reverted to its original state but the log file remained.



        I deleted this log file and after that publish finally succeeded!







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Dec 28 '18 at 16:04









        Giorgos BetsosGiorgos Betsos

        62.4k73366




        62.4k73366

























            3





            +250









            Had a similar problem when a SQL Server Database project was set to the wrong Target platform. Edit this in project properties to match the target server. Initiate a schema compare again by right clicking on the project and select Schema Compare....



            enter image description here



            Also check if Ignore whitespace is marked in Schema Compare Options. If you still have a difference one way or another try pasting the text in Notepad++ with Show All Characters on and see if you can spot a difference.



            If you still can't find any difference, try creating a new database from the project and use SSMS GUI to compare. Does the table have the same Lock Escalation settings etc?



            enter image description here






            share|improve this answer


























            • I've checked SQL Server version, it is the same on both sides. I also did an Update after Schema comparison setting the Visual Studio Database Project as target. Tried then to publish once more. Same error.

              – Giorgos Betsos
              Dec 28 '18 at 15:31













            • @GiorgosBetsos Can you create a new database from your project to compare with?

              – Ogglas
              Dec 28 '18 at 15:36











            • I just did so. I noticed that although I was publishing to an empty database, I was getting this message: The following operation was generated from a refactoring log file .... I then noticed that a MyProject.refactorlog file exists (placed on the root level of the project folder). I deleted this file and Voila! Publish worked!!!

              – Giorgos Betsos
              Dec 28 '18 at 15:47













            • Tricky! Glad everything worked out! If anyone else finds this thread here is some information about the dbo.__RefactorLog and refactorlog file. social.msdn.microsoft.com/Forums/en-US/… :)

              – Ogglas
              Dec 28 '18 at 15:50


















            3





            +250









            Had a similar problem when a SQL Server Database project was set to the wrong Target platform. Edit this in project properties to match the target server. Initiate a schema compare again by right clicking on the project and select Schema Compare....



            enter image description here



            Also check if Ignore whitespace is marked in Schema Compare Options. If you still have a difference one way or another try pasting the text in Notepad++ with Show All Characters on and see if you can spot a difference.



            If you still can't find any difference, try creating a new database from the project and use SSMS GUI to compare. Does the table have the same Lock Escalation settings etc?



            enter image description here






            share|improve this answer


























            • I've checked SQL Server version, it is the same on both sides. I also did an Update after Schema comparison setting the Visual Studio Database Project as target. Tried then to publish once more. Same error.

              – Giorgos Betsos
              Dec 28 '18 at 15:31













            • @GiorgosBetsos Can you create a new database from your project to compare with?

              – Ogglas
              Dec 28 '18 at 15:36











            • I just did so. I noticed that although I was publishing to an empty database, I was getting this message: The following operation was generated from a refactoring log file .... I then noticed that a MyProject.refactorlog file exists (placed on the root level of the project folder). I deleted this file and Voila! Publish worked!!!

              – Giorgos Betsos
              Dec 28 '18 at 15:47













            • Tricky! Glad everything worked out! If anyone else finds this thread here is some information about the dbo.__RefactorLog and refactorlog file. social.msdn.microsoft.com/Forums/en-US/… :)

              – Ogglas
              Dec 28 '18 at 15:50
















            3





            +250







            3





            +250



            3




            +250





            Had a similar problem when a SQL Server Database project was set to the wrong Target platform. Edit this in project properties to match the target server. Initiate a schema compare again by right clicking on the project and select Schema Compare....



            enter image description here



            Also check if Ignore whitespace is marked in Schema Compare Options. If you still have a difference one way or another try pasting the text in Notepad++ with Show All Characters on and see if you can spot a difference.



            If you still can't find any difference, try creating a new database from the project and use SSMS GUI to compare. Does the table have the same Lock Escalation settings etc?



            enter image description here






            share|improve this answer















            Had a similar problem when a SQL Server Database project was set to the wrong Target platform. Edit this in project properties to match the target server. Initiate a schema compare again by right clicking on the project and select Schema Compare....



            enter image description here



            Also check if Ignore whitespace is marked in Schema Compare Options. If you still have a difference one way or another try pasting the text in Notepad++ with Show All Characters on and see if you can spot a difference.



            If you still can't find any difference, try creating a new database from the project and use SSMS GUI to compare. Does the table have the same Lock Escalation settings etc?



            enter image description here







            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited Dec 28 '18 at 12:20

























            answered Dec 28 '18 at 12:10









            OgglasOgglas

            16.5k7102139




            16.5k7102139













            • I've checked SQL Server version, it is the same on both sides. I also did an Update after Schema comparison setting the Visual Studio Database Project as target. Tried then to publish once more. Same error.

              – Giorgos Betsos
              Dec 28 '18 at 15:31













            • @GiorgosBetsos Can you create a new database from your project to compare with?

              – Ogglas
              Dec 28 '18 at 15:36











            • I just did so. I noticed that although I was publishing to an empty database, I was getting this message: The following operation was generated from a refactoring log file .... I then noticed that a MyProject.refactorlog file exists (placed on the root level of the project folder). I deleted this file and Voila! Publish worked!!!

              – Giorgos Betsos
              Dec 28 '18 at 15:47













            • Tricky! Glad everything worked out! If anyone else finds this thread here is some information about the dbo.__RefactorLog and refactorlog file. social.msdn.microsoft.com/Forums/en-US/… :)

              – Ogglas
              Dec 28 '18 at 15:50





















            • I've checked SQL Server version, it is the same on both sides. I also did an Update after Schema comparison setting the Visual Studio Database Project as target. Tried then to publish once more. Same error.

              – Giorgos Betsos
              Dec 28 '18 at 15:31













            • @GiorgosBetsos Can you create a new database from your project to compare with?

              – Ogglas
              Dec 28 '18 at 15:36











            • I just did so. I noticed that although I was publishing to an empty database, I was getting this message: The following operation was generated from a refactoring log file .... I then noticed that a MyProject.refactorlog file exists (placed on the root level of the project folder). I deleted this file and Voila! Publish worked!!!

              – Giorgos Betsos
              Dec 28 '18 at 15:47













            • Tricky! Glad everything worked out! If anyone else finds this thread here is some information about the dbo.__RefactorLog and refactorlog file. social.msdn.microsoft.com/Forums/en-US/… :)

              – Ogglas
              Dec 28 '18 at 15:50



















            I've checked SQL Server version, it is the same on both sides. I also did an Update after Schema comparison setting the Visual Studio Database Project as target. Tried then to publish once more. Same error.

            – Giorgos Betsos
            Dec 28 '18 at 15:31







            I've checked SQL Server version, it is the same on both sides. I also did an Update after Schema comparison setting the Visual Studio Database Project as target. Tried then to publish once more. Same error.

            – Giorgos Betsos
            Dec 28 '18 at 15:31















            @GiorgosBetsos Can you create a new database from your project to compare with?

            – Ogglas
            Dec 28 '18 at 15:36





            @GiorgosBetsos Can you create a new database from your project to compare with?

            – Ogglas
            Dec 28 '18 at 15:36













            I just did so. I noticed that although I was publishing to an empty database, I was getting this message: The following operation was generated from a refactoring log file .... I then noticed that a MyProject.refactorlog file exists (placed on the root level of the project folder). I deleted this file and Voila! Publish worked!!!

            – Giorgos Betsos
            Dec 28 '18 at 15:47







            I just did so. I noticed that although I was publishing to an empty database, I was getting this message: The following operation was generated from a refactoring log file .... I then noticed that a MyProject.refactorlog file exists (placed on the root level of the project folder). I deleted this file and Voila! Publish worked!!!

            – Giorgos Betsos
            Dec 28 '18 at 15:47















            Tricky! Glad everything worked out! If anyone else finds this thread here is some information about the dbo.__RefactorLog and refactorlog file. social.msdn.microsoft.com/Forums/en-US/… :)

            – Ogglas
            Dec 28 '18 at 15:50







            Tricky! Glad everything worked out! If anyone else finds this thread here is some information about the dbo.__RefactorLog and refactorlog file. social.msdn.microsoft.com/Forums/en-US/… :)

            – Ogglas
            Dec 28 '18 at 15:50




















            draft saved

            draft discarded




















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53450150%2fpublish-of-database-project-fails-because-deployment-script-attempts-to-drop-and%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            "Incorrect syntax near the keyword 'ON'. (on update cascade, on delete cascade,)

            Alcedinidae

            Origin of the phrase “under your belt”?