Do not install SSDT (July 2015) RTM if you are publishing to Azure RRS feed

  • General discussion

  • I have run into a problem with the July 2015 RTM of SSDT that will make publishing to Azure SQL fail.

    You will get the following error message:

    Error	1	An exception occurred when deploying the database for the application.
    Could not deploy package.
    Error SQL72014: .Net SqlClient Data Provider: Msg 1468, Level 16, State 1, Line 1 The operation cannot be performed on database "TestApp" because it is involved in a database mirroring session or an availability group. Some operations are not allowed on a database that is participating in a database mirroring session or in an availability group.
    Error SQL72045: Script execution error.  The executed script:
    ALTER DATABASE [$(DatabaseName)]
    Error SQL72014: .Net SqlClient Data Provider: Msg 5069, Level 16, State 1, Line 1 ALTER DATABASE statement failed.
    Error SQL72045: Script execution error.  The executed script:
    ALTER DATABASE [$(DatabaseName)]
    	C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\LightSwitch\v4.5\Publish\v2.4\Microsoft.LightSwitch.Publish.targets	1565	10	TestApp

    I have submitted a connect item (1729150) and created a support request (115083113116407) for others to reference if they are having the same issue.

    Workaround from Connect Item:

    For VS2013
    •    Uninstall Microsoft SQL Server Data Tools 2013 [v12.50730.0]
    •    Uninstall Microsoft SQL Server data Tools - enu (12.50730.0) [v12.50730.0]
    •    Launch Visual Studio 2013 Setup, Select Modify, and Check SQL Server Data Tools

    For VS2015
    •    No workaround is available.

    • Edited by Ian E Monday, September 28, 2015 7:19 PM
    Wednesday, September 2, 2015 5:52 PM

All replies

  • I'm having the same problem but complicated by the fact that I'm working with a new Lightswitch application built solely in VS2015. The July 2015 SSDT is the baseline version, so I'm stuck making database changes manually at the moment.

    Friday, September 4, 2015 4:46 AM
  • Please go to the connect item and note that you are also having the problem.

    At this point, I believe the problem is caused by the new SSDT (July 2015 RTM) when using a Azure SQL V12 database server. You should be able to work around this by creating a new server. To do this in the old Azure portal go New -> SQL Database -> Custom Create. Make sure that you select New SQL database server before going to Step 2. On step 2 uncheck the "ENABLE LATEST SQL UPDATE (V12)". I am pretty sure that this should work for you.

    One other note DO NOT INSTALL Azure 2.7.1 !!!!!! This breaks the VS2015 Publish wizard and you will get an error message "Microsoft.Visualstudio.Azure.CommonTools.Utilities cannot be found".  

    I tried to post a warning in this forum but the moderator removed my post. It is also noted in Connect item (1729150).

    • Edited by Ian E Friday, September 4, 2015 3:51 PM
    Friday, September 4, 2015 3:50 PM
  • Thanks Ian. I have added my comment to the connect item, but sadly couldn't add any more data than you already provided, other than I can reproduce without fail in VS2015.
    Sunday, September 6, 2015 11:04 PM
  • I too am having this error.  I can not publish from VS2015 RTM to Azure, with the same exact errors listed by this post.  This is not a good problem to have.  Looking for any workarounds.

    Brian A. Lemaster Tecodo, Inc.

    Monday, September 28, 2015 6:55 PM
  • I can confirm that if you publish to a non-V12 Database, publishing a Lightswitch Application will work through Visual Studio 2015.  Just completed a publish and worked without an issue.

    Brian A. Lemaster Tecodo, Inc.

    Monday, September 28, 2015 7:05 PM
  • Any update on this for Visual Studio 2015?

    My SQL Azure database was recently upgraded automatically to V12 and now, when the lightswitch project is published, if the option to:

    "Publish Database Schema" is selected, I get this same error.

    I am therefore having to manually manage the changes in the SQL Azure database.

    Are there any updates to Visual Studio 2015 which address this?

    I am currently running Visual Studio 2015 14.0.2472.00 Update 1 and SQL Server Data Tools 14.0.50730.0


    Thursday, April 14, 2016 12:39 PM
  • This issue was resolved in the Office Developer Tools (ODT) for VS 2015 November release with no announcement :(

    I am currently using VS2015 Update 2 with ODT Update 2 and it works with all latest extensions (SSDT, Azure SDK 2.9 etc). It also works with Azure V12 database servers. Reminder, ODT Update 2 requires VS 2015 Update 2. ODT Update 2 can be installed using Web Platform Installer. Visual Studio Update 2 can be downloaded here.

    VS2013 will NOT be fixed ... you have to upgrade to VS2015.

    • Edited by Ian E Thursday, April 14, 2016 3:31 PM
    Thursday, April 14, 2016 2:55 PM
  • Thanks Ian,

    That's very helpful.


    Friday, April 15, 2016 4:38 PM