Skip to content

Primitives tests failing in Visual Studio but not in CI #662

Open
@Arlodotexe

Description

@Arlodotexe

Describe the bug

This was found while investigating Fix: DockPanel measure fix #618

The tests in Primitives are failing when run in Visual Studio, but not when run in CI.

Message: 
Test method PrimitivesTests.Test_WrapPanel_BasicLayout.Test_WrapPanel_Normal_Horizontal threw exception: 
Microsoft.UI.Xaml.Markup.XamlParseException: The text associated with this error code could not be found.

The type 'WrapPanel' was not found. [Line: 5 Position: 25]

  Stack Trace: 
ExceptionHelpers.<ThrowExceptionForHR>g__Throw|38_0(Int32 hr)
ExceptionHelpers.ThrowExceptionForHR(Int32 hr)
IXamlReaderStaticsMethods.Load(IObjectReference _obj, String xaml)
XamlReader.Load(String xaml)
Test_WrapPanel_BasicLayout.<Test_WrapPanel_Normal_Horizontal>b__0_0()
<<EnqueueAsync>b__1>d.MoveNext()
--- End of stack trace from previous location ---
Test_WrapPanel_BasicLayout.Test_WrapPanel_Normal_Horizontal()
ThreadOperations.ExecuteWithAbortSafety(Action action)

Steps to reproduce

1. Open Primitives in the single-component solution using `./tooling/GenerateSingleSolution.ps1 -c Primitives`
2. Run the unit tests in Visual Studio and observe the failure

Expected behavior

Tests that were passing in the past should pass now.

Screenshots

Image

Code Platform

  • UWP
  • WinAppSDK / WinUI 3
  • Web Assembly (WASM)
  • Android
  • iOS
  • MacOS
  • Linux / GTK

Windows Build Number

  • Windows 10 1809 (Build 17763)
  • Windows 10 1903 (Build 18362)
  • Windows 10 1909 (Build 18363)
  • Windows 10 2004 (Build 19041)
  • Windows 10 20H2 (Build 19042)
  • Windows 10 21H1 (Build 19043)
  • Windows 10 21H2 (Build 19044)
  • Windows 10 22H2 (Build 19045)
  • Windows 11 21H2 (Build 22000)
  • Other (specify)

Other Windows Build number

No response

App minimum and target SDK version

  • Windows 10, version 1809 (Build 17763)
  • Windows 10, version 1903 (Build 18362)
  • Windows 10, version 1909 (Build 18363)
  • Windows 10, version 2004 (Build 19041)
  • Windows 10, version 2104 (Build 20348)
  • Windows 11, version 22H2 (Build 22000)
  • Other (specify)

Other SDK version

No response

Visual Studio Version

No response

Visual Studio Build Number

No response

Device form factor

No response

Additional context

No response

Help us help you

Yes, I'd like to be assigned to work on this item.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingregressionWhat was working is now broketesting 🏗

    Type

    No type

    Projects

    Status

    🆕 New

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions