首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何修复xbox的appxmanifest.xml?

如何修复xbox的appxmanifest.xml?
EN

Stack Overflow用户
提问于 2016-04-16 18:08:29
回答 1查看 2.7K关注 0票数 0

目前,我正在为xbox one开发的游戏中获得此错误。它运行的非常好,思想unity5和当我导出它作为一个.exe游戏的个人电脑,但我不能让它在本地或远程运行。我已经将它设置为调试x64,因为它说要运行xbox 1,就需要打开它。

代码语言:javascript
复制
OUTPUT CODE

    Restoring NuGet packages...
To prevent NuGet from restoring packages during build, open the Visual Studio Options dialog, click on the Package Manager node and uncheck 'Allow NuGet to download missing packages during build.'
1>------ Build started: Project: Assembly-CSharp, Configuration: Debug x64 ------
2>------ Build started: Project: Assembly-CSharp-firstpass, Configuration: Debug x64 ------
2>  Assembly-CSharp-firstpass -> C:\Users\david\Desktop\Speed Runner\UWP\Assembly-CSharp-firstpass\bin\x64\Debug\Assembly-CSharp-firstpass.dll
1>  Assembly-CSharp -> C:\Users\david\Desktop\Speed Runner\UWP\Assembly-CSharp\bin\x64\Debug\Assembly-CSharp.dll
3>------ Build started: Project: Speed Runner, Configuration: Debug x64 ------
3>  UnityInstallationDir "C:\Program Files\Unity\Editor".
3>  UnityWSAPlayerDir "C:\Program Files\Unity\Editor\Data\PlaybackEngines\MetroSupport".
3>  UnityProjectDir "C:\Users\david\Desktop\Speed Runner".
3>  Copying unprocessed assemblies...
3>  Running AssemblyConverter...
3>  AssemblyConverter done.
3>  Speed Runner -> C:\Users\david\Desktop\test games\speed runner\Speed Runner\bin\x64\Debug\Speed Runner.exe
3>  Running Code Analysis...
3>MSBUILD : warning CA1707: Microsoft.Naming : Remove the underscores from namespace name 'Speed_Runner'.
3>MSBUILD : warning CA2210: Microsoft.Design : Sign 'Speed Runner.exe' with a strong name key.
3>MSBUILD : warning CA1014: Microsoft.Design : Mark 'Speed Runner.exe' with CLSCompliant(true) because it exposes externally visible types.
3>MSBUILD : warning CA1001: Microsoft.Design : Implement IDisposable on 'App' because it creates members of the following IDisposable types: 'AppCallbacks'. If 'App' has previously shipped, adding new members that implement IDisposable to this type is considered a breaking change to existing consumers.
3>C:\Users\david\Desktop\test games\speed runner\Speed Runner\App.xaml.cs(56): warning CA1305: Microsoft.Globalization : Because the behavior of 'string.Format(string, object)' could vary based on the current user's locale settings, replace this call in 'App.OnActivated(IActivatedEventArgs)' with a call to 'string.Format(IFormatProvider, string, params object[])'. If the result of 'string.Format(IFormatProvider, string, params object[])' will be displayed to the user, specify System.Globalization.CultureInfo.CurrentCulture as the 'IFormatProvider' parameter. Otherwise, if the result will be stored and accessed by software, such as when it is persisted to disk or to a database, specify System.Globalization.CultureInfo.InvariantCulture.
3>C:\Users\david\Desktop\test games\speed runner\Speed Runner\App.xaml.cs(51): warning CA1062: Microsoft.Design : In externally visible method 'App.OnActivated(IActivatedEventArgs)', validate parameter 'args' before using it.
3>C:\Users\david\Desktop\test games\speed runner\Speed Runner\App.xaml.cs(71): warning CA1062: Microsoft.Design : In externally visible method 'App.OnFileActivated(FileActivatedEventArgs)', validate parameter 'args' before using it.
3>C:\Users\david\Desktop\test games\speed runner\Speed Runner\App.xaml.cs(92): warning CA1062: Microsoft.Design : In externally visible method 'App.OnLaunched(LaunchActivatedEventArgs)', validate parameter 'args' before using it.
3>MSBUILD : warning CA1051: Microsoft.Design : Because field 'App.splashScreen' is visible outside of its declaring type, change its accessibility to private and add a property, with the same accessibility as the field has currently, to provide access to it.
3>C:\Users\david\Desktop\test games\speed runner\Speed Runner\MainPage.xaml.cs(140): warning CA1024: Microsoft.Design : Change 'MainPage.GetSwapChainPanel()' to a property if appropriate.
3>C:\Users\david\Desktop\test games\speed runner\Speed Runner\MainPage.xaml.cs(73): warning CA1062: Microsoft.Design : In externally visible method 'MainPage.OnNavigatedTo(NavigationEventArgs)', validate parameter 'e' before using it.
3>  Code Analysis Complete -- 0 error(s), 11 warning(s)
3>C:\Users\david\Desktop\test games\speed runner\Speed Runner\bin\x64\Debug\AppxManifest.xml : error APPX0501: Validation error. error C00CE169: App manifest validation error: The app manifest must be valid as per schema: Line 37, Column 20, Reason: 'windows.fileTypeAssociation' violates enumeration constraint of 'windows.backgroundTasks windows.preInstalledConfigTask windows.updateTask windows.restrictedLaunch'. The attribute 'Category' with value 'windows.fileTypeAssociation' failed to parse.
========== Build: 2 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
========== Deploy: 0 succeeded, 0 failed, 0 skipped ==========
代码语言:javascript
复制
ERROR CODE

    Severity    Code    Description Project File    Line    Suppression State
