Repository: microsoft/WindowsAppSDK

Issue #2749: Deployment issue with 1.1.2 update
Created: 2022-07-18T19:38:22Z
Describe the bug
I attempted to move from 1.0.3 to 1.1.2 today and I am seeing a deployment issue after an incremental build.  It works fine after a clean build.
My application is a desktop application which has 3 Windows Runtime Components included.
=================================================================================
This is seen in VS deployment tab:
Creating a new clean layout...
Copying files: Total 282 mb to layout...
Checking whether required frameworks are installed...
Registering the application to run from layout...
DEP0700: Registration of the app failed. [0x80080204] error 0xC00CE012: App manifest validation error: The app manifest must be valid as per schema: Line 50, Column 8, Reason: Content for element '{http://schemas.microsoft.com/appx/manifest/foundation/windows10}InProcessServer' is incomplete according to the DTD/Schema.
Expecting: {http://schemas.microsoft.com/appx/manifest/foundation/windows10}ActivatableClass.
=================================================================================
Here is the VS generated Manifest it seems to be complaining about:

Duplicate issue #2740: Incompatible with dotnet FX and C++/WinRT runtime components
Created: 2022-07-15T10:16:21Z
Describe the bug
Creating a single project MSIX package with reference to a C++/WinRT runtime component results in invalid appxmanifest.xml-file.
Invalid content in AppxManifest.xml:
  <Extensions>
    <Extension Category="windows.activatableClass.inProcessServer">
      <InProcessServer>
        <Path>RuntimeComponent1.dll</Path>
      </InProcessServer>
    </Extension>
  </Extensions>

Steps to reproduce the bug

Download sample project (wappsdk.zip)
Extract, and open developer terminal in that folder
Run

msbuild -p:RestorePackagesConfig=true -p:GenerateAppxPackageOnBuild=True -restore -t:Rebuild .\wappsdk.sln -p:Platform=x64 -p:Configuration=Debug


Observe: Package is generated successfully.
Run

msbuild -p:RestorePackagesConfig=true -p:GenerateAppxPackageOnBuild=True -restore .\wappsdk.sln -p:Platform=x64 -p:Configuration=Debug


Observe error:
Error info: error C00CE012: App manifest validation error: The app manifest must be valid as per schema: Line 37, Column 8,
Behavior is non-deterministic


With /t:Rebuild (or /t:Clean;Build) package creation works always
With /t:Build using previous built output results in bad manifest generation, this makes working in Visual Studio extremely frustrating, as deploying forces a new build, which fails, due to manifest validation issues

Expected behavior
Expected part of AppxManifest.xml:
  <Extensions>
    <Extension Category="windows.activatableClass.inProcessServer">
      <InProcessServer>
        <Path>RuntimeComponent1.dll</Path>
        <ActivatableClass ActivatableClassId="RuntimeComponent1.Class" ThreadingModel="both" />
      </InProcessServer>
    </Extension>
  </Extensions>

Screenshots
No response
NuGet package version
1.1.2
Packaging type
Packaged (MSIX)
Windows version
Windows 11 version 21H2 (22000)
IDE
Visual Studio 2022
Additional context
This worked fine in WindowsAppSdk 1.0.

Closing comment (2022-07-21T19:45:23Z): Duplicate of #2749