Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Oct 30, 2025

MSBuild validates Include attribute syntax before evaluating conditions. When DesktopProjectFolder is empty (Desktop folder doesn't exist), the Include path becomes /**/*, causing build failures.

Changes

Modified Uno.SingleProject.Desktop.targets line 33:

<!-- Before -->
<_TargetPlatformFiles Include="$(DesktopProjectFolder)/**/*" Condition="Exists('$(DesktopProjectFolder)')"/>

<!-- After -->
<_TargetPlatformFiles Include="$(DesktopProjectFolder)/**/*" Condition="'$(DesktopProjectFolder)' != '' AND Exists('$(DesktopProjectFolder)')"/>

Added empty-string check to prevent evaluation when folder doesn't exist. Aligns with existing pattern used for platform folder handling in Uno.Common.targets lines 106-121.

Context

Unlike other platform folders (Android, iOS, MacCatalyst) which always have default values, DesktopProjectFolder is only set when the folder exists, making it the only platform folder that can be empty.

Related: dotnet/msbuild#9351

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • aka.ms
    • Triggering command: curl -I -sSL --retry 5 --retry-delay 2 --connect-timeout 15 REDACTED (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>The value "/**/*" of the "Include" attribute in element <ItemGroup> in file .nuget\packages\uno.sdk\5.2.161\targets\Uno.SingleProject.Desktop.targets</issue_title>
<issue_description>### Current behavior

Build error with:

The value "/**/*" of the "Include" attribute in element <ItemGroup> in 
file ".nuget\packages\uno.sdk\5.2.161\targets\Uno.SingleProject.Desktop.targets (33,25)" is a wildcard 
that results in enumerating all files on the drive, which was likely not intended. Check that referenced 
properties are always defined and that the project and current working directory are not at the drive root.

Expected behavior

Restore works

How to reproduce it (as minimally and precisely as possible)

No response

Workaround

Go to Uno.SingleProject.Desktop.targets file and modify lines

<_TargetPlatformFiles Include="$(DesktopProjectFolder)/**/*" />
<_AllPlatformFiles Include="$(PlatformsProjectFolder)/**/*" />

to remove the forward slashes

Works on UWP/WinUI

Yes

Environment

Uno.WinUI / Uno.WinUI.WebAssembly / Uno.WinUI.Skia

NuGet package version(s)

5.2.161

Affected platforms

Skia (WPF), Skia (Linux X11), Skia (macOS), Skia (Linux Framebuffer), Skia (GTK)

IDE

Visual Studio 2022

IDE version

17.10.3

Relevant plugins

No response

Anything else we need to know?

<_TargetPlatformFiles Include="$(DesktopProjectFolder)/**/*" />
<_AllPlatformFiles Include="$(PlatformsProjectFolder)/**/*" />

look wrong as

<DesktopProjectFolder Condition=" '$(DesktopProjectFolder)' != '' ">$([MSBuild]::EnsureTrailingSlash('$(DesktopProjectFolder)'))</DesktopProjectFolder>

already contains a slash</issue_description>

Comments on the Issue (you are @copilot in this section)

@jeromelaban Thanks for the report. Can you provide a repro? @jeromelaban Why would `DesktopProjectFolder` be empty? Are you changing its value explicitly? @jeromelaban If the path is empty, this will cause all sorts of other issues, such as including all files from the root of the project, which is not the intent of that line. If you can provide a binlog of the issue, it will still help. @jeromelaban Thanks. This is a very curious behavior and feels very familiar to https://github.com/dotnet/msbuild/issues/9351. Could you try moving your project to a very small path and see if it reproduces? @MartinZikmund @xperiandri is this still relevant or can be closed?

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI changed the title [WIP] Fix build error due to invalid Include attribute in targets file fix: Prevent invalid "/**/*" Include path when DesktopProjectFolder is empty Oct 30, 2025
Copilot AI requested a review from MartinZikmund October 30, 2025 10:17
Copilot finished work on behalf of MartinZikmund October 30, 2025 10:17
@unodevops
Copy link
Contributor

🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-21712/wasm-skia-net9/index.html

@unodevops
Copy link
Contributor

🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-21712/docs/index.html


<ItemGroup Condition="$(PlatformsProjectFolder) != '' and Exists($(PlatformsProjectFolder))">
<_TargetPlatformFiles Include="$(DesktopProjectFolder)/**/*" Condition="Exists('$(DesktopProjectFolder)')"/>
<_TargetPlatformFiles Include="$(DesktopProjectFolder)/**/*" Condition="'$(DesktopProjectFolder)' != '' AND Exists('$(DesktopProjectFolder)')"/>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is unlikely to fix the linked issue.

@nventive-devops
Copy link
Contributor

The build 180279 found UI Test snapshots differences: android-28-net9: 15, android-28-net9-Snap: 35, ios: 8, ios-Snap: 49, skia-linux-screenshots: 67, skia-windows-screenshots: 86, wasm: 101, wasm-automated-net10.0-WinUI-Benchmarks-automated: 0, wasm-automated-net10.0-WinUI-Default-automated: 10, wasm-automated-net10.0-WinUI-RuntimeTests-0: 0, wasm-automated-net10.0-WinUI-RuntimeTests-1: 0, wasm-automated-net10.0-WinUI-RuntimeTests-2: 0

Details
  • android-28-net9: 15 changed over 825

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • Popup_PlacementTest_3Default_HCVC_Uno_UI_Samples_Content_UITests_Popup_Popup_HVAlignments
    • When_ExtendedSelectionWithoutItemClick_Then_PointersEvents_UITests_Windows_UI_Xaml_Controls_ListView_ListView_Selection_Pointers
    • When_NoSelectionWithItemClick_Then_PointersEvents_UITests_Windows_UI_Xaml_Controls_ListView_ListView_Selection_Pointers
    • When_NoSelection_Then_PointersEvents_UITests_Windows_UI_Xaml_Controls_ListView_ListView_Selection_Pointers
    • When_MultipleSelectionWithoutItemClick_Then_PointersEvents_UITests_Windows_UI_Xaml_Controls_ListView_ListView_Selection_Pointers
    • UpDownEnabledTest_UITests_Shared_Microsoft_UI_Xaml_Controls_NumberBoxTests_NumberBoxPage
    • When_SingleSelectionWithoutItemClick_Then_PointersEvents_UITests_Windows_UI_Xaml_Controls_ListView_ListView_Selection_Pointers
    • Detereminate_ProgressRing_Validation75_[#FF0000_#008000_#008000_#008000]_Progress-Ring-Value-75
    • UpDownTest_UITests_Shared_Microsoft_UI_Xaml_Controls_NumberBoxTests_NumberBoxPage
    • DecimalFormatterTest_UITests_Shared_Microsoft_UI_Xaml_Controls_NumberBoxTests_NumberBoxPage
    • ProgressRing_Visibility_Collapsed_UITests_Windows_UI_Xaml_Controls_ProgressRing_WindowsProgressRing_GH1220
    • When_Parent_PointerMoved_After_drag_on_non-scrolling_ScrollViewer
    • When_Parent_PointerMoved_After_drag_on_ScrollViewer_-_touch
    • Detereminate_ProgressRing_Validation25_[#FF0000_#008000_#FF0000_#FF0000]_Progress-Ring-Value-25
    • ProgressRing_IsEnabled_Running_UITests_Windows_UI_Xaml_Controls_ProgressRing_WindowsProgressRing_GH1220
  • android-28-net9-Snap: 35 changed over 1075

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • SwipeControl_MUXControlsTestApp_SwipeControlPage2_MUXControlsTestApp_SwipeControlPage2
    • GridView_Uno_UI_Samples_Content_UITests_GridView_GridViewScrollIntoViewTest_Uno_UI_Samples_Content_UITests_GridView_GridViewScrollIntoViewTest
    • ListView_HorizontalListView_Padding_SamplesApp_Windows_UI_Xaml_Controls_ListView_HorizontalListView_Padding
    • Default_Uno_UI_Samples_Content_UITests_WebView_WebView_AnchorNavigation_Uno_UI_Samples_Content_UITests_WebView_WebView_AnchorNavigation
    • NavigationView_MUXControlsTestApp_NavigationViewRS4Page_MUXControlsTestApp_NavigationViewRS4Page
    • Icons_UITests_Shared_Windows_UI_Xaml_Controls_BitmapIconTests_BitmapIcon_Foreground_UITests_Shared_Windows_UI_Xaml_Controls_BitmapIconTests_BitmapIcon_Foreground
    • ListView_ListView_With_ListViews_Count_Measure_UITests_Shared_Windows_UI_Xaml_Controls_ListView_ListView_With_ListViews_Count_Measure
    • NavigationView_MUXControlsTestApp_NavigationViewTopNavOnlyPage_MUXControlsTestApp_NavigationViewTopNavOnlyPage
    • Gesture_Recognizer_Pointer_Events_test_bench_UITests_Shared_Windows_UI_Input_GestureRecognizer_PointersEvents
    • MediaPlayerElement_Mini_player_UITests_Shared_Windows_UI_Xaml_Controls_MediaPlayerElement_MediaPlayerElement_Minimal
    • Image_UITests_Windows_UI_Xaml_Controls_ImageTests_SvgImageSource_Basic_UITests_Windows_UI_Xaml_Controls_ImageTests_SvgImageSource_Basic
    • MUX_NumberBox_UITests_Shared_Microsoft_UI_Xaml_Controls_NumberBoxTests_NumberBoxPage
    • Image_Uno_UI_Samples_UITests_Image_Image_Stretch_Uno_UI_Samples_UITests_Image_Image_Stretch
    • ListView_ListViewSelectedItems_SamplesApp_Windows_UI_Xaml_Controls_ListView_ListViewSelectedItems
    • Scrolling_MUXControlsTestApp_ScrollViewDynamicPage_MUXControlsTestApp_ScrollViewDynamicPage
    • Scrolling_MUXControlsTestApp_ScrollViewKeyboardAndGamepadNavigationPage_MUXControlsTestApp_ScrollViewKeyboardAndGamepadNavigationPage
    • TeachingTip_UITests_Microsoft_UI_Xaml_Controls_TeachingTipTests_TeachingTipPage_UITests_Microsoft_UI_Xaml_Controls_TeachingTipTests_TeachingTipPage
    • Transform_Basics_UITests_Shared_Windows_UI_Xaml_Media_Transform_Basics
    • WebView_WebView_ChromeClient_Uno_UI_Samples_Content_UITests_WebView_WebView_ChromeClient
    • CommandBarFlyout_MUXControlsTestApp_CommandBarFlyoutPage_MUXControlsTestApp_CommandBarFlyoutPage
  • ios: 8 changed over 255

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • SequentialAnimations_SamplesApp_Windows_UI_Xaml_Media_Animation_SequentialAnimationsPage
    • ProgressRing_IsEnabled_Running_UITests_Windows_UI_Xaml_Controls_ProgressRing_WindowsProgressRing_GH1220
    • ImageStretch_None_Uno_UI_Samples_UITests_ImageTestsControl_Image_Stretch_None
    • ProgressRing_Visibility_Collapsed_UITests_Windows_UI_Xaml_Controls_ProgressRing_WindowsProgressRing_GH1220
    • ListView_SelectedItems_SamplesApp_Windows_UI_Xaml_Controls_ListView_ListViewSelectedItems
    • TextBox_UpdatedBinding_On_OneWay_Mode_UITests_Windows_UI_Xaml_Controls_TextBox_TextBox_Bindings
    • When_SingleSelectionWithoutItemClick_Then_PointersEvents_UITests_Windows_UI_Xaml_Controls_ListView_ListView_Selection_Pointers
    • Check_ListView_Swallows_Measure_UITests_Shared_Windows_UI_Xaml_Controls_ListView_ListView_With_ListViews_Count_Measure
  • ios-Snap: 49 changed over 992

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • ContentControl_ContentControl_Nested_TemplatedParent_Uno_UI_Samples_Content_UITests_ContentControlTestsControl_ContentControl_Nested_TemplatedParent
    • ListView_ListView_Aligned_Left_UITests_Shared_Windows_UI_Xaml_Controls_ListView_ListView_Aligned_Left
    • Pickers_TimePicker_TimePickerFlyoutStyle_UITests_Windows_UI_Xaml_Controls_TimePicker_TimePicker_TimePickerFlyoutStyle
    • Default_SamplesApp_Wasm_Windows_UI_Xaml_Controls_ListView_ListView_IsSelected_SamplesApp_Wasm_Windows_UI_Xaml_Controls_ListView_ListView_IsSelected
    • Brushes_BorderImageBrush_Uno_UI_Samples_UITests_ImageBrushTestControl_BorderImageBrush
    • NavigationView_FluentStyle_NavigationViewSample_SamplesApp_Samples_Microsoft_UI_Xaml_Controls_NavigationViewTests_FluentStyle_FluentStyle_NavigationViewSample
    • Brushes_Uno_UI_Samples_Samples_Shared_Content_UITests_ImageBrushInList_Uno_UI_Samples_Samples_Shared_Content_UITests_ImageBrushInList
    • ListView_ListView_With_ListViews_Count_Measure_UITests_Shared_Windows_UI_Xaml_Controls_ListView_ListView_With_ListViews_Count_Measure
    • TextBlock_UITests_Shared_Windows_UI_Xaml_Controls_TextBlockControl_TextBlock_Layout_UITests_Shared_Windows_UI_Xaml_Controls_TextBlockControl_TextBlock_Layout
    • Default_Uno_UI_Samples_UITests_Image_Image_UseTargetSize_Uno_UI_Samples_UITests_Image_Image_UseTargetSize
    • Image_Image_Stretch_None_Uno_UI_Samples_UITests_ImageTestsControl_Image_Stretch_None
    • Image_UITests_Shared_Windows_UI_Xaml_Controls_ImageTests_Image_Stretch_Algmnt_Inf_Horizontal_UITests_Shared_Windows_UI_Xaml_Controls_ImageTests_Image_Stretch_Algmnt_Inf_Horizontal
    • Performance_UITests_Windows_UI_Xaml_Performance_Performance_1000ButtonsContinuousRendering_UITests_Windows_UI_Xaml_Performance_Performance_1000ButtonsContinuousRendering
    • NavigationView_MUXControlsTestApp_NavigationViewCustomThemeResourcesPage_MUXControlsTestApp_NavigationViewCustomThemeResourcesPage
    • NavigationView_MUXControlsTestApp_NavigationViewMenuItemStretchPage_MUXControlsTestApp_NavigationViewMenuItemStretchPage
    • Brushes_Uno_UI_Samples_UITests_ImageBrushTestControl_DoubleImageBrushInList_Uno_UI_Samples_UITests_ImageBrushTestControl_DoubleImageBrushInList
    • ColorPicker_ColorPickerSample_UITests_Microsoft_UI_Xaml_Controls_ColorPickerTests_ColorPickerSample
    • Image_UITests_Shared_Windows_UI_Xaml_Controls_ImageTests_Image_Stretch_Algmnt_Inf_Vertical_UITests_Shared_Windows_UI_Xaml_Controls_ImageTests_Image_Stretch_Algmnt_Inf_Vertical
    • Image_UITests_Shared_Windows_UI_Xaml_Controls_ImageTests_Image_Stretch_Alignment_SizeOnControl_UITests_Shared_Windows_UI_Xaml_Controls_ImageTests_Image_Stretch_Alignment_SizeOnControl
    • Windowing_UITests_Windows_UI_Xaml_WindowTests_Window_SetBackground_UITests_Windows_UI_Xaml_WindowTests_Window_SetBackground
  • skia-linux-screenshots: 67 changed over 2296

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • Focus_FocusVisual_Properties.png-dark
    • Focus_FocusVisual_Properties.png
    • EllipsemaskingEllipseGrid.png-dark
    • EllipsemaskingEllipseGrid.png
    • Gamepad_CurrentReading.png-dark
    • Gamepad_CurrentReading.png
    • ImagesInlineInFlipView.png-dark
    • ImagesInlineInFlipView.png
    • ImageIconPage.png-dark
    • ImageIconPage.png
    • Buttons.png
    • ImageBrush_Stretch.png-dark
    • ImageBrush_Stretch.png
    • DoubleImageBrushInList.png-dark
    • DoubleImageBrushInList.png
    • Buttons.png-dark
    • ListViewSelectedItems.png-dark
    • ListViewSelectedItems.png
    • DisplayInformation.png-dark
    • DisplayInformation.png
  • skia-windows-screenshots: 86 changed over 2296

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • DoubleImageBrushInList.png-dark
    • DoubleImageBrushInList.png
    • Gamepad_Enumeration.png-dark
    • Examples.png
    • ButtonClippingTestsControl.png
    • Buttons.png-dark
    • ElevatedView_BorderThickness.png-dark
    • ElevatedView_BorderThickness.png
    • ButtonClippingTestsControl.png-dark
    • CalendarView_Theming.png-dark
    • Image_Fixed_Size_Alignment.png-dark
    • Image_Fixed_Size_Alignment.png
    • ImageBrushInList.png-dark
    • ImageBrushInList.png
    • ClipboardTests.png-dark
    • DropDownButtonPage.png-dark
    • ImageWithNoSpecificSize.png-dark
    • ImageWithNoSpecificSize.png
    • Gamepad_CurrentReading.png-dark
    • ImageWithLateSource.png-dark
  • wasm: 101 changed over 1056

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • UITests.Shared.Windows_UI_Xaml_Controls.TextBoxTests.TextBox_MaxLength
    • UITests.Windows_Devices.Midi.MidiDeviceInput
    • UITests.Windows_UI_Xaml_Controls.TextBox.TextBox_PlaceholderForeground
    • UITests.Shared.Windows_UI_Xaml_Controls.TextBoxTests.TextBox_BeforeTextChanging
    • UITests.Shared.Windows_UI_Xaml_Controls.TextBoxTests.TextBox_CharacterCasing
    • UITests.Windows_UI_Xaml_Controls.ImageTests.SvgImageSource_MultiLoad
    • UITests.Windows_UI_Xaml_Controls.TextBox.TextBox_Visibility
    • UITests.Windows_UI_Xaml_Controls.TextBox.TextBox_WithPadding_Focus
    • UITests.Windows_UI_Xaml_Controls.TextBox.TextBox_Wrap
    • Uno.UI.Samples.Content.UITests.ContentControlTestsControl.ContentControl_Inheritance
    • MUXControlsTestApp.SelectorBarPage
    • UITests.Microsoft_UI_Xaml_Controls.RadioButtonsTests.RadioButtonsBasicPage
    • UITests.Shared.Windows_UI_Xaml.xBindTests.xBind_Functions
    • UITests.Shared.Windows_UI_Xaml_Controls.Slider.Slider_Features
    • Uno.UI.Samples.Content.UITests.FocusTests.FocusManagerTest
    • UITests.Windows_UI_Xaml_Controls.ImageTests.BitmapImage_vs_SvgImageSource
    • UITests.Windows_UI_Xaml_Controls.TextBlockControl.TextBlock_IsTextSelectionEnabled
    • SamplesApp.Windows_UI_Xaml_Controls.ListView.ListViewIncrementalLoading
    • SamplesApp.Windows_UI_Xaml_Controls.ListView.ListView_WithFlipView
    • UITests.Shared.Windows_UI_Xaml.UIElementTests.TransformToVisual_Simple
  • wasm-automated-net10.0-WinUI-Benchmarks-automated: 0 changed over 1

  • wasm-automated-net10.0-WinUI-Default-automated: 10 changed over 877

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • Default_StrokeThickness_MyPolyline
    • When_ExtendedSelectionWithoutItemClick_Then_PointersEvents_UITests_Windows_UI_Xaml_Controls_ListView_ListView_Selection_Pointers
    • Default_StrokeThickness_MyPath
    • TestProgressRing_InitialState_UITests_Microsoft_UI_Xaml_Controls_ProgressRing_WinUIProgressRing_Features
    • Validate_Offscreen_Shapes_UITests_Windows_UI_Xaml_Shapes_Offscreen_Shapes
    • Default_StrokeThickness_MyRect
    • Default_StrokeThickness_MyPolygon
    • ListView_SelectedItems_SamplesApp_Windows_UI_Xaml_Controls_ListView_ListViewSelectedItems
    • Default_StrokeThickness_MyLine
    • Default_StrokeThickness_MyEllipse
  • wasm-automated-net10.0-WinUI-RuntimeTests-0: 0 changed over 1

  • wasm-automated-net10.0-WinUI-RuntimeTests-1: 0 changed over 1

  • wasm-automated-net10.0-WinUI-RuntimeTests-2: 0 changed over 1

@xperiandri
Copy link
Contributor

Was it fixed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The value "/**/*" of the "Include" attribute in element <ItemGroup> in file .nuget\packages\uno.sdk\5.2.161\targets\Uno.SingleProject.Desktop.targets

6 participants