Why does adding a UWP Packaging Project to a working UWP/Project/Solution cause Debug errors and exceptions?

Groovykool 236 Reputation points
2020-04-07T18:45:19.49+00:00

Why does adding a UWP Packaging Project to my working UWP/Project/Solution cause Debug errors and exceptions?

Start with a working UWP Project in a solution.

Add a UWP Packaging Project to the solution.

Setup the packaging project as startup and add a reference to the UWP project.

Use the solution configuration manager to only deploy the Package Project.

Debug build.

The UWP project builds and runs.

But now I get the errors shown below. In addition XAML source paths like Source="/Styles/_Colors.xaml" are no longer valid?

Repo: https://github.com/groovykool/WTSTestExceptions.git

Thanks,
Tony


onecore\windows\directx\database\helperlibrary\lib\directxdatabasehelper.cpp(284)\dxgi.dll!61D2687D: (caller: 61D2613B) ReturnHr(1) tid(2bf8) 80070005 Access is denied.

onecoreuap\windows\wgi\winrt\display\displaycommon.cpp(411)\Windows.Graphics.dll!148744D2: (caller: 14874327) ReturnHr(1) tid(4be4) 80070490 Element not found.

onecoreuap\windows\wgi\winrt\display\displaycommon.cpp(411)\Windows.Graphics.dll!148744D2: (caller: 148741D6) ReturnHr(2) tid(4be4) 80070490 Element not found.

onecoreuap\windows\wgi\winrt\display\displaycommon.cpp(411)\Windows.Graphics.dll!148744D2: (caller: 14874327) ReturnHr(3) tid(4be4) 80070490 Element not found.

Exception thrown at 0x77B74192 (KernelBase.dll) in WTSTestExceptions.exe: WinRT originate error - 0x80070057 : '/Styles/_Colors.xaml is not a valid absolute URI.'.

Exception thrown at 0x77B74192 (KernelBase.dll) in WTSTestExceptions.exe: WinRT originate error - 0x80070057 : '/Styles/_FontSizes.xaml is not a valid absolute URI.'.

Exception thrown at 0x77B74192 (KernelBase.dll) in WTSTestExceptions.exe: WinRT originate error - 0x80070057 : '/Styles/_Thickness.xaml is not a valid absolute URI.'.

Exception thrown at 0x77B74192 (KernelBase.dll) in WTSTestExceptions.exe: WinRT originate error - 0x80070057 : '/Styles/TextBlock.xaml is not a valid absolute URI.'.

Exception thrown at 0x77B74192 (KernelBase.dll) in WTSTestExceptions.exe: WinRT originate error - 0x80070057 : '/Styles/Page.xaml is not a valid absolute URI.'.

onecoreuap\windows\wgi\winrt\display\displaycommon.cpp(411)\Windows.Graphics.dll!148744D2: (caller: 14874327) ReturnHr(4) tid(4be4) 80070490 Element not found.


Universal Windows Platform (UWP)
{count} vote

Accepted answer
  1. Richard Zhang-MSFT 6,936 Reputation points
    2020-04-09T01:32:13.033+00:00

    Hello,​

    Welcome to our Microsoft Q&A platform!

    Combined with our previous discussion, I conducted more follow-up tests.

    > '/Styles/_Colors.xaml is not a valid absolute URI.'.

    The reason for this problem is that the packager requires an absolute URI, so you can modify the resource dictionary reference path in App.xaml as:

    <ResourceDictionary Source="ms-appx:///Styles/_Colors.xaml">

    > (caller: 14874327) ReturnHr(1) tid(4be4) 80070490 Element not found.

    I reproduced this exception in the device with system 1909. When generating the PackTest project, the output window will display these error messages, although it does not affect the operation of the final application.

    Besides, when I run the project in the latest preview system (the future official version number is 2004), these error messages disappear.

    Thanks.

    3 people found this answer helpful.

0 additional answers

Sort by: Most helpful