locked
"Object reference not set..." error when trying to publish RRS feed

  • Question

  • When I try to publish my LS project from VS2012 I get the following with no error or any other information in the output window:


    Ordinarily I don't actually publish my apps as I use batch files to just xcopy from the bin/Release folder, but I want to try and publish as I'm getting getting the following error when I try and run my app on localhost after xcopy deploying the latest version of my OOB application:

    Any ideas?


    Xander

    • Edited by novascape Monday, August 27, 2012 4:05 AM
    Monday, August 27, 2012 3:09 AM

Answers

  • Try launching Web Platform Installer, search for VS 2012 and installing the feed:

    Windows Azure SDK for .NET (VS 2012) - June 2012 SP1

    Then re-launch Visual Studio and see if you still get the error.  If that doesn't help, try doing a repair on Visual Studio.  If neither of those help, let us know.


    David Kidder | Senior SDET | Microsoft | LightSwitch

    Saturday, November 17, 2012 5:01 AM
    Moderator

All replies

  • Sorry to ask the obvious, but did you uninstall the application before you tried to publish/install it?

    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, August 27, 2012 6:54 AM
    Moderator
  • Yes, I did try the uninstall a few times actually to overcome the second "An error occurred..." error above. No luck though.

    The publish "Object reference not set..." error happens immediately when you click the [Publish] button. The publish dialog does not come up at all and the publish location/target is unrelated to the localhost location that I'm running the OOB application from using the xcopy deployment.

    thanks


    Xander

    Monday, August 27, 2012 6:59 AM
  • I thought you would have, but it pays to ask & get told "yeah I've already done that", than "OMG I should have done that", lol.

    This is actually ringing a bell now. Was this project upgraded from 2011 to 2012? If so, this has been experienced by a few people, though nobody has been able to successfully figure out what's causing it. It only seems to affect a small number of people, which doesn't help tracking down the cause.

    I had some publishing problems the couple of times I tried giving VS 2012/LS V2 a go, but it wasn't like this though. Each time I've gone back to VS 2010/LS V1.


    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, August 27, 2012 9:52 AM
    Moderator
  • I am also getting this error message when I press the Publish button on the Application Type screen.  I have tried removing old versions of VS and re-installing VS2012 but it makes no difference.

    ----------

    Jonathan

    Saturday, October 6, 2012 4:26 PM
  • Thanks for logging this issue.

    Like Yann asked, is it possible your project has been upgraded from LightSwitch 2011? Or, did you ever have pre-release versions of LightSwitch/Visual Studio 2012 installed on the machine? Did you try installing the latest LightSwitch publish bits through Web Platform Installer?

    Finally, you could try these trouble-shooting steps:

    http://social.msdn.microsoft.com/Forums/en-US/lightswitch/thread/99ce68e8-52b1-4bd5-b298-7f9159d18ff7

    You should replace the "10.0" with "11.0" in the instructions.


    -- Mike

    Tuesday, October 16, 2012 11:28 PM
  • Thanks Mike,

    This is a new VS2012 LS project (so not upgraded), although it is part of a larger Solution that came from VS2010. I did have the VS2012 pre-release installed. Will look at the suggested link above.

    Thanks


    Xander

    Tuesday, October 16, 2012 11:35 PM
  • I have responded to the Connect bug that you have logged.  Posting the steps to try here as well:

    This error can occur if “Windows Azure Tools for Microsoft Visual Studio 2012 - June 2012 SP1” is not behaving correctly. Please attempt to Repair this component.

    Steps: Launch the "Run" window (Windows Key + R), enter "appwiz.cpl" and hit OK

    This will launch Control Panel\Programs\Programs and Features
    In the search box of the Programs and Features window, type "azure"
    The following entry should appear: “Windows Azure Tools for Microsoft Visual Studio 2012 - June 2012 SP1”
    Right-click the entry and choose "Change"
    When the "Windows Azure Tools - June 2012 SP1 Setup" window comes up, click "Repair"

    The repair will take several minutes to complete. Once it finishes, launch your LightSwitch project and attempt to publish.

    David Kidder | Senior SDET | Microsoft | LightSwitch

    • Proposed as answer by tinplate200 Wednesday, November 7, 2012 5:00 PM
    • Marked as answer by Dave KidderModerator Thursday, November 15, 2012 9:00 PM
    • Unmarked as answer by novascape Saturday, November 17, 2012 4:05 AM
    Friday, November 2, 2012 5:32 AM
    Moderator
  • That's fixed it - great, many thanks Jonathan
    Wednesday, November 7, 2012 5:00 PM
  • Hi,

    I've tried Dave's suggestion above but unfortunately I do not have anything *azure* related installed on my PC. Searching for "azure" in the "programs and features" box brings up nothing.

    I've unproposed the marked as answer post as it did not solve it for me.

    Have also deleted the following folders without luck:

    %LOCALAPPDATA%\Microsoft\VisualStudio\11.0\ComponentModelCache
    %LOCALAPPDATA%\Microsoft\VisualStudio\11.0\ManifestCache

    Regards


    Xander

    • Edited by novascape Saturday, November 17, 2012 4:22 AM
    Saturday, November 17, 2012 4:07 AM
  • Try launching Web Platform Installer, search for VS 2012 and installing the feed:

    Windows Azure SDK for .NET (VS 2012) - June 2012 SP1

    Then re-launch Visual Studio and see if you still get the error.  If that doesn't help, try doing a repair on Visual Studio.  If neither of those help, let us know.


    David Kidder | Senior SDET | Microsoft | LightSwitch

    Saturday, November 17, 2012 5:01 AM
    Moderator