title: .NET6 Win UI Microsoft.DesktopBridge.props not found when using dotnet cli
body: <p>I am creating a .NET6 WinUI application which works and runs fine when built and executed via Visual Studio 2022.</p>
  <p>If I try to build via the cli (<code>dotnet build</code>) I get an error that Microsoft.DesktopBridge.props is not found.</p>
  <pre><code>error MSB4019: Das importierte Projekt &quot;C:\Program Files\dotnet\sdk\6.0.100\Microsoft\DesktopBridge\Microsoft.DesktopBridge.props&quot; wurde nicht gefunden. Stellen Sie sicher, dass der Ausdruck in der Import-Deklaration &quot;C:\Program Files\dotnet\sdk\6.0.100\\Microsoft\DesktopBridge\\Microsoft.DesktopBridge.props&quot; richtig ist und dass die Datei auf dem Datenträger vorhanden ist.
  </code></pre>
  <p>The file doesn't exist at that location but at <code>C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\DesktopBridge</code>, in the install directory of my VS 2022 installation.</p>
  <p>If I fix the path in my wapproj file, the build error disappears (but the build fails with other errors).</p>
  <p>I don't understand why it's working out of Visual Studio but not via the cli. Do I need to provide additional arguments? Is there a way to see the commands that Visual Studio executes when building/packaging? I appreciate any help or links to documentation about this that I might have missed.</p>
  <p>I also tried to create a blank project, error is the same.</p>
  <p>My tool setup:</p>
  <ul>
  <li>VS 17.0.1 (2022)</li>
  <li>NET 6.0.100</li>
  <li>Project Reunion VS Extension 0.8.4</li>
  <li>all versions are stable, no previews</li>
  </ul>
  <p>My wapproj file:</p>
  <pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
  &lt;Project ToolsVersion=&quot;15.0&quot; DefaultTargets=&quot;Build&quot; xmlns=&quot;http://schemas.microsoft.com/developer/msbuild/2003&quot;&gt;
    &lt;PropertyGroup Condition=&quot;'$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' &amp;lt; '15.0'&quot;&gt;
      &lt;VisualStudioVersion&gt;15.0&lt;/VisualStudioVersion&gt;
    &lt;/PropertyGroup&gt;
    &lt;ItemGroup Label=&quot;ProjectConfigurations&quot;&gt;
      &lt;ProjectConfiguration Include=&quot;Debug|x86&quot;&gt;
        &lt;Configuration&gt;Debug&lt;/Configuration&gt;
        &lt;Platform&gt;x86&lt;/Platform&gt;
      &lt;/ProjectConfiguration&gt;
      &lt;ProjectConfiguration Include=&quot;Release|x86&quot;&gt;
        &lt;Configuration&gt;Release&lt;/Configuration&gt;
        &lt;Platform&gt;x86&lt;/Platform&gt;
      &lt;/ProjectConfiguration&gt;
      &lt;ProjectConfiguration Include=&quot;Debug|x64&quot;&gt;
        &lt;Configuration&gt;Debug&lt;/Configuration&gt;
        &lt;Platform&gt;x64&lt;/Platform&gt;
      &lt;/ProjectConfiguration&gt;
      &lt;ProjectConfiguration Include=&quot;Release|x64&quot;&gt;
        &lt;Configuration&gt;Release&lt;/Configuration&gt;
        &lt;Platform&gt;x64&lt;/Platform&gt;
      &lt;/ProjectConfiguration&gt;
      &lt;ProjectConfiguration Include=&quot;Debug|arm64&quot;&gt;
        &lt;Configuration&gt;Debug&lt;/Configuration&gt;
        &lt;Platform&gt;arm64&lt;/Platform&gt;
      &lt;/ProjectConfiguration&gt;
      &lt;ProjectConfiguration Include=&quot;Release|arm64&quot;&gt;
        &lt;Configuration&gt;Release&lt;/Configuration&gt;
        &lt;Platform&gt;arm64&lt;/Platform&gt;
      &lt;/ProjectConfiguration&gt;
    &lt;/ItemGroup&gt;
    &lt;PropertyGroup&gt;
      &lt;WapProjPath Condition=&quot;'$(WapProjPath)'==''&quot;&gt;$(MSBuildExtensionsPath)\Microsoft\DesktopBridge\&lt;/WapProjPath&gt;
      &lt;PathToXAMLWinRTImplementations&gt;TabernaMenuManager.WinUI\&lt;/PathToXAMLWinRTImplementations&gt;
    &lt;/PropertyGroup&gt;
    &lt;Import Project=&quot;$(WapProjPath)\Microsoft.DesktopBridge.props&quot; /&gt;
    &lt;PropertyGroup&gt;
      &lt;ProjectGuid&gt;4daf556a-da6a-4595-a33d-22575a214f99&lt;/ProjectGuid&gt;
      &lt;TargetPlatformVersion&gt;10.0.19041.0&lt;/TargetPlatformVersion&gt;
      &lt;TargetPlatformMinVersion&gt;10.0.17763.0&lt;/TargetPlatformMinVersion&gt;
      &lt;AssetTargetFallback&gt;net5.0-windows$(TargetPlatformVersion);$(AssetTargetFallback)&lt;/AssetTargetFallback&gt;
      &lt;DefaultLanguage&gt;de-DE&lt;/DefaultLanguage&gt;
      &lt;AppxPackageSigningEnabled&gt;false&lt;/AppxPackageSigningEnabled&gt;
      &lt;EntryPointProjectUniqueName&gt;..\TabernaMenuManager.WinUI\TabernaMenuManager.WinUI.csproj&lt;/EntryPointProjectUniqueName&gt;
    &lt;/PropertyGroup&gt;
    &lt;ItemGroup&gt;
      &lt;AppxManifest Include=&quot;Package.appxmanifest&quot;&gt;
        &lt;SubType&gt;Designer&lt;/SubType&gt;
      &lt;/AppxManifest&gt;
    &lt;/ItemGroup&gt;
    &lt;ItemGroup&gt;
      &lt;Content Include=&quot;Images\SplashScreen.scale-200.png&quot; /&gt;
      &lt;Content Include=&quot;Images\LockScreenLogo.scale-200.png&quot; /&gt;
      &lt;Content Include=&quot;Images\Square150x150Logo.scale-200.png&quot; /&gt;
      &lt;Content Include=&quot;Images\Square44x44Logo.scale-200.png&quot; /&gt;
      &lt;Content Include=&quot;Images\Square44x44Logo.targetsize-24_altform-unplated.png&quot; /&gt;
      &lt;Content Include=&quot;Images\StoreLogo.png&quot; /&gt;
      &lt;Content Include=&quot;Images\Wide310x150Logo.scale-200.png&quot; /&gt;
      &lt;Content Include=&quot;Resources\taberna-276414-firebase-adminsdk-w1rvp-4fff3fa7cf.json&quot; /&gt;
    &lt;/ItemGroup&gt;
    &lt;ItemGroup&gt;
      &lt;ProjectReference Include=&quot;..\TabernaMenuManager.WinUI\TabernaMenuManager.WinUI.csproj&quot;&gt;
        &lt;SkipGetTargetFrameworkProperties&gt;True&lt;/SkipGetTargetFrameworkProperties&gt;
        &lt;PublishProfile&gt;Properties\PublishProfiles\win10-$(Platform).pubxml&lt;/PublishProfile&gt;
      &lt;/ProjectReference&gt;
    &lt;/ItemGroup&gt;
    &lt;ItemGroup&gt;
      &lt;PackageReference Include=&quot;Microsoft.ProjectReunion&quot; Version=&quot;[0.8.4]&quot;&gt;
        &lt;IncludeAssets&gt;build&lt;/IncludeAssets&gt;
      &lt;/PackageReference&gt;
      &lt;PackageReference Include=&quot;Microsoft.ProjectReunion.WinUI&quot; Version=&quot;[0.8.4]&quot;&gt;
        &lt;IncludeAssets&gt;build&lt;/IncludeAssets&gt;
      &lt;/PackageReference&gt;
    &lt;/ItemGroup&gt;
    &lt;Import Project=&quot;$(WapProjPath)\Microsoft.DesktopBridge.targets&quot; /&gt;
  &lt;/Project&gt;
  </code></pre>