locked
No longer able to Publish

    Question

  • Upgraded to 2012 RC this morning and imported/upgraded my project from VS11 Beta. Debug works fine. But Publish does nothing.

    • Build | Publish
    • Right Click Project | Publish
    • Properties | Application Type | Publish

    All do absolutely nothing. Well, the screen flickers once. No errors or warnings. Cleaning the project and restarting VS do not seem to help. I am running the program as Administrator.

    Monday, June 04, 2012 7:00 PM

Answers

  • Thanks to @Brian Moore, I am now able to Publish again. What I needed to do was to create a new project in VS2012 RC and then copy the screens, UserCode, tables, and queries over. Here is what I did to accomplish this:

    I started a new project and attached my database. Then, for the Client and Server projects, I copied over the xml from the .lsml projects. Then I copied over my UserCode folders. For the Common project I did the same but it would not pick up on my UserCode. I had to create a folder in the Solution Explorer, copy over just the files, then use Add Existing Item. 

    After doing that, all my screens and queries were in the project and it built just fine. After exploring a bit (literally just working through the app and opening .vb files), the Common project broke because of some missing references but that was an easy fix. 

    Publishing also works just fine. The wizard deploys every time and I am able to change the settings. I had to recreate the Roles and Users but that was expected and a trivial fix.

    The app also could not find the images I had added to the project. They were showing up in File View but were dashed lines. Using Add Existing Item made the icons solid and the app could then pick up the references.

    • Marked as answer by kyle ls Friday, July 27, 2012 3:43 PM
    Friday, July 27, 2012 3:43 PM

