locked
Hangs at 'Publish' RRS feed

  • Question

  • I have a very simple Lightswitch application which is using existing data on a 2005 SQL instance.  When I attempt to Publish it, the application hangs at the 'Publishing Project' screen.  The bar continues to go, but the 'Cancel' is grayed out and it is not using any resources.

    I tried leaving it for a day with still no change.  I also tried the suggestion of renaming the .user file and trying again.  This had it rebuild the project, but still not changes.

    Currently I am trying to Publish as a 'Create a package on disk'.  I am currently using the Trial of Lightswitch.

    Wednesday, November 2, 2011 6:55 PM

Answers

  • Hello,

    Reinstallation didn't help.  What I ended up doing is published as a desktop app (which worked), deleted the contents of the publish folder, then published again as a WEB app.  It worked!  Not sure what the deal was.

    JDM

    Thursday, November 10, 2011 11:42 PM

All replies

  • Can you turn on diagnostic build output (Tools : Options : Projects and Solutions : Build and Run) and reply back with the latest couple of lines in the output window? If you are using the LightSwitch profile, make sure you check the "Show all settings" option in the dialog.

     

    Thanks!


    -- Mike
    Thursday, November 3, 2011 6:31 PM
  • Same Problem here.  I can't copy/paste the last lines in the output window because the app hangs.  Does all the verbose build logging get written to a file somewhere?  If so, I can't find it.  I'm going to try and reinstall VS Lightswitch and see if the problem goes away.

    Once again, I can build a solution just not "publish" it.

     

    Thanks

    JDM

    Thursday, November 10, 2011 8:42 PM
  • Re-installed VS Lightswitch and no change.  Suddenly I just cant publish my app.  While I can't copy and paste the last few lines of the output window, I can attach a screen shot:

    Thursday, November 10, 2011 9:23 PM
  • Hello,

    Reinstallation didn't help.  What I ended up doing is published as a desktop app (which worked), deleted the contents of the publish folder, then published again as a WEB app.  It worked!  Not sure what the deal was.

    JDM

    Thursday, November 10, 2011 11:42 PM
  • We have identified an issue when packaging an IIS site with "Update existing database" selected.  This reproduces when using a connection string which does not have db admin privileges to generate the script.  Please try again with this permission and let me know if it continues.

    Erik - LightSwitch QA


    This posting is provided "AS IS" with no warranties, and confers no rights.

    Wednesday, March 28, 2012 12:47 AM
  • We have identified an issue when packaging an IIS site with "Update existing database" selected.  This reproduces when using a connection string which does not have db admin privileges to generate the script.  Please try again with this permission and let me know if it continues.

    Erik - LightSwitch QA

    I tried that, and it worked for me.  Publish is now successful.

    Being new at this, let me tell others like me exactly what I did:

    Open SQL Server Management Studio, and connect to the local server, where I have the existing database from having published my package the first time, when publishing the first version of my app.

    Go to Security \ Logins

    Right click on the user that has admin rights to your database in your live environment.

    Click "Properties"

    In the Login Properties Page, go to "Server Roles"

    Make sure "sysadmin" is selected.

    Click OK

    Now publish your package using this user and this user's password in your connection string.




    Tuesday, April 24, 2012 3:18 AM
  •  Hi Erik,

    I have the same issue with SQL 2012. My publishing options are:

    Publishing Lightswitch app as Desktop app., Create a script file to install db.

    Generate a new database option works fine.

    Update existing database option hangs on Task "PublishSchema". I've tried to use Windows authentication. Did not work. I've tried to use SQL server authentication, the same result. My windows user account has sysadmin, public and dbcreator roles. My sql server auth. user has all those roles as well. User mappings for both have public and db_owner checked. I've tried sa account in a connection string and got the same result. I can connect to DB from SSMS using any of those accounts fine (Windows auth. logging, SQL server auth. logging using sa user or my own user with sysadmin rights). Checked all forums and see no way out of it. My client waiting for update for the Lightswitch app, but I am stuck with update script. Any suggestions?

    Thank you.
    Tuesday, May 29, 2012 5:40 AM
  • Hey Chepuxa -

    If you were to make a schema change to your database through the LightSwtich entity designer, and then during publish you tried to update an existing database that contained data in it, then your publish scenario is expected to fail early on and give you an error message.  However, we've identified an issue where during package deployment where the publish scenario doesn't fail until your database is attempted to be updated. 

    I'm curious what "state" your SQL Database is in that is being updated?  Does it say that it is in "Single User Mode" perhaps?

    Thanks,

    Matt Sampson


    R. Matt Sampson

    Tuesday, May 29, 2012 2:58 PM
  • Hi Matt,

    My database is in ONLINE state. I am trying to build an update script, but stuck there, no errors.

    In the database properties RestrictAccess shows MULTI_USER

    Thanks.

    Tuesday, May 29, 2012 9:01 PM
  • Chepuxa -

    Are you using Visual Studio 2010? Or the new Visual Studio 11 Beta?

    If you are using 2010, I assume you are publishing to SQL 2012, but you aren't "attached" to any SQL 2012 databases?

    Also have you made any schema changes to your database in your LightSwitch application? And does your database contain existing data in it?

    Thx  Matt S


    R. Matt Sampson

    Friday, June 1, 2012 9:07 PM
  • Matt,

    Yes, I am using VS 2010 and SQLExpress 2012. The reason I need an update script to be generated that yes, I've made changes (added couple of new fields) to my internal database in Lightswitch. In my publish screen I was pointing to a database on a local server without those fields, so comparing what is missing will generate an update script.

    And yes, my local database has data in it (internal LS database and local SQL 2012 database).  To move forward right now I added those fields manually and running publish as a new database option, but moving forward I would like an Update option to get resolved if more complex changes will require an update of the existing database.

    Tank you

    Sunday, June 3, 2012 12:45 AM
  • Hi, Chepuxa!

    I think I had the same problem today updating an existing database. (I could not generate a script to update my datatbase. LightSweetch crashed)

    I solved it using SQL Express Management Studio and checking 'sysadmin' (Login Properties) for the User that LightSwitch will use to access the SQL Server (in my case: SQL Server 2005).

    I hope this helps you.

    Best regards,


    Ciro


    • Edited by Oric.CQ Friday, June 22, 2012 1:35 AM
    Friday, June 22, 2012 1:32 AM
  • Hi Ciro,

    I have all that plus DBCREATOR checked

    Thank you.

    Friday, June 22, 2012 5:19 AM
  • I had the same problem today. In the end all I needed to do was connect to the publish location in windows explorer and it stopped hanging and published.

    I was publishing via a VPN if it helps anyone else

    Tuesday, September 15, 2015 6:40 AM