%3CLINGO-SUB%20id%3D%22lingo-sub-316744%22%20slang%3D%22en-US%22%3EUWP%20APPX%20Deployment%20fails%20with%20'Deployment%20failed.%20XmlException'%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-316744%22%20slang%3D%22en-US%22%3E%0A%20%26lt%3Bmeta%20http-equiv%3D%22Content-Type%22%20content%3D%22text%2Fhtml%3B%20charset%3DUTF-8%22%20%2F%26gt%3B%3CSTRONG%3EFirst%20published%20on%20MSDN%20on%20Jun%2002%2C%202017%20%3C%2FSTRONG%3E%20%3CBR%20%2F%3E%20On%20the%20App%20Consult%20team%20we%20often%20work%20on%20several%20different%20applications%20in%20given%20day.%20The%20other%20day%20when%20using%20Visual%20Studio%202017%20to%20deploy%20a%20UWP%20app%20I%20got%20the%20following%20error%3A%20%3CBR%20%2F%3E%3CBLOCKQUOTE%3EDEP0600%3A%20Deployment%20failed.%20XmlException%20-%20Data%20at%20the%20root%20level%20is%20invalid.%20Line%2024%2C%20position%2011.%3C%2FBLOCKQUOTE%3E%3CBR%20%2F%3E%20After%20much%20debugging%20and%20Binging%2C%20an%20SDE%20pointed%20out%20that%20I%20was%20hitting%20a%20known%20bug%20in%20the%20OS%20-%20which%20will%20be%20fixed%20in%20the%20upcoming%20Fall%20Creators%20update.%20At%20install%20time%2C%20all%20of%20the%20installed%20package%20are%20enumerated%20to%20see%20if%20the%20package%20has%20already%20been%20installed.%20This%20enumeration%20fails%20if%20the%20%3CSTRONG%3E%20installed%20app's%20AppxManifest.xml%20file%20is%20malformed.%20%3C%2FSTRONG%3E%20%3CBR%20%2F%3E%20%3CBR%20%2F%3E%20I%20had%20several%20test%20apps%20installed%20on%20my%20machine%2C%20some%20deployed%20with%20Visual%20Studio%2C%20some%20installed%20with%20PowerShell%20using%20the%20command%3A%20%3CBR%20%2F%3E%3CBLOCKQUOTE%3EAdd-AppxPackage%20-Register%20.%5CPackageLayout%5CAppxManifest.xml%3C%2FBLOCKQUOTE%3E%3CBR%20%2F%3E%20After%20uninstalling%20several%20of%20the%20test%20apps%2C%20I%20was%20able%20to%20deploy%20my%20app%20with%20Visual%20Studio%202017%20without%20problems.%20%3CBR%20%2F%3E%20%3CBR%20%2F%3E%20%3CBR%20%2F%3E%20%3CBR%20%2F%3E%20Tip%3A%20Learn%20more%20about%20the%20Desktop%20Bridge%20from%20this%20excellent%20Microsoft%20Virtual%20Academy%20course%3A%20%3CA%20href%3D%22https%3A%2F%2Fmva.microsoft.com%2Fen-US%2Ftraining-courses%2F17373%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3E%20Developer's%20Guide%20to%20the%20Desktop%20Bridge%20%3C%2FA%3E%20.%20%3CBR%20%2F%3E%20%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-316744%22%20slang%3D%22en-US%22%3EFirst%20published%20on%20MSDN%20on%20Jun%2002%2C%202017%20On%20the%20App%20Consult%20team%20we%20often%20work%20on%20several%20different%20applications%20in%20given%20day.%3C%2FLINGO-TEASER%3E
Microsoft
First published on MSDN on Jun 02, 2017
On the App Consult team we often work on several different applications in given day. The other day when using Visual Studio 2017 to deploy a UWP app I got the following error:
DEP0600: Deployment failed. XmlException - Data at the root level is invalid. Line 24, position 11.

After much debugging and Binging, an SDE pointed out that I was hitting a known bug in the OS - which will be fixed in the upcoming Fall Creators update. At install time, all of the installed package are enumerated to see if the package has already been installed. This enumeration fails if the installed app's AppxManifest.xml file is malformed.

I had several test apps installed on my machine, some deployed with Visual Studio, some installed with PowerShell using the command:
Add-AppxPackage -Register .\PackageLayout\AppxManifest.xml

After uninstalling several of the test apps, I was able to deploy my app with Visual Studio 2017 without problems.



Tip: Learn more about the Desktop Bridge from this excellent Microsoft Virtual Academy course: Developer's Guide to the Desktop Bridge .