如何从C#Windows Forms应用程序创建.appx包?

时间:2017-06-26 13:50:20

标签: c# windows build appx

我在C#中构建了一个Windows窗体应用程序,它有一个用c ++构建的子进程(.exe)。我选择的Visual Studio项目是Visual C#Windows Forms Application。

我在Windows SDK中使用了MakeAppx.exe,但在构建并进行认证后,它在安装时出现了这个错误:

Windows cannot install package Microsoft.Sample.Application because this package requires a higher Windows version. The package requested Windows version 8.1 with AppModel version 0, while the current Windows version is 6.3 with AppModel version 0.

包中的清单文件有问题吗?

这是清单文件:

<?xml version="1.0" encoding="utf-8"?>

<Package xmlns="http://schemas.microsoft.com/appx/2010/manifest">
  <Identity Name="Microsoft.SDKSamples.SampleApp"
            ProcessorArchitecture="x86"
            Publisher="CN=J Keith Becker, O=Keith Becker, L=Denver, S=Colorado, C=US"
            Version="1.0.0.0"
            ResourceId="en-us" 
  />

  <Properties>
    <DisplayName>SampleApp</DisplayName>
    <Description>SampleApp</Description>
    <Logo>Logo.png</Logo>
    <PublisherDisplayName>Keith Becker</PublisherDisplayName>
  </Properties>

  <Resources>
    <Resource Language="en-us"/>
  </Resources>

  <Applications>
    <Application Id="SampleApp" StartPage="Default.html">
      <VisualElements DisplayName="SampleApp"
                      Logo="Logo.png"
                      SmallLogo="Logo.png"
                      Description="SampleApp"
                      BackgroundColor="#D1FFFC"
                      ForegroundText="light"
      >
        <DefaultTile WideLogo="Logo.png" />
        <SplashScreen Image="Logo.png" />
      </VisualElements>
    </Application>

  </Applications>

  <Prerequisites>
    <OSMinVersion>8.1</OSMinVersion>
    <OSMaxVersionTested>10.0</OSMaxVersionTested>
  </Prerequisites>
</Package>

0 个答案:

没有答案