Root element is missing when trying to Publish

久未见 提交于 2019-12-23 21:12:10

问题


It has been a while since I've published my app to Azure. During that time frame, I've upgraded my system from 32-bit to 64-bit meaning a fresh install of Windows and Visual Studio. And Visual Studio Update 3 came out and was applied. When I went to publish an update today, I received the following:

The following exception was thrown trying to publish: Root element is missing.

My web.config file looks fine so I don't think it's this issue.

The app works fine in debug mode so I don't think it's any of the .lsml files as is mentioned here.

And I tried this procedure to hand edit the .ls3proj file but it didn't seem to help.

I previously had an issue trying to publish when I upgraded from the standalone LightSwitch 2011 to Visual Studio 2012. I was able to overcome that issue using the method described in this thread.

Attempting to use this same method resulted in my new project has a full screen error saying "There are critical errors in the application definition metadata..." and 210 individual errors (max errors reached).

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." Which I do not understand at all.

I am able to publish a simple "Hello, world" style app to my Azure account.

What could be causing this? How can I get more information about exactly which element is causing the issue? The log produced by running devenv /log was not helpful.


回答1:


Matt Thalman was able to solve my problem over in the Microsoft Forums. The ServiceConfiguration.cscfg and ServiceDefinition.csdef were missing from the project when checked out of version control. Copying those over from a new project restored my ability to publish.



来源:https://stackoverflow.com/questions/19181580/root-element-is-missing-when-trying-to-publish

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!