locked
Root element is missing when trying to Publish RRS feed

Answers

  • For some reason you are missing some required files in your project folder.  The two files are named ServiceConfiguration.cscfg and ServiceDefinition.csdef and they should be located at the root of your project folder (next to your .lsxproj file).  Either one or both of those files must be missing in your case.  To replace the missing file(s), create a temporary new LightSwitch project and copy its ServiceConfiguration.cscfg and/or ServiceDefinition.csdef files from its root folder.
    Friday, October 11, 2013 8:10 PM

All replies

  • Using the method I used here: http://social.msdn.microsoft.com/Forums/vstudio/en-US/7bcdee0f-046d-48b8-9584-6411f64dbcb1/no-longer-able-to-publish

    to create a new project and copy the screen and query data over did not work as before. My new project has a full screen error saying "There are critical errors in the application definition metadata..." and 210 individual errors.

    The first error, "Cannot create unknown type '{http://schemas.microsoft.com/LightSwitch/2010/xaml/model}GlobalAttributeGroup'." Doesn't make sense because that line in the .lsml is identical from the old project to the new project.

    The second error, "Could not find any application definition in the project." I do not understand at all.

    Anyone have any bright ideas on how to fix this so that I can publish again?

    Thursday, October 3, 2013 6:18 PM
  • I've opened a Connect bug and cross posted at StackOverflow because I need a to get this resolved quickly. If anyone has any ideas, please let me know.
    Friday, October 4, 2013 12:50 PM
  • I have the same problem as you, I published my app 2 weeks ago in the Visual Studio 2013 RC and everything was fine until now, i realize my app cant be published with my new features :/

    • I try to Clean all my project then Rebuild.
    • I copied the lsxproj.user files from the last version published in Azure but didnt work.

    When i try to publish this appears:


    Friday, October 4, 2013 3:52 PM
  • Hi,

    Since deploy to Azure involving many steps and you could easily miss one step or do something wrong, I think we could look into this issue first, we can check how to configure a Web Server to Host LightSwitch Applications and deploy a LightSwitch Application to Azure.

    Regards


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Tuesday, October 8, 2013 8:21 AM
  • Angie,

    I mentioned in the Connect report but haven't mentioned here yet that I am able to deploy a new project to Azure just fine. It's only an old project that was originally created with the Standalone LightSwitch 2011 and which has been through each of the Visual Studio upgrades that is unable to be published.

    Do you know of any way to get more detail on the exception so that I can determine exactly which file is having the issue? I've tried looking at the Windows event logs and running "devenv /log" but neither give me any more information.

    Tuesday, October 8, 2013 1:27 PM
  • In order to diagnose the "Root element is missing" error, could you attempt to get a stack trace of the error by following the instructions here: http://blogs.msdn.com/b/mthalman/archive/2013/08/16/how-to-get-a-stack-trace-in-lightswitch.aspx.  Be sure to open the publish wizard by clicking the publish button on the properties window as was shown in the animated GIF earlier in this thread.  That will avoid a few extraneous exceptions.  You may run into exceptions prior to getting the "Root element is missing" exception so just continue past those until you hit the "Root element is missing" one.  Provide the stack trace in a reply post.  Thanks.
    Friday, October 11, 2013 2:43 PM
  • For anyone else that is attempting to do this, the article seems to be out of date. "Attach to Process" is not under the Tools menu, it's under Debug. And trying to debug one instance of VS with another is confusing. So I recommend just starting up once instance of VS, then opening the Task Manager, right clicking on devenv.exe and selecting Debug to open a new instance of VS.

    After clicking on publish, the debugging instance of VS gives 3 exceptions, all the same:

    First-chance exception at 0x760DC41F (KernelBase.dll) in devenv.exe: 0xE0434352 (parameters: 0x80131940, 0x00000000, 0x00000000, 0x00000000, 0x74A50000).

    Breaking on any of the three brings up a "No Symbols Loaded" page with the following information:

    wkernelbase.pdb not loaded

    wkernelbase.pdb contains the debug information required to find the source for hte module KernelBase.dll

    Module Information
    Version: 6.1.7601.18229 (win7sp1_gdr.130801-1533)
    Original Location C:\Windows\SysWOW64\KernelBase.dll

    C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\wkernelbase.pdb: Cannot find or open the PDB file.
    C:\Windows\SysWOW64\wkernelbase.pdb: Cannot find or open the PDB file.
    wkernelbase.pdb: Cannot find or open the PDB file.
    C:\windows\wkernelbase.pdb: Cannot find or open the PDB file.
    C:\windows\symbols\dll\wkernelbase.pdb: Cannot find or open the PDB file.
    C:\windows\dll\wkernelbase.pdb: Cannot find or open the PDB file.
    C:\Users\Kyle\AppData\Local\Temp\SymbolCache\wkernelbase.pdb\864b511e61824938a1d55f7dd1cec4101\wkernelbase.pdb: Cannot find or open the PDB file.
    C:\Users\Kyle\AppData\Local\Temp\SymbolCache\MicrosoftPublicSymbols\wkernelbase.pdb\864b511e61824938a1d55f7dd1cec4101\wkernelbase.pdb: Cannot find or open the PDB file.
    C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\wkernelbase.pdb: Cannot find or open the PDB file.
    SYMSRV:  C:\Users\Kyle\AppData\Local\Temp\SymbolCache\wkernelbase.pdb\864B511E61824938A1D55F7DD1CEC4101\wkernelbase.pdb not found


    SYMSRV:  http://msdl.microsoft.com/download/symbols/wk/wkernelbase.pdb/864B511E61824938A1D55F7DD1CEC4101/wkernelbase.pdb not found


    http://msdl.microsoft.com/download/symbols: Symbols not found on symbol server.

    Where can I get a copy of wkernelbase.pdb so that I can continue debugging this?


    • Edited by kyle ls Friday, October 11, 2013 6:39 PM
    Friday, October 11, 2013 6:39 PM
  • Selecting Debug from Task Manager will attach to the process with the native debugging engine.  You only want the managed debugging engine.  The exception you're seeing is a native exception and not the information that is needed to diagnose the problem.  Just manually attach to the devenv.exe process as described in the blog post.  That describes how to set things up the way they should be.  Again, continue past all exceptions except the "Root element is missing" one.
    Friday, October 11, 2013 6:50 PM
  • Ahh...I see. I had an extra instance of VS running so I saw two instances of devenv.exe in the process list so I thought the debugging instance was seeing itself. That's where I got confused.

    I got a couple of exceptions. I'll put them each in separate posts to break them up and make it a little easier to read.

    Friday, October 11, 2013 7:20 PM
  • First was this:

    System.NullReferenceException occurred
      HResult=-2147467261
      Message=Object reference not set to an instance of an object.
      Source=Microsoft.VisualStudio.Shell.UI.Internal
      StackTrace:
           at Microsoft.VisualStudio.PlatformUI.HierarchyExpansions.UpdateItemExpansionsState(IVirtualizingTreeNode rootNode, String currentBaseHierarchy)
      InnerException: 

    Stack trace:

    > Microsoft.VisualStudio.Shell.UI.Internal.dll!Microsoft.VisualStudio.PlatformUI.HierarchyExpansions.UpdateItemExpansionsState(Microsoft.Internal.VisualStudio.PlatformUI.IVirtualizingTreeNode rootNode, string currentBaseHierarchy) + 0x23d bytes
      Microsoft.VisualStudio.Shell.UI.Internal.dll!Microsoft.VisualStudio.PlatformUI.HierarchyExpansions.UpdateExpansionsState(System.Collections.Generic.IEnumerable<Microsoft.Internal.VisualStudio.PlatformUI.IVirtualizingTreeNode> rootNodes) + 0xcb bytes
      Microsoft.VisualStudio.Shell.UI.Internal.dll!Microsoft.VisualStudio.PlatformUI.HierarchyNavigatorPaneBase<Microsoft.VisualStudio.PlatformUI.SolutionPivotNavigator>.StoreExpansionState.AnonymousMethod__1() + 0x109 bytes
      Microsoft.VisualStudio.Shell.11.0.dll!Microsoft.VisualStudio.ErrorHandler.CallWithCOMConvention.AnonymousMethod__0() + 0xb bytes
      Microsoft.VisualStudio.Shell.11.0.dll!Microsoft.VisualStudio.ErrorHandler.CallWithCOMConvention(System.Func<int> method, bool reportError, bool setShellErrorInfo) + 0x34 bytes
      Microsoft.VisualStudio.Shell.11.0.dll!Microsoft.VisualStudio.ErrorHandler.CallWithCOMConvention(System.Action method, bool reportError) + 0x55 bytes
      Microsoft.VisualStudio.Shell.UI.Internal.dll!Microsoft.VisualStudio.PlatformUI.HierarchyNavigatorPaneBase<Microsoft.VisualStudio.PlatformUI.SolutionPivotNavigator>.StoreExpansionState(string stateName, Microsoft.VisualStudio.Shell.Interop.IVsHierarchy hierarchy) + 0x6b bytes
      Microsoft.VisualStudio.Shell.UI.Internal.dll!Microsoft.VisualStudio.PlatformUI.SolutionNavigatorPane.WriteUserOptions.AnonymousMethod__26() + 0x2c bytes
      Microsoft.VisualStudio.Shell.11.0.dll!Microsoft.VisualStudio.ErrorHandler.CallWithCOMConvention.AnonymousMethod__0() + 0xb bytes
      Microsoft.VisualStudio.Shell.11.0.dll!Microsoft.VisualStudio.ErrorHandler.CallWithCOMConvention(System.Func<int> method, bool reportError, bool setShellErrorInfo) + 0x34 bytes
      Microsoft.VisualStudio.Shell.11.0.dll!Microsoft.VisualStudio.ErrorHandler.CallWithCOMConvention(System.Action method, bool reportError) + 0x55 bytes
      Microsoft.VisualStudio.Shell.UI.Internal.dll!Microsoft.VisualStudio.PlatformUI.SolutionNavigatorPane.WriteUserOptions(Microsoft.VisualStudio.OLE.Interop.IStream pOptionsStream, string pszKey) + 0x4b bytes
      [Native to Managed Transition]
      [Managed to Native Transition]
      Microsoft.VisualStudio.Shell.UI.Internal.dll!Microsoft.VisualStudio.PlatformUI.SolutionNavigatorPane.SaveUserOptions(Microsoft.VisualStudio.Shell.Interop.IVsSolutionPersistence pPersistence) + 0x13 bytes
      [Native to Managed Transition]
      [Managed to Native Transition]
      Microsoft.LightSwitch.Design.Package.dll!Microsoft.LightSwitch.VisualStudioIntegration.DesignerPackage.VSProjectModelService.StartPublish() + 0x27 bytes
      [Native to Managed Transition]
      [Managed to Native Transition]
      mscorlib.dll!System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(System.Runtime.Remoting.Messaging.IMessage msg) + 0x1e7 bytes
      mscorlib.dll!System.Runtime.Remoting.Messaging.ServerObjectTerminatorSink.SyncProcessMessage(System.Runtime.Remoting.Messaging.IMessage reqMsg) + 0x64 bytes
      mscorlib.dll!System.Runtime.Remoting.Lifetime.LeaseSink.SyncProcessMessage(System.Runtime.Remoting.Messaging.IMessage msg) + 0x1e bytes
      mscorlib.dll!System.Runtime.Remoting.Messaging.ServerContextTerminatorSink.SyncProcessMessage(System.Runtime.Remoting.Messaging.IMessage reqMsg) + 0x85 bytes
      mscorlib.dll!System.Runtime.Remoting.Channels.CrossContextChannel.SyncProcessMessageCallback(object[] args) + 0x94 bytes
      mscorlib.dll!System.Threading.Thread.CompleteCrossContextCallback(System.Threading.InternalCrossContextDelegate ftnToCall, object[] args) + 0x8 bytes
      [Native to Managed Transition]
      [Managed to Native Transition]
      mscorlib.dll!System.Runtime.Remoting.Channels.CrossContextChannel.SyncProcessMessage(System.Runtime.Remoting.Messaging.IMessage reqMsg) + 0x99 bytes
      mscorlib.dll!System.Runtime.Remoting.Channels.ChannelServices.SyncDispatchMessage(System.Runtime.Remoting.Messaging.IMessage msg) + 0x8c bytes
      mscorlib.dll!System.Runtime.Remoting.Channels.CrossAppDomainSink.DoDispatch(byte[] reqStmBuff, System.Runtime.Remoting.Messaging.SmuggledMethodCallMessage smuggledMcm, out System.Runtime.Remoting.Messaging.SmuggledMethodReturnMessage smuggledMrm) + 0xe6 bytes
      mscorlib.dll!System.Runtime.Remoting.Channels.CrossAppDomainSink.DoTransitionDispatchCallback(object[] args) + 0x80 bytes
      mscorlib.dll!System.Threading.Thread.CompleteCrossContextCallback(System.Threading.InternalCrossContextDelegate ftnToCall, object[] args) + 0x8 bytes
      [Appdomain Transition]
      mscorlib.dll!System.Runtime.Remoting.Channels.CrossAppDomainSink.DoTransitionDispatch(byte[] reqStmBuff, System.Runtime.Remoting.Messaging.SmuggledMethodCallMessage smuggledMcm, out System.Runtime.Remoting.Messaging.SmuggledMethodReturnMessage smuggledMrm) + 0x74 bytes
      mscorlib.dll!System.Runtime.Remoting.Channels.CrossAppDomainSink.SyncProcessMessage(System.Runtime.Remoting.Messaging.IMessage reqMsg) + 0x94 bytes
      mscorlib.dll!System.Runtime.Remoting.Proxies.RemotingProxy.CallProcessMessage(System.Runtime.Remoting.Messaging.IMessageSink ms, System.Runtime.Remoting.Messaging.IMessage reqMsg, System.Runtime.Remoting.Contexts.ArrayWithSize proxySinks, System.Threading.Thread currentThread, System.Runtime.Remoting.Contexts.Context currentContext, bool bSkippingContextChain) + 0x50 bytes
      mscorlib.dll!System.Runtime.Remoting.Proxies.RemotingProxy.InternalInvoke(System.Runtime.Remoting.Messaging.IMethodCallMessage reqMcmMsg, bool useDispatchMessage, int callType) + 0x1cc bytes
      mscorlib.dll!System.Runtime.Remoting.Proxies.RemotingProxy.Invoke(System.Runtime.Remoting.Messaging.IMessage reqMsg) + 0x66 bytes
      mscorlib.dll!System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(ref System.Runtime.Remoting.Proxies.MessageData msgData, int type) + 0xea bytes
      Microsoft.LightSwitch.Design.Core.Internal.dll!Microsoft.LightSwitch.DesignTimeHosting.Implementation.ProjectModelServiceProxy.StartPublish() + 0xc bytes
      Microsoft.LightSwitch.Design.Designer.Internal.dll!Microsoft.LightSwitch.Designers.AppDesigner.Implementation.Models.GeneralProperties.GeneralPropertiesRootViewModel.PublishSettingsCommandViewModel.Execute() + 0xc bytes
      Microsoft.LightSwitch.Design.Designer.Internal.dll!Microsoft.LightSwitch.Designers.AppDesigner.Implementation.Models.CommandViewModel.Execute(object parameter) + 0xb bytes
      Microsoft.LightSwitch.Design.Designer.Internal.dll!Microsoft.LightSwitch.Designers.AppDesigner.Implementation.Models.CommandViewModel<object>.System.Windows.Input.ICommand.Execute(object parameter) + 0x52 bytes
      PresentationFramework.dll!MS.Internal.Commands.CommandHelpers.CriticalExecuteCommandSource(System.Windows.Input.ICommandSource commandSource, bool userInitiated) + 0x9f bytes
      PresentationFramework.dll!System.Windows.Controls.Primitives.ButtonBase.OnClick() + 0x44 bytes
      PresentationFramework.dll!System.Windows.Controls.Button.OnClick() + 0x45 bytes
      PresentationFramework.dll!System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(System.Windows.Input.MouseButtonEventArgs e) + 0x84 bytes
      PresentationCore.dll!System.Windows.UIElement.OnMouseLeftButtonUpThunk(object sender, System.Windows.Input.MouseButtonEventArgs e) + 0x59 bytes
      PresentationCore.dll!System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(System.Delegate genericHandler, object genericTarget) + 0x2c bytes
      PresentationCore.dll!System.Windows.RoutedEventArgs.InvokeHandler(System.Delegate handler, object target) + 0x33 bytes
      PresentationCore.dll!System.Windows.RoutedEventHandlerInfo.InvokeHandler(object target, System.Windows.RoutedEventArgs routedEventArgs) + 0x44 bytes
      PresentationCore.dll!System.Windows.EventRoute.InvokeHandlersImpl(object source, System.Windows.RoutedEventArgs args, bool reRaised) + 0x1a8 bytes
      PresentationCore.dll!System.Windows.UIElement.ReRaiseEventAs(System.Windows.DependencyObject sender, System.Windows.RoutedEventArgs args, System.Windows.RoutedEvent newEvent) + 0x108 bytes
      PresentationCore.dll!System.Windows.UIElement.OnMouseUpThunk(object sender, System.Windows.Input.MouseButtonEventArgs e) + 0xc7 bytes
      PresentationCore.dll!System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(System.Delegate genericHandler, object genericTarget) + 0x2c bytes
      PresentationCore.dll!System.Windows.RoutedEventArgs.InvokeHandler(System.Delegate handler, object target) + 0x33 bytes
      PresentationCore.dll!System.Windows.RoutedEventHandlerInfo.InvokeHandler(object target, System.Windows.RoutedEventArgs routedEventArgs) + 0x44 bytes
      PresentationCore.dll!System.Windows.EventRoute.InvokeHandlersImpl(object source, System.Windows.RoutedEventArgs args, bool reRaised) + 0x1a8 bytes
      PresentationCore.dll!System.Windows.UIElement.RaiseEventImpl(System.Windows.DependencyObject sender, System.Windows.RoutedEventArgs args) + 0x73 bytes
      PresentationCore.dll!System.Windows.UIElement.RaiseTrustedEvent(System.Windows.RoutedEventArgs args) + 0x3d bytes
      PresentationCore.dll!System.Windows.UIElement.RaiseEvent(System.Windows.RoutedEventArgs args, bool trusted) + 0x40 bytes
      PresentationCore.dll!System.Windows.Input.InputManager.ProcessStagingArea() + 0x1f8 bytes
      PresentationCore.dll!System.Windows.Input.InputManager.ProcessInput(System.Windows.Input.InputEventArgs input) + 0x45 bytes
      PresentationCore.dll!System.Windows.Input.InputProviderSite.ReportInput(System.Windows.Input.InputReport inputReport) + 0x62 bytes
      PresentationCore.dll!System.Windows.Interop.HwndMouseInputProvider.ReportInput(System.IntPtr hwnd, System.Windows.Input.InputMode mode, int timestamp, System.Windows.Input.RawMouseActions actions, int x, int y, int wheel) + 0x272 bytes
      PresentationCore.dll!System.Windows.Interop.HwndMouseInputProvider.FilterMessage(System.IntPtr hwnd, MS.Internal.Interop.WindowMessage msg, System.IntPtr wParam, System.IntPtr lParam, ref bool handled) + 0x3f4 bytes
      PresentationCore.dll!System.Windows.Interop.HwndSource.InputFilterMessage(System.IntPtr hwnd, int msg, System.IntPtr wParam, System.IntPtr lParam, ref bool handled) + 0x6c bytes
      WindowsBase.dll!MS.Win32.HwndWrapper.WndProc(System.IntPtr hwnd, int msg, System.IntPtr wParam, System.IntPtr lParam, ref bool handled) + 0x9b bytes
      WindowsBase.dll!MS.Win32.HwndSubclass.DispatcherCallbackOperation(object o) + 0x6b bytes
      WindowsBase.dll!System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate callback, object args, int numArgs) + 0x56 bytes
      WindowsBase.dll!MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(object source, System.Delegate method, object args, int numArgs, System.Delegate catchHandler) + 0x3a bytes
      WindowsBase.dll!System.Windows.Threading.Dispatcher.LegacyInvokeImpl(System.Windows.Threading.DispatcherPriority priority, System.TimeSpan timeout, System.Delegate method, object args, int numArgs) + 0x10e bytes
      WindowsBase.dll!MS.Win32.HwndSubclass.SubclassWndProc(System.IntPtr hwnd, int msg, System.IntPtr wParam, System.IntPtr lParam) + 0xf1 bytes
      [Appdomain Transition]

    Friday, October 11, 2013 7:21 PM
  • Then I got an exception that wouldn't let me copy the detail or print a stack trace. It said:

    Could not load file or assembly 'Microsoft.VisualStudio.WindowsAzure.XmlSerializers, Version=1.8.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.

    Friday, October 11, 2013 7:22 PM
  • Then I received:

    System.Xml.XmlException occurred
      HResult=-2146232000
      Message=Root element is missing.
      Source=System.Xml
      LineNumber=0
      LinePosition=0
      SourceUri=""
      StackTrace:
           at System.Xml.XmlTextReaderImpl.Throw(Exception e)
      InnerException: 

    Stack trace:

    > System.Xml.dll!System.Xml.XmlTextReaderImpl.Throw(System.Exception e) + 0x46 bytes
      System.Xml.dll!System.Xml.XmlTextReaderImpl.ParseDocumentContent() + 0x48e bytes
      System.Xml.dll!System.Xml.XmlTextReaderImpl.Read() + 0xd8 bytes
      System.Xml.Linq.dll!System.Xml.Linq.XDocument.Load(System.Xml.XmlReader reader, System.Xml.Linq.LoadOptions options) + 0x2d bytes
      System.Xml.Linq.dll!System.Xml.Linq.XDocument.Parse(string text, System.Xml.Linq.LoadOptions options) + 0x54 bytes
      System.Xml.Linq.dll!System.Xml.Linq.XDocument.Parse(string text) + 0x7 bytes
      Microsoft.LightSwitch.Design.Publish.Internal.v1.8.dll!Microsoft.LightSwitch.Publish.Provider.Wizard.RemoteDesktopConfig.RemoteDesktopConfig(Microsoft.LightSwitch.Publish.Provider.Wizard.IPublishWizardDialogContext dialogContext) + 0x1b4 bytes
      Microsoft.LightSwitch.Design.Publish.Internal.v1.8.dll!Microsoft.LightSwitch.Publish.Provider.Wizard.AzureConfigurationWizardPage.AzureConfigurationWizardPage(Microsoft.LightSwitch.Publish.Provider.Wizard.IPublishWizardDialogContext context) + 0x286 bytes
      Microsoft.LightSwitch.Design.Publish.Internal.v1.8.dll!Microsoft.LightSwitch.Publish.Provider.Wizard.v1_8.AzureConfigurationWizardPageFactory.Microsoft.LightSwitch.Publish.Provider.Wizard.v1_8.IPublishWizardPageFactory.CreatePage(Microsoft.LightSwitch.Publish.Provider.Wizard.IPublishWizardDialogContext context) + 0x38 bytes
      Microsoft.LightSwitch.Design.Publish.Internal.v1.8.dll!Microsoft.LightSwitch.Publish.Provider.Wizard.PublishWizardDialogContext.get_Pages.AnonymousMethod__8(Microsoft.LightSwitch.Publish.Provider.Wizard.v1_8.IPublishWizardPageFactory factory) + 0x2b bytes
      System.Core.dll!System.Linq.Enumerable.WhereSelectListIterator<Microsoft.LightSwitch.Publish.Provider.Wizard.v1_8.IPublishWizardPageFactory,Microsoft.LightSwitch.Publish.Provider.Wizard.IPublishWizardPage>.MoveNext() + 0x69 bytes
      System.Core.dll!System.Linq.Enumerable.ToDictionary<Microsoft.LightSwitch.Publish.Provider.Wizard.IPublishWizardPage,string,Microsoft.LightSwitch.Publish.Provider.Wizard.IPublishWizardPage>(System.Collections.Generic.IEnumerable<Microsoft.LightSwitch.Publish.Provider.Wizard.IPublishWizardPage> source, System.Func<Microsoft.LightSwitch.Publish.Provider.Wizard.IPublishWizardPage,string> keySelector, System.Func<Microsoft.LightSwitch.Publish.Provider.Wizard.IPublishWizardPage,Microsoft.LightSwitch.Publish.Provider.Wizard.IPublishWizardPage> elementSelector, System.Collections.Generic.IEqualityComparer<string> comparer) + 0x101 bytes
      System.Core.dll!System.Linq.Enumerable.ToDictionary<Microsoft.LightSwitch.Publish.Provider.Wizard.IPublishWizardPage,string>(System.Collections.Generic.IEnumerable<Microsoft.LightSwitch.Publish.Provider.Wizard.IPublishWizardPage> source, System.Func<Microsoft.LightSwitch.Publish.Provider.Wizard.IPublishWizardPage,string> keySelector, System.Collections.Generic.IEqualityComparer<string> comparer) + 0x5b bytes
      Microsoft.LightSwitch.Design.Publish.Internal.v1.8.dll!Microsoft.LightSwitch.Publish.Provider.Wizard.PublishWizardDialogContext.Pages.get() + 0x13e bytes
      Microsoft.LightSwitch.Design.Publish.Internal.v1.8.dll!Microsoft.LightSwitch.Publish.Provider.Wizard.PublishWizardDialogContext.UpdateNavigationEntries(Microsoft.LightSwitch.Publish.Provider.Wizard.IPublishWizardNavigationEntry parent, System.Collections.Generic.IEnumerable<Microsoft.LightSwitch.Publish.Provider.Wizard.IPublishWizardConfigItem> newItems, System.Collections.Generic.IList<Microsoft.LightSwitch.Publish.Provider.Wizard.IPublishWizardNavigationEntry> entries) + 0x4f5 bytes
      Microsoft.LightSwitch.Design.Publish.Internal.v1.8.dll!Microsoft.LightSwitch.Publish.Provider.Wizard.PublishWizardDialogContext.UpdateNavigationEntries(Microsoft.LightSwitch.Publish.Provider.Wizard.IPublishWizardConfig newConfig) + 0x60 bytes
      Microsoft.LightSwitch.Design.Publish.Internal.v1.8.dll!Microsoft.LightSwitch.Publish.Provider.Wizard.PublishWizardDialogContext.RetrieveConfiguration() + 0xbc bytes
      Microsoft.LightSwitch.Design.Publish.Internal.v1.8.dll!Microsoft.LightSwitch.Publish.Provider.Wizard.PublishWizardDialogContext.PublishWizardDialogContext(Microsoft.LightSwitch.Publish.Provider.IPublishProperties properties, System.Version publishVersion, string webConfigPath, string projectFolder, string projectName) + 0x424 bytes
      Microsoft.LightSwitch.Design.Publish.Internal.v1.8.dll!Microsoft.LightSwitch.Publish.Provider.PublishWizardProxy.ShowDialog(Microsoft.LightSwitch.Publish.Provider.PublishProperties publishProperties, System.Version version, string webConfigPath, string projectFolder, string projectName, Microsoft.LightSwitch.AppBridge.Internal.AppBridgeServiceId designerAppBridgeServiceId, out Microsoft.LightSwitch.Publish.Provider.PublishProperties resultProperties) + 0x145 bytes
      [Native to Managed Transition]
      [Managed to Native Transition]
      mscorlib.dll!System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(System.Runtime.Remoting.Messaging.IMessage msg) + 0x1e7 bytes
      mscorlib.dll!System.Runtime.Remoting.Messaging.ServerObjectTerminatorSink.SyncProcessMessage(System.Runtime.Remoting.Messaging.IMessage reqMsg) + 0x64 bytes
      mscorlib.dll!System.Runtime.Remoting.Lifetime.LeaseSink.SyncProcessMessage(System.Runtime.Remoting.Messaging.IMessage msg) + 0x1e bytes
      mscorlib.dll!System.Runtime.Remoting.Messaging.ServerContextTerminatorSink.SyncProcessMessage(System.Runtime.Remoting.Messaging.IMessage reqMsg) + 0x85 bytes
      mscorlib.dll!System.Runtime.Remoting.Channels.CrossContextChannel.SyncProcessMessageCallback(object[] args) + 0x94 bytes
      mscorlib.dll!System.Threading.Thread.CompleteCrossContextCallback(System.Threading.InternalCrossContextDelegate ftnToCall, object[] args) + 0x8 bytes
      [Native to Managed Transition]
      [Managed to Native Transition]
      mscorlib.dll!System.Runtime.Remoting.Channels.CrossContextChannel.SyncProcessMessage(System.Runtime.Remoting.Messaging.IMessage reqMsg) + 0x99 bytes
      mscorlib.dll!System.Runtime.Remoting.Channels.ChannelServices.SyncDispatchMessage(System.Runtime.Remoting.Messaging.IMessage msg) + 0x8c bytes
      mscorlib.dll!System.Runtime.Remoting.Channels.CrossAppDomainSink.DoDispatch(byte[] reqStmBuff, System.Runtime.Remoting.Messaging.SmuggledMethodCallMessage smuggledMcm, out System.Runtime.Remoting.Messaging.SmuggledMethodReturnMessage smuggledMrm) + 0xe6 bytes
      mscorlib.dll!System.Runtime.Remoting.Channels.CrossAppDomainSink.DoTransitionDispatchCallback(object[] args) + 0x80 bytes
      mscorlib.dll!System.Threading.Thread.CompleteCrossContextCallback(System.Threading.InternalCrossContextDelegate ftnToCall, object[] args) + 0x8 bytes
      [Appdomain Transition]
      mscorlib.dll!System.Runtime.Remoting.Channels.CrossAppDomainSink.DoTransitionDispatch(byte[] reqStmBuff, System.Runtime.Remoting.Messaging.SmuggledMethodCallMessage smuggledMcm, out System.Runtime.Remoting.Messaging.SmuggledMethodReturnMessage smuggledMrm) + 0x74 bytes
      mscorlib.dll!System.Runtime.Remoting.Channels.CrossAppDomainSink.SyncProcessMessage(System.Runtime.Remoting.Messaging.IMessage reqMsg) + 0x94 bytes
      mscorlib.dll!System.Runtime.Remoting.Proxies.RemotingProxy.CallProcessMessage(System.Runtime.Remoting.Messaging.IMessageSink ms, System.Runtime.Remoting.Messaging.IMessage reqMsg, System.Runtime.Remoting.Contexts.ArrayWithSize proxySinks, System.Threading.Thread currentThread, System.Runtime.Remoting.Contexts.Context currentContext, bool bSkippingContextChain) + 0x50 bytes
      mscorlib.dll!System.Runtime.Remoting.Proxies.RemotingProxy.InternalInvoke(System.Runtime.Remoting.Messaging.IMethodCallMessage reqMcmMsg, bool useDispatchMessage, int callType) + 0x1cc bytes
      mscorlib.dll!System.Runtime.Remoting.Proxies.RemotingProxy.Invoke(System.Runtime.Remoting.Messaging.IMessage reqMsg) + 0x66 bytes
      mscorlib.dll!System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(ref System.Runtime.Remoting.Proxies.MessageData msgData, int type) + 0xea bytes
      Microsoft.LightSwitch.Design.Publish.Internal.v1.8.dll!Microsoft.LightSwitch.Publish.Provider.v1_8.PublishProvider.ShowWizard() + 0x79c bytes
      Microsoft.LightSwitch.Design.Package.dll!Microsoft.LightSwitch.VSIntegration.Project.RootProject.PublishableProjectConfig.ShowPublishPrompt(out int pfcontinue) + 0x42 bytes
      [Native to Managed Transition]

    Friday, October 11, 2013 7:23 PM
  • Then another similar one:

    System.Xml.XmlException occurred
      HResult=-2146232000
      Message=Root element is missing.
      Source=System.Xml
      LineNumber=0
      LinePosition=0
      SourceUri=""
      StackTrace:
        Server stack trace: 
           at System.Xml.XmlTextReaderImpl.Throw(Exception e)
           at System.Xml.XmlTextReaderImpl.ParseDocumentContent()
           at System.Xml.XmlTextReaderImpl.Read()
           at System.Xml.Linq.XDocument.Load(XmlReader reader, LoadOptions options)
           at System.Xml.Linq.XDocument.Parse(String text, LoadOptions options)
           at System.Xml.Linq.XDocument.Parse(String text)
           at Microsoft.LightSwitch.Publish.Provider.Wizard.RemoteDesktopConfig..ctor(IPublishWizardDialogContext dialogContext)
           at Microsoft.LightSwitch.Publish.Provider.Wizard.AzureConfigurationWizardPage..ctor(IPublishWizardDialogContext context)
           at Microsoft.LightSwitch.Publish.Provider.Wizard.v1_8.AzureConfigurationWizardPageFactory.Microsoft.LightSwitch.Publish.Provider.Wizard.v1_8.IPublishWizardPageFactory.CreatePage(IPublishWizardDialogContext context)
           at Microsoft.LightSwitch.Publish.Provider.Wizard.PublishWizardDialogContext.<get_Pages>b__8(IPublishWizardPageFactory factory)
           at System.Linq.Enumerable.WhereSelectListIterator`2.MoveNext()
           at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable`1 source, Func`2 keySelector, Func`2 elementSelector, IEqualityComparer`1 comparer)
           at System.Linq.Enumerable.ToDictionary[TSource,TKey](IEnumerable`1 source, Func`2 keySelector, IEqualityComparer`1 comparer)
           at Microsoft.LightSwitch.Publish.Provider.Wizard.PublishWizardDialogContext.get_Pages()
           at Microsoft.LightSwitch.Publish.Provider.Wizard.PublishWizardDialogContext.UpdateNavigationEntries(IPublishWizardNavigationEntry parent, IEnumerable`1 newItems, IList`1 entries)
           at Microsoft.LightSwitch.Publish.Provider.Wizard.PublishWizardDialogContext.UpdateNavigationEntries(IPublishWizardConfig newConfig)
           at Microsoft.LightSwitch.Publish.Provider.Wizard.PublishWizardDialogContext.RetrieveConfiguration()
           at Microsoft.LightSwitch.Publish.Provider.Wizard.PublishWizardDialogContext..ctor(IPublishProperties properties, Version publishVersion, String webConfigPath, String projectFolder, String projectName)
           at Microsoft.LightSwitch.Publish.Provider.PublishWizardProxy.ShowDialog(PublishProperties publishProperties, Version version, String webConfigPath, String projectFolder, String projectName, AppBridgeServiceId designerAppBridgeServiceId, PublishProperties& resultProperties)
           at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Object[]& outArgs)
           at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg)
        Exception rethrown at [0]: 
           at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
      InnerException: 

    Full stack trace:

    > mscorlib.dll!System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(System.Runtime.Remoting.Messaging.IMessage reqMsg, System.Runtime.Remoting.Messaging.IMessage retMsg) + 0xf8 bytes
      mscorlib.dll!System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(ref System.Runtime.Remoting.Proxies.MessageData msgData, int type) + 0x151 bytes
      Microsoft.LightSwitch.Design.Publish.Internal.v1.8.dll!Microsoft.LightSwitch.Publish.Provider.v1_8.PublishProvider.ShowWizard() + 0x79c bytes
      Microsoft.LightSwitch.Design.Package.dll!Microsoft.LightSwitch.VSIntegration.Project.RootProject.PublishableProjectConfig.ShowPublishPrompt(out int pfcontinue) + 0x42 bytes
      [Native to Managed Transition]


    Friday, October 11, 2013 7:25 PM
  • And finally:

    System.IO.IOException occurred

    Stack trace:

    > System.Core.dll!System.IO.Pipes.NamedPipeServerStream.CheckConnectOperationsServer() + 0xa1 bytes
      System.Core.dll!System.IO.Pipes.NamedPipeServerStream.BeginWaitForConnection(System.AsyncCallback callback, object state) + 0x12 bytes
      Microsoft.LightSwitch.Design.Internal.dll!Microsoft.LightSwitch.AppBridge.Implementation.PipeChannel.PipeChannel.BeginReceiveLoop() + 0xe7 bytes
      Microsoft.LightSwitch.Design.Internal.dll!Microsoft.LightSwitch.AppBridge.Implementation.PipeChannel.PipeChannel.ReadCompletedCallback(System.IAsyncResult ar) + 0x2db bytes
      System.Core.dll!System.IO.Pipes.PipeStreamAsyncResult.CallUserCallbackWorker(object callbackState) + 0x25 bytes
      mscorlib.dll!System.Threading.QueueUserWorkItemCallback.WaitCallback_Context(object state) + 0x3e bytes
      mscorlib.dll!System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx) + 0xa7 bytes
      mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx) + 0x16 bytes
      mscorlib.dll!System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem() + 0x60 bytes
      mscorlib.dll!System.Threading.ThreadPoolWorkQueue.Dispatch() + 0x149 bytes
      mscorlib.dll!System.Threading._ThreadPoolWaitCallback.PerformWaitCallback() + 0x5 bytes
      [Native to Managed Transition]
      [Appdomain Transition]
      [Native to Managed Transition]

    Friday, October 11, 2013 7:26 PM
  • For some reason you are missing some required files in your project folder.  The two files are named ServiceConfiguration.cscfg and ServiceDefinition.csdef and they should be located at the root of your project folder (next to your .lsxproj file).  Either one or both of those files must be missing in your case.  To replace the missing file(s), create a temporary new LightSwitch project and copy its ServiceConfiguration.cscfg and/or ServiceDefinition.csdef files from its root folder.
    Friday, October 11, 2013 8:10 PM
  • Thats the solution, Matt thank you so much, finally i can to deploy my app to azure
    Friday, October 11, 2013 8:23 PM
  • That would be it. Now to find out why git missed them. Thanks for your help!
    • Edited by kyle ls Friday, October 11, 2013 8:45 PM
    Friday, October 11, 2013 8:45 PM
  • Have the same issue, occured after upgrade from 2012 update 4 to 2013, IIS on premises.

    Seems that this files are not included in the solution (and tfs).

    Moreover file diagnostics.wadcfg should be added as well


    Sergey Vdovin



    Monday, February 17, 2014 3:41 PM
  • It's helped me. I think because we didn't have this files in source control. Thanks a lot!
    Wednesday, December 17, 2014 3:41 PM