Error       Validation error. error C00CE169: App manifest validation error: The app manifest must be valid as per schema: Line 37, Column 20, Reason: 'windows.fileTypeAssociation' violates enumeration constraint of 'windows.backgroundTasks windows.preInstalledConfigTask windows.updateTask windows.restrictedLaunch'. The attribute 'Category' with value 'windows.fileTypeAssociation' failed to parse.    Speed Runner    C:\Users\david\Desktop\test games\speed runner\Speed Runner\bin\x64\Debug\AppxManifest.xml      
代码语言:javascript
复制
AppManifest.xml

    <?xml version="1.0" encoding="utf-8"?>
<Package xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest" xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10" IgnorableNamespaces="uap mp build" xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10" xmlns:build="http://schemas.microsoft.com/developer/appx/2015/build">
  <!--
    THIS PACKAGE MANIFEST FILE IS GENERATED BY THE BUILD PROCESS.

    Changes to this file will be lost when it is regenerated. To correct errors in this file, edit the source .appxmanifest file.

    For more information on package manifest files, see http://go.microsoft.com/fwlink/?LinkID=241727
  -->
  <Identity Name="SpeedRunner" Publisher="CN=osbodav gaming" Version="1.0.0.0" ProcessorArchitecture="x64" />
  <mp:PhoneIdentity PhoneProductId="b893210b-2006-4704-91d6-aad428b34a24" PhonePublisherId="00000000-0000-0000-0000-000000000000" />
  <Properties>
    <DisplayName>Speed Runner</DisplayName>
    <PublisherDisplayName>osbodav gaming</PublisherDisplayName>
    <Logo>Assets\StoreLogo.scale-100.png</Logo>
  </Properties>
  <Dependencies>
    <TargetDeviceFamily Name="Windows.Universal" MinVersion="10.0.10240.0" MaxVersionTested="10.0.14295.0" />
    <PackageDependency Name="Microsoft.VCLibs.140.00" MinVersion="14.0.23816.0" Publisher="CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US" />
  </Dependencies>
  <Resources>
    <Resource Language="EN-US" />
  </Resources>
  <Applications>
    <Application Id="App" Executable="Speed Runner.exe" EntryPoint="SpeedRunner.App">
      <uap:VisualElements DisplayName="Speed Runner" Square150x150Logo="Assets\Square150x150Logo.scale-200.png" Square44x44Logo="Assets\Square44x44Logo.scale-200.png" Description="Speed Runner" BackgroundColor="transparent">
        <uap:DefaultTile ShortName="Speed Runner" Wide310x150Logo="Assets\Wide310x150Logo.scale-200.png" />
        <uap:SplashScreen Image="Assets\SplashScreen.scale-200.png" BackgroundColor="#222C37" />
        <uap:InitialRotationPreference>
          <uap:Rotation Preference="landscape" />
          <uap:Rotation Preference="landscapeFlipped" />
          <uap:Rotation Preference="portrait" />
          <uap:Rotation Preference="portraitFlipped" />
        </uap:InitialRotationPreference>
      </uap:VisualElements>
      <Extensions>
        <Extension Category="windows.fileTypeAssociation">
          <FileTypeAssociation Name="game" />
        </Extension>
      </Extensions>
    </Application>
  </Applications>
  <Extensions>
    <Extension Category="windows.activatableClass.inProcessServer">
      <InProcessServer>
        <Path>UnityEngineDelegates.dll</Path>
        <ActivatableClass ActivatableClassId="UnityEngineDelegates.PlatformInvoke" ThreadingModel="both" />
        <ActivatableClass ActivatableClassId="UnityEngineDelegates.FunctionDefsDictionary" ThreadingModel="both" />
      </InProcessServer>
    </Extension>
    <Extension Category="windows.activatableClass.inProcessServer">
      <InProcessServer>
        <Path>UnityPlayer.dll</Path>
        <ActivatableClass ActivatableClassId="UnityPlayer.XamlPageAutomationPeer" ThreadingModel="both" />
        <ActivatableClass ActivatableClassId="UnityPlayer.AppCallbacks" ThreadingModel="both" />
      </InProcessServer>
    </Extension>
    <Extension Category="windows.activatableClass.inProcessServer">
      <InProcessServer>
        <Path>CLRHost.dll</Path>
        <ActivatableClass ActivatableClassId="WinRTBridge.MethodTools" ThreadingModel="both" />
        <ActivatableClass ActivatableClassId="WinRTBridge.WinRTBridge" ThreadingModel="both" />
        <ActivatableClass ActivatableClassId="WinRTBridge.Marshalling" ThreadingModel="both" />
        <ActivatableClass ActivatableClassId="WinRTBridge.GCHandles" ThreadingModel="both" />
        <ActivatableClass ActivatableClassId="WinRTBridge.ExceptionHandling" ThreadingModel="both" />
        <ActivatableClass ActivatableClassId="WinRTBridge.Utils" ThreadingModel="both" />
        <ActivatableClass ActivatableClassId="WinRTBridge.UnityEngineObjectTools" ThreadingModel="both" />
        <ActivatableClass ActivatableClassId="WinRTBridge.ArrayTools" ThreadingModel="both" />
        <ActivatableClass ActivatableClassId="WinRTBridge.GCHandledObjects" ThreadingModel="both" />
        <ActivatableClass ActivatableClassId="WinRTBridge.ScriptingPinnedArray" ThreadingModel="both" />
        <ActivatableClass ActivatableClassId="WinRTBridge.TypeInformation" ThreadingModel="both" />
        <ActivatableClass ActivatableClassId="WinRTBridge.ObjectInstantiation" ThreadingModel="both" />
      </InProcessServer>
    </Extension>
  </Extensions>
  <build:Metadata>
    <build:Item Name="TargetFrameworkMoniker" Value=".NETCore,Version=v5.0" />
    <build:Item Name="VisualStudio" Version="14.0" />
    <build:Item Name="VisualStudioEdition" Value="Microsoft Visual Studio Community 2015" />
    <build:Item Name="OperatingSystem" Version="10.0.10586.0 (th2_release.151029-1700)" />
    <build:Item Name="Microsoft.Build.AppxPackage.dll" Version="14.0.25123.0" />
    <build:Item Name="ProjectGUID" Value="{13A45C13-3265-47B8-BC48-A553B569DF55}" />
    <build:Item Name="ilc.exe" Version="1.2.23413.00 built by: PROJECTNREL" />
    <build:Item Name="OptimizingToolset" Value="ilc.exe" />
    <build:Item Name="UseDotNetNativeSharedAssemblyFrameworkPackage" Value="true" />
    <build:Item Name="Microsoft.Windows.UI.Xaml.Build.Tasks.dll" Version="14.0.25123.0" />
    <build:Item Name="WindowsMobile" Version="10.0.14295.0" />
  </build:Metadata>
</Package>
EN

回答 1

Stack Overflow用户

发布于 2016-04-16 22:36:07

错误信息在这里非常清楚:'windows.fileTypeAssociation' violates enumeration constraint of 'windows.backgroundTasks windows.preInstalledConfigTask windows.updateTask windows.restrictedLaunch'. The attribute 'Category' with value 'windows.fileTypeAssociation' failed to parse.

这意味着有一个名为Category的属性,它的值为windows.fileTypeAssociation,而这个值不是允许的值之一。清单中只有一个元素具有这样的属性:

代码语言:javascript
复制
<Extension Category="windows.fileTypeAssociation">
  <FileTypeAssociation Name="game" />
</Extension>

错误消息本质上说这个元素在清单中是不允许的。解决问题的明显方法是从AppManifest.xml文件中删除该元素,但这将无法工作,因为文件本身警告您:

代码语言:javascript
复制
THIS PACKAGE MANIFEST FILE IS GENERATED BY THE BUILD PROCESS.

Changes to this file will be lost when it is regenerated. To correct errors in this file, edit the source .appxmanifest file.

因此,您需要使用生成AppManifest.xmlAppManifest.xml扩展名修改文件。它可能被命名为类似于package.appxmanifest

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/36667806

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档