Is there any way to install 20.04 for use with wsl2 that doesn't depend upon Microsoft Store (or Add-AppxPackage) working?
Why: Microsoft Store and Add-AppxPackage are broken on my computer, attempts to fix them were unsuccessful, and Microsoft's only solution is "reinstall Windows" because there's no way to just regenerate it, or to uninstall and reinstall Store by itself. Others have already discovered that Add-AppxPackage isn't a loophole to getting around a broken Microsoft Store.
Incidentally, I already tried to download it by running:
Invoke-WebRequest -Uri https://aka.ms/wslubuntu2004 -OutFile Ubuntu.appx -UseBasicParsing
Add-AppxPackage .\Ubuntu.appx
Unfortunately, here's the error message I got:
Add-AppxPackage : Deployment failed with HRESULT: 0x80073CF3, Package failed updates, dependency or conflict
validation.
Deployment Add operation with target volume C: on Package
CanonicalGroupLimited.Ubuntu20.04onWindows_2004.2020.424.0_x64__79rhkp1fndgsc from: (Ubuntu.appx) failed with error
0x80073CF3. See http://go.microsoft.com/fwlink/?LinkId=235160 for help diagnosing app deployment issues.
NOTE: For additional information, look for [ActivityId] 014ee586-6a11-0004-ce43-5001116ad701 in the Event Log or use
the command line Get-AppPackageLog -ActivityID 014ee586-6a11-0004-ce43-5001116ad701
At line:1 char:1
+ Add-AppxPackage .\Ubuntu.appx
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : WriteError: (D:\Downloads\Ubuntu.appx:String) [Add-AppxPackage], IOException
+ FullyQualifiedErrorId : DeploymentError,Microsoft.Windows.Appx.PackageManager.Commands.AddAppxPackageCommand
If you dig through the error messages in EventViewer, they ultimately come down to "an XML file needed by Microsoft Store was somehow deleted, and there's no way to get it back without reinstalling Store by reinstalling Windows" :-(
Anyway, I don't expect anyone here to help with diagnosing Microsoft Store, I'm just hoping that there's some alternate way to install Ubuntu 20.04 for WSL2 that doesn't need Windows Store to work.