All replies

  • can you describe your publish settings?

    are you doing package publish or live publish?  publishing to IIS or Azure?

    Monday, June 04, 2012 8:22 PM
  • Live publish to IIS on Localhost connected to SQL Server Express 2008 R2 SP1 also on Localhost.
    • Edited by kyle ls Monday, June 04, 2012 8:26 PM
    Monday, June 04, 2012 8:24 PM
  • Kyle - can you delete your .user file (i.e. rename it) and try republishing?

    Tuesday, June 05, 2012 7:25 PM
    Moderator
  • Which one? I have 18, seven of which are not part of the Backups.

    Tuesday, June 05, 2012 7:35 PM
  • The *.lsproj.user file for the project that is failing to show the publish wizard...

    Tuesday, June 05, 2012 7:57 PM
    Moderator
  • Renamed to aris_test.lsproj.user.old. A new one was created when I reopened VS. Clicking on Publish still does nothing.
    Tuesday, June 05, 2012 8:00 PM
  • I can confirm that there's a problem with OOB apps as well.

    Unable to publish LightSwitch OOB Appliactions after installing VS2012 RC


    Yann - LightSwitch Central - Click here for FREE Themes, Controls, Types and Commands
     
    If you find a reply helpful, please click "Vote as Helpful", if a reply answers your question, please click "Mark as Answer"
     
    By doing this you'll help people find answers faster.

    Wednesday, June 06, 2012 12:17 AM
  • I've found the beginnings of a solution. I was having trouble adding new tables as well. The answer to this post fixed that.

    It also allowed me to click the Publish button and the publish process started. What I mean by that is that the project started to build, but the Publish wizard did not appear.

    The publish failed with the error "The "DeploySchema" task was not given a value for the required parameter "ConnectionString""

    Since the Publish wizard did not appear, I am unable to modify the Connection String.

    Hopefully this gives you MS guys something more to go on. Look forward to hearing back from you.

    Wednesday, June 06, 2012 7:14 PM
  • Kyle - does this machine have both the beta and the RC on it?

    Also, do you remember what the publish settings you were using were (before you upgraded the project)?

    Thursday, June 07, 2012 8:21 PM
    Moderator
  • This is the path I took to upgrade VS:

    Machine originally had Visual Studio Lightswitch 2011 (V1 Standalone)

    Installed Visual Studio 11 Beta which left Lightswitch V1

    Installed Visual Studio 2012 RC which left Lightswitch V1 but used the "Pre-Clean Tool" to remove the Beta

    The Visual Studio 11 folder still exists in My Documents with all of my code and there is a new Visual Studio 2012 folder that I am currently working out of. Both the Beta and the RC installed to C:\Program Files\Microsoft Visual Studio 11.0 so I can't tell if the Beta still exists in there but I do not believe it does. The Visual Studio 11 folder still exists in my Start Menu but only contains the Microsoft Help Viewer and the Tools folder. I am no longer able to launch the Beta.

    Below is a screen shot of my Programs and Features window. The Beta does not seem to exist there either. The only duplicate I see is the Pre-Clean Tool.

    As for the Publish settings, could you be more specific as to what you are looking for? I should be able to pull any of the settings you are interested in from my old Lightswitch V1 fproject as I still have that installed and functional.

    Friday, June 08, 2012 1:03 PM
  • The settings you used to publish in the wizard e.g.

    - desktop or web

    - desktop, iis, azure for the server

    - create a package or publish now

    - create database or create a script

    - certificate on the XAP/Silverlight file

    Not, the values per se, but just which path you're using to publish...

    Friday, June 08, 2012 2:58 PM
    Moderator
    • Web
    • IIS on Localhost
    • Publish Now
    • I connect to an already created database in SQL Server 2008 R2 on Localhost. I created an administrator and a user in SQL Server that use SQL Server Authentication and are specified in the Connection Strings
    • No certificate has been specified

    • Edited by kyle ls Friday, June 08, 2012 3:04 PM
    Friday, June 08, 2012 3:03 PM
  • The error remains: 'The "DeploySchema" task was not given a value for the required parameter "ConnectionString".'

    When I click Publish, VS goes directly to trying to publish without running the Wizard. So I'm not able to specify a new connection string if the old one from my V1 project somehow got corrupted.

    I've tried deleting things at random to get the Wizard to run but that just broke things more. I finally went and uninstalled 2012 RC and all the leftovers from the Beta and re-installed. Same result. V1 remains untouched.

    What do I need to delete to make VS think that I've never Published before so that the Wizard will run?

    Wednesday, June 20, 2012 5:17 PM
  • Just a random guess, but can you try the solution found here: http://social.msdn.microsoft.com/Forums/en-US/LightSwitchDev11Beta/thread/7bfbf05d-9e4b-456b-ac43-7be5fb75b5fb. The cache folders may be out of date (or corrupted, at this point) and may need to be regenerated.

    Justin Anderson, LightSwitch Development Team

    Thursday, June 21, 2012 5:11 AM
    Moderator
  • I did that and mentioned it on 6/6. It did indeed help. Before the Publish button did nothing. After I deleted those cache folders, it would try to Publish (although not display the Wizard) but fail with the error mentioned above.
    Thursday, June 21, 2012 2:21 PM
  • I can confirm that a fresh install on a machine that hasn't had VS 11 Beta or RC (and also hasn't had VS 2010 on it either actually) on can publish just fine.

    So it seems that only a specific combination of VS versions that were installed before installing RC prevents publishing from working.


    Yann - LightSwitch Central - Click here for FREE Themes, Controls, Types and Commands
     
    If you find a reply helpful, please click "Vote as Helpful", if a reply answers your question, please click "Mark as Answer"
     
    By doing this you'll help people find answers faster.

    Friday, June 22, 2012 12:11 AM
  • Yann,

    Is that with a project that has been published on previous versions and has been converted by importing into RC? Or is that on a new project started in RC?

    I'm considering starting a new project in RC and seeing if I can publish that. If I can I would then try to copy over the screens, queries, and code from my existing project if such a thing is even possible.

    Friday, June 22, 2012 12:08 PM
  • Kyle - please do try publishing from a brand new RC project.  We've come across some repros where upgraded projects exhibit this behavior but haven't found the common denominator yet...  if you can publish from a new project, then you're probably running into what we're seeing (just no workaround yet).

    Friday, June 22, 2012 7:10 PM
    Moderator
  • Created a brand new project without any attached Data Sources. Just contained a simple screen with a single Local Property, a String containing the text "Hello World" displayed as a Text Box.

    Publishing Wizard came right up and I was able to deploy as a Web App. Confirmed working in IE, Firefox, and Chrome. Though from what I understand, attaching a Data Source would break Chrome functionality. Something to do with the OData interpretation in the RC.

    So, is it possible to copy over the screens, queries, and code from my existing project to a new project? Or would that break things further?

    I hope this helps you guys out. Let me know if you need any more data, logs, etc. Anything I can do to help.

    Friday, June 22, 2012 7:25 PM
  • Thanks Kyle, this does help us... unfortunately there's no easy way to copy screens from on proj to another... (so I'm probably not helping you).

    If you want to try a not-so-recommended workaround email me and we can try that offline.  bmoore at microsoft dot com

    Friday, June 22, 2012 7:53 PM
    Moderator
  • Thanks to @Brian Moore, I am now able to Publish again. What I needed to do was to create a new project in VS2012 RC and then copy the screens, UserCode, tables, and queries over. Here is what I did to accomplish this:

    I started a new project and attached my database. Then, for the Client and Server projects, I copied over the xml from the .lsml projects. Then I copied over my UserCode folders. For the Common project I did the same but it would not pick up on my UserCode. I had to create a folder in the Solution Explorer, copy over just the files, then use Add Existing Item. 

    After doing that, all my screens and queries were in the project and it built just fine. After exploring a bit (literally just working through the app and opening .vb files), the Common project broke because of some missing references but that was an easy fix. 

    Publishing also works just fine. The wizard deploys every time and I am able to change the settings. I had to recreate the Roles and Users but that was expected and a trivial fix.

    The app also could not find the images I had added to the project. They were showing up in File View but were dashed lines. Using Add Existing Item made the icons solid and the app could then pick up the references.

    • Marked as answer by kyle ls Friday, July 27, 2012 3:43 PM
    Friday, July 27, 2012 3:43 PM
  • It's great to hear that you finally got your situation sorted! Forklifting your screens etc to a new project seems a bit drastic though. I'd much rather find out what the problem actually is, though I appreciate you needed it to work, full stop.

    @Brian - from all I've seen & my own brief experience, it does seem to be upgraded projects that exhibit this problem. I saw a suggestion in a post a while back that sounded like it may have been a solution, but I wasn't using the RC any more, so I didn't get to try it out, & now I can't find the post.


    Yann - LightSwitch Central - Click here for FREE Themes, Controls, Types and Commands
     
    If you find a reply helpful, please click "Vote as Helpful", if a reply answers your question, please click "Mark as Answer"
     
    By doing this you'll help people find answers faster.

    Monday, July 30, 2012 2:27 PM
  • Thanks Yann - if you can find it that might be helpful...  I spent some time with Kyle trying to figure out the issue but I think we got to the point where we needed a look at his project and it would have taken a bit of effort on his part to "cleanse" the project for our review.  So if there is a simpler repro it sure would be good to have a look at...

    B-

    Monday, July 30, 2012 5:38 PM
    Moderator
  • Sure Brian, if I stumble across the thread I'll be sure to let you know. I don't even have V2 installed at the moment, so I can't even try to create a repro project. It can't be EVERY upgraded project though, or you'd be hearing from more people with the problem (or you would have easily found what was causing it).

    I only tried it with my major client application, & that would have originally been a B2 project (I think). I had the same problem with the VS 11 Beta, so I would have gone back to the project that was upgraded from B2 to RTM (if I remember right). I would have had the same problem as Kyle (needing to substantially cleanse it before I would have been allowed to send it to you).

    I understand only too well how hard it can be to "fix" something when you can't reproduce it consistently.


    Yann - LightSwitch Central - Click here for FREE Themes, Controls, Types and Commands
     
    If you find a reply helpful, please click "Vote as Helpful", if a reply answers your question, please click "Mark as Answer"
     
    By doing this you'll help people find answers faster.

    Wednesday, August 01, 2012 3:28 AM