I'm attempting to distribute a UWP application, and have hit a slightly odd issue.
.appinstaller
file and associated MSIX bundles etc.appinstaller
file gives the error Error in parsing the app package.
- not particularly helpfulTrusted Publishers
web.config
file on the server is set up to map MIME types correctly:<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.webServer>
<staticContent>
<mimeMap fileExtension=".appx" mimeType="application/appx" />
<mimeMap fileExtension=".msix" mimeType="application/msix" />
<mimeMap fileExtension=".appxbundle" mimeType="application/appxbundle" />
<mimeMap fileExtension=".msixbundle" mimeType="application/msixbundle" />
<mimeMap fileExtension=".appinstaller" mimeType="application/appinstaller" />
</staticContent>
</system.webServer>
</configuration>
Running the installation from PowerShell (un-elevated) using Add-AppxPackage -Appinstaller https://[test].azurewebsites.net/[appname].appinstaller
correctly installs the app, which then works fine.
Using Fiddler, I've observed that installing via the UI results in a 412 error from the server:
Request:
GET https://[test].azurewebsites.net/[appname]_1.0.0.0_Test/[appname]_1.0.0.0_x64.msixbundle HTTP/1.1
Connection: Keep-Alive
Accept-Encoding: gzip, deflate
If-Match: W/"086c9a4cfd51:0"
Range: bytes=10878976-11010047
If-Unmodified-Since: Mon, 20 May 2019 20:42:56 GMT
Host:[test].azurewebsites.net
Response:
HTTP/1.1 412 Precondition Failed
Content-Length: 86
Content-Type: text/html
Last-Modified: Mon, 20 May 2019 20:42:56 GMT
Accept-Ranges: bytes
ETag: W/"086c9a4cfd51:0"
Server: Microsoft-IIS/10.0
X-Powered-By: ASP.NET
Date: Mon, 20 May 2019 20:21:12 GMT
The request was not completed due to preconditions that are set in the request header.
If-Unmodified-Since
or If-Match
headers.GET https://[test].azurewebsites.net/[appname]_1.0.0.0_Test/[appname]_1.0.0.0_x64.msixbundle HTTP/1.1
Connection: Keep-Alive
Range: bytes=11079260-11145819
User-Agent: App Virt Client/1.0
Host: [test].azurewebsites.net
Given the above:
.appinstaller
under IIS?.appinstaller
UI?EDIT:
Found a log file (AILog.txt
):
[Tue May 21 15:40:17 2019]{10188} Manifest Info -> Package is Not Headless
[Tue May 21 15:40:17 2019]{10188} Manifest Info -> Package is Not a Modification Package
[Tue May 21 15:40:17 2019]{10188} ERROR: AppsInfo -> Error: [0x80004005]
EDIT 2:
After much investigation, I've got a working build with comparatively few changes:
EnableDotNetNativeCompatibleProfile
(I set this to true
)RuntimeIdentifiers
(I added these into the .csproj file)Hopefully a process of elimination will identify which of these is the culprit.
User contributions licensed under CC BY-SA 3.0