LightSwitch solution won't build when using Forms authentication. RRS feed

  • Question

  • I created a simple LightSwitch HTML Application from scratch.  I named it "Simple LS".  Then in the properties I changed the Access Control to Use Forms authentication.  I made no more changes than that.

    Try to Build, Rebuild or Clean and then Build or Rebuild the Solution, and it starts, but gives an error in the Error List.  The error is "An exception occurred when building the database for the application. Could not deploy package." but does not go into detail on what the exception was.  It lists the Project as Simple LS, and the file as Microsoft.LightSwitch.targets, on line 160 (which is the BuildSchema target).

    I have both SQL Server 2012 and SQL Server Express 2016 installed.  In VisualStudio under Options/Database Tools/Data Connections, the SQL Server Instance Name is "(LocalDB)\MSSQLLocalDB".  Opening it via the SQL Server Management Studio using Windows Authentication verifies that it is in the SQL Server Express 2016 server.

    Putting MSBuild in the path and then going to the root directory of the Simple LS solution and running msbuild does successfully build the whole solution. 
    • Edited by Kevin Rubin Friday, February 24, 2017 3:19 PM
    Friday, January 27, 2017 4:16 PM


  • After emailing back and forth a few times with Microsoft's technical support, the solution was to install Microsoft Office Development Tools for Visual Studio 2015.   Once that was installed, I was able to successfully build my LightSwitch project with Forms Authentication.

    • Marked as answer by Kevin Rubin Thursday, March 2, 2017 2:51 PM
    Thursday, March 2, 2017 2:50 PM