Trying to build Maui repository

David Foley 81 Reputation points
2022-09-24T13:44:22.83+00:00

Setting up for contributing to Net Maui Repository.
I was following the steps to build and run the .NET MAUI repository from source as described in Development.md. However the build failed because my PC didnt have ‘UAP 10.0.20348.0’. I am guessing this is the win 10 SDK. I am running on Windows 11. How can I fix this to continue building Maui?

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
2,862 questions
{count} votes

Accepted answer
  1. Rob Caplan - MSFT 5,412 Reputation points Microsoft Employee
    2022-09-28T19:20:06.077+00:00

    For help with building MAUI itself please ask in the MAUI repository. Q&A is for help with building apps with MAUI, not with building the MAUI framework.

    To the specific question of the Windows 10 SDK, you can install and use it on Windows 11 and it can be used to create apps and libraries which run on both Windows 10 and Windows 11. The older SDK won't have access to newer features, but can be used to build to the older minimum target.

    20348 should be available at https://go.microsoft.com/fwlink/?linkid=2164145 or from the VS installer (caveat: I don't have a Windows machine handy to confirm)

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. David Foley 81 Reputation points
    2022-09-28T17:58:52.59+00:00

    I am running windows 11 on an Intel 12th Gen Intel(R) Core(TM) i9-12900K 3.20 GHz based PC. I have Microsoft Visual Studio Community 2022 (64-bit) - Preview Version 17.4.0 Preview 2.1.
    I have not installed the windows 11 version 22H2 update yet..
    I have forked the dotnet/maui github repository. Per the Development.md, I ran
    dotnet tool restore
    dotnet cake --target=VS
    I tried again today and it completed with the following warnings and error (it did start VS and showed 107712 Errors).
    Here are the last lines of the CLI cake listed above:

    Build FAILED.

    D:\Dev\GitHub\maui\bin\dotnet\sdk\6.0.402\Microsoft.Common.CurrentVersion.targets(43,3): warning MSB4011: "C:\Users\Dav
    id Foley.nuget\packages\microsoft.windowsappsdk\1.1.4\buildTransitive\Microsoft.Build.Msix.props" cannot be imported a
    gain. It was already imported at "C:\Users\David Foley.nuget\packages\microsoft.windowsappsdk\1.1.4\buildTransitive\Mi
    crosoft.WinUI.props (25,3)". This is most likely a build authoring error. This subsequent import will be ignored. [D:\D
    ev\GitHub\maui\src\Controls\src\Xaml\Controls.Xaml.csproj]
    D:\Dev\GitHub\maui\bin\dotnet\sdk\6.0.402\Microsoft.Common.CurrentVersion.targets(43,3): warning MSB4011: "C:\Users\Dav
    id Foley.nuget\packages\microsoft.windowsappsdk\1.1.4\buildTransitive\Microsoft.Build.Msix.props" cannot be imported a
    gain. It was already imported at "C:\Users\David Foley.nuget\packages\microsoft.windowsappsdk\1.1.4\buildTransitive\Mi
    crosoft.WinUI.props (25,3)". This is most likely a build authoring error. This subsequent import will be ignored. [D:\D
    ev\GitHub\maui\src\Controls\src\Xaml\Controls.Xaml.csproj]
    D:\Dev\GitHub\maui\bin\dotnet\sdk\6.0.402\Microsoft.Common.CurrentVersion.targets(43,3): warning MSB4011: "C:\Users\Dav
    id Foley.nuget\packages\microsoft.windowsappsdk\1.1.4\buildTransitive\Microsoft.Build.Msix.props" cannot be imported a
    gain. It was already imported at "C:\Users\David Foley.nuget\packages\microsoft.windowsappsdk\1.1.4\buildTransitive\Mi
    crosoft.WinUI.props (25,3)". This is most likely a build authoring error. This subsequent import will be ignored. [D:\D
    ev\GitHub\maui\src\Graphics\src\Graphics.Win2D\Graphics.Win2D.csproj]
    D:\Dev\GitHub\maui\bin\dotnet\sdk\6.0.402\Microsoft.Common.CurrentVersion.targets(43,3): warning MSB4011: "C:\Users\Dav
    id Foley.nuget\packages\microsoft.windowsappsdk\1.1.4\buildTransitive\Microsoft.Build.Msix.props" cannot be imported a
    gain. It was already imported at "C:\Users\David Foley.nuget\packages\microsoft.windowsappsdk\1.1.4\buildTransitive\Mi
    crosoft.WinUI.props (25,3)". This is most likely a build authoring error. This subsequent import will be ignored. [D:\D
    ev\GitHub\maui\src\Graphics\src\Graphics.Win2D\Graphics.Win2D.csproj]
    D:\Dev\GitHub\maui\bin\dotnet\sdk\6.0.402\Microsoft.Common.CurrentVersion.targets(43,3): warning MSB4011: "C:\Users\Dav
    id Foley.nuget\packages\microsoft.windowsappsdk\1.1.4\buildTransitive\Microsoft.Build.Msix.props" cannot be imported a
    gain. It was already imported at "C:\Users\David Foley.nuget\packages\microsoft.windowsappsdk\1.1.4\buildTransitive\Mi
    crosoft.WinUI.props (25,3)". This is most likely a build authoring error. This subsequent import will be ignored. [D:\D
    ev\GitHub\maui\src\Core\src\Core.csproj]
    D:\Dev\GitHub\maui\bin\dotnet\sdk\6.0.402\Microsoft.Common.CurrentVersion.targets(43,3): warning MSB4011: "C:\Users\Dav
    id Foley.nuget\packages\microsoft.windowsappsdk\1.1.4\buildTransitive\Microsoft.Build.Msix.props" cannot be imported a
    gain. It was already imported at "C:\Users\David Foley.nuget\packages\microsoft.windowsappsdk\1.1.4\buildTransitive\Mi
    crosoft.WinUI.props (25,3)". This is most likely a build authoring error. This subsequent import will be ignored. [D:\D
    ev\GitHub\maui\src\Core\src\Core.csproj]
    D:\Dev\GitHub\maui\bin\dotnet\sdk\6.0.402\Microsoft.Common.CurrentVersion.targets(43,3): warning MSB4011: "C:\Users\Dav
    id Foley.nuget\packages\microsoft.windowsappsdk\1.1.4\buildTransitive\Microsoft.Build.Msix.props" cannot be imported a
    gain. It was already imported at "C:\Users\David Foley.nuget\packages\microsoft.windowsappsdk\1.1.4\buildTransitive\Mi
    crosoft.WinUI.props (25,3)". This is most likely a build authoring error. This subsequent import will be ignored. [D:\D
    ev\GitHub\maui\src\Essentials\src\Essentials.csproj]
    D:\Dev\GitHub\maui\bin\dotnet\sdk\6.0.402\Microsoft.Common.CurrentVersion.targets(43,3): warning MSB4011: "C:\Users\Dav
    id Foley.nuget\packages\microsoft.windowsappsdk\1.1.4\buildTransitive\Microsoft.Build.Msix.props" cannot be imported a
    gain. It was already imported at "C:\Users\David Foley.nuget\packages\microsoft.windowsappsdk\1.1.4\buildTransitive\Mi
    crosoft.WinUI.props (25,3)". This is most likely a build authoring error. This subsequent import will be ignored. [D:\D
    ev\GitHub\maui\src\Controls\src\Core\Controls.Core.csproj]
    D:\Dev\GitHub\maui\bin\dotnet\sdk\6.0.402\Microsoft.Common.CurrentVersion.targets(43,3): warning MSB4011: "C:\Users\Dav
    id Foley.nuget\packages\microsoft.windowsappsdk\1.1.4\buildTransitive\Microsoft.Build.Msix.props" cannot be imported a
    gain. It was already imported at "C:\Users\David Foley.nuget\packages\microsoft.windowsappsdk\1.1.4\buildTransitive\Mi
    crosoft.WinUI.props (25,3)". This is most likely a build authoring error. This subsequent import will be ignored. [D:\D
    ev\GitHub\maui\src\Controls\src\Core\Controls.Core.csproj]
    D:\Dev\GitHub\maui\bin\dotnet\sdk\6.0.402\Microsoft.Common.CurrentVersion.targets(43,3): warning MSB4011: "C:\Users\Dav
    id Foley.nuget\packages\microsoft.windowsappsdk\1.1.4\buildTransitive\Microsoft.Build.Msix.props" cannot be imported a
    gain. It was already imported at "C:\Users\David Foley.nuget\packages\microsoft.windowsappsdk\1.1.4\buildTransitive\Mi
    crosoft.WinUI.props (25,3)". This is most likely a build authoring error. This subsequent import will be ignored. [D:\D
    ev\GitHub\maui\src\Essentials\src\Essentials.csproj]
    C:\Users\David Foley.nuget\packages\microsoft.windowsappsdk\1.1.4\buildTransitive\Microsoft.Build.Msix.Pri.targets(375
    ,5): error APPX3217: SDK folder containing 'UAP.props' for 'UAP 10.0.20348.0' cannot be located. See http://go.microsof
    t.com/fwlink/?LinkID=798187 for more information. [D:\Dev\GitHub\maui\src\Controls\src\Core\Controls.Core.csproj]
    10 Warning(s)
    1 Error(s)

    Time Elapsed 00:00:29.62
    An error occurred when executing task 'dotnet-buildtasks'.

    0 comments No comments