尝试使用桌面桥接器为wpf时出现奇怪的错误

时间:2018-03-15 12:14:41

标签: desktop-bridge

我正在尝试使用Visual Studio项目模板进行桌面桥接添加到wpf应用程序,它将无法成功构建并显示我已附加的这个奇怪的警告。

warning when building desktop bridge project template

我在官方文件上关注了这篇文章: https://docs.microsoft.com/en-us/windows/uwp/porting/desktop-to-uwp-packaging-dot-net 在此之前,我曾使用此博客文章将winmd和运行时添加到我的项目中: https://blogs.windows.com/buildingapps/2017/01/25/calling-windows-10-apis-desktop-application/ 这是代码表单Package.appxmanifest文件:

    <?xml version="1.0" encoding="utf-8"?>
<Package xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10" xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest" xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10" xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities" xmlns:iot="http://schemas.microsoft.com/appx/manifest/iot/windows10" IgnorableNamespaces="uap mp rescap iot">
  <Identity Name="09b95fbd-84cc-426f-9fd2-2c1d3d304fab" Publisher="CN=SO-PC-005" Version="1.0.0.0" />
  <Properties>
    <DisplayName>WapProjTemplate</DisplayName>
    <PublisherDisplayName>SO-PC-005</PublisherDisplayName>
    <Logo>Assets\StoreLogo.png</Logo>
  </Properties>
  <Dependencies>
    <TargetDeviceFamily Name="Windows.Universal" MinVersion="10.0.0.0" MaxVersionTested="10.0.0.0" />
    <TargetDeviceFamily Name="Windows.Desktop" MinVersion="10.0.14393.0" MaxVersionTested="10.0.14393.0" />
  </Dependencies>
  <Resources>
    <Resource Language="x-generate" />
  </Resources>
  <Applications>
    <Application Id="App" Executable="$targetnametoken$.exe" EntryPoint="$targetentrypoint$">
      <uap:VisualElements DisplayName="WapProjTemplate" Description="WapProjTemplate" BackgroundColor="transparent" Square150x150Logo="Assets\Square150x150Logo.png" Square44x44Logo="Assets\Square44x44Logo.png">
        <uap:DefaultTile Wide310x150Logo="Assets\Wide310x150Logo.png">
        </uap:DefaultTile>
      </uap:VisualElements>
    </Application>
  </Applications>
  <Capabilities>
    <Capability Name="internetClient" />
    <iot:Capability Name="systemManagement" />
    <rescap:Capability Name="runFullTrust" />
  </Capabilities>
</Package>

我还想提一下,我试图在wpf应用程序中使用windows.graphics.display进行亮度覆盖,它需要systemManagement功能。而且我的项目在没有打包项目的情况下成功构建,但是当我将包装项目添加到我的wpf解决方案时,它将无法构建。

0 个答案:

没有答案