1

I need to submit a project written in .Net MAUI to the Microsoft Store. One of the libraries I'm using requires VCLibs. How can I add the necessary dependencies?

Adding them to the *.csproj file didn't make any difference.

Adding them to the *.appmanifest file

<Dependencies>
    <TargetDeviceFamily Name="Windows.Universal" MinVersion="10.0.17763.0" MaxVersionTested="10.0.19041.0" />
    <PackageDependency MinVersion="14.0.30704.0" Name="Microsoft.VCLibs.140.00.UWPDesktop" Publisher="CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US" />
</Dependencies>

results in an C00CE014: App manifest validation error during the package build stage using dotnet build.

  • What happens if you omit that package? According to what I read, that is only used when code is run in UWP. On Windows, Maui targets WinUI 3 (part of Windows Desktop App SDK). It does not run on UWP. So I'm thinking maybe that dependency is only used when the library is run on UWP. Maybe you can omit it. – ToolmakerSteve Jul 14 '23 at 21:53
  • 1
    If I don't add the dependency, the program doesn't work. As a result, I failed certification in the Microsoft Store. VCLibs were installed separately on my PC, so everything was working fine, and I didn't even realize that this dependency was required. It took me a while to figure it out. I found a workaround solution. It's not optimal, but it works. I will add it as an answer to the question, maybe it will help someone. – Nikolay Kusch Jul 15 '23 at 05:36

1 Answers1

1

I found a workaround solution. It's not optimal, but it works.

First, I don't add the dependencies and build the packages for submission using this code.

Then, using the MSIX Packaging Tools, I edit the manifest file and add the dependencies in the Dependency block. It's important at this stage to add a key and sign the package before saving it.

Next, I build the msixbundle using MakeAppx.exe and sign it using SignTool.