<Project Sdk="Microsoft.NET.Sdk">

  <!--
    Tiny diagnostic console app for the WinUI 3 activation blocker.

    Calls the native MddBootstrapInitialize2 export from
    Microsoft.WindowsAppRuntime.Bootstrap.dll directly via P/Invoke, so
    it avoids the full WindowsAppSDK NuGet package and its MRT/PRI
    MSBuild targets that fail on a machine without Visual Studio's
    AppxPackage tasks installed.

    Build:    dotnet build src/TeamsISO.App.WinUI.Probe
    Run:      ./src/TeamsISO.App.WinUI.Probe/bin/Debug/net8.0-windows/win-x64/TeamsISO.App.WinUI.Probe.exe

    Expected output on a healthy machine:
        MddBootstrapInitialize2 returned HR=0x00000000 (S_OK)
        Bootstrap succeeded.

    On a machine where Microsoft.WindowsAppRuntime.Bootstrap.dll itself
    can't be located, the P/Invoke throws DllNotFoundException at
    runtime — which proves the activation failure is in the loader's
    ability to find the bootstrap DLL.
  -->

  <PropertyGroup>
    <OutputType>Exe</OutputType>
    <TargetFramework>net8.0-windows</TargetFramework>
    <RootNamespace>TeamsISO.App.WinUI.Probe</RootNamespace>
    <Platforms>x64</Platforms>
    <RuntimeIdentifier>win-x64</RuntimeIdentifier>
    <Nullable>enable</Nullable>
    <ImplicitUsings>enable</ImplicitUsings>
    <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
  </PropertyGroup>

  <ItemGroup>
    <!--
      Hand-copy Microsoft.WindowsAppRuntime.Bootstrap.dll from the
      NuGet cache so the P/Invoke can find it. Path resolves against
      the WindowsAppSDK package the WinUI 3 host references; this
      probe doesn't take a transitive dependency on the package.
    -->
    <Content Include="$(NuGetPackageRoot)microsoft.windowsappsdk\1.6.250602001\runtimes\win-x64\native\Microsoft.WindowsAppRuntime.Bootstrap.dll"
             Link="Microsoft.WindowsAppRuntime.Bootstrap.dll"
             CopyToOutputDirectory="PreserveNewest"
             Visible="false" />
  </ItemGroup>

</Project>
