创建UWP应用包会导致错误

时间:2018-01-24 14:52:38

标签: xamarin.forms uwp

当我尝试为侧面加载创建一个版本UWP包时,我收到以下错误: -

  

1> C:\ Program Files   (86)\的MSBuild \ Microsoft.NetNative \ 64 \ ILC \ IlcInternals.targets(936,5):   错误:System.NullReferenceException:对象引用未设置为   对象的实例。 1> C:\ Program Files   (86)\的MSBuild \ Microsoft.NetNative \ 64 \ ILC \ IlcInternals.targets(936,5):   错误:at   System.Xml.Serialization.XmlSerializationWriterCodeGen.FindXmlnsIndex(MemberMapping []   成员)1> C:\ Program Files   (86)\的MSBuild \ Microsoft.NetNative \ 64 \ ILC \ IlcInternals.targets(936,5):   错误:at   System.Xml.Serialization.XmlSerializationWriterCodeGen.WriteStructMethod(StructMapping   映射)1> C:\ Program Files   (86)\的MSBuild \ Microsoft.NetNative \ 64 \ ILC \ IlcInternals.targets(936,5):   错误:at   System.Xml.Serialization.XmlSerializationWriterCodeGen.GenerateMethod(TypeMapping   映射)1> C:\ Program Files   (86)\的MSBuild \ Microsoft.NetNative \ 64 \ ILC \ IlcInternals.targets(936,5):   错误:at   System.Xml.Serialization.XmlSerializationCodeGen.GenerateReferencedMethods()   1> C:\ Program Files   (86)\的MSBuild \ Microsoft.NetNative \ 64 \ ILC \ IlcInternals.targets(936,5):   错误:at   System.Xml.Serialization.XmlSerializationWriterCodeGen.GenerateEnd()   1> C:\ Program Files   (86)\的MSBuild \ Microsoft.NetNative \ 64 \ ILC \ IlcInternals.targets(936,5):   错误:at   System.Xml.Serialization.TempAssembly.GenerateAssembly(XmlMapping []   xmlMappings,Type [] types,String defaultNamespace,Evidence evidence,   XmlSerializerCompilerParameters参数,Hashtable程序集,   String outputDir,IEnumerable 1 referenceDirectories, String intermediateDir, Boolean loadAssembly) 1>C:\Program Files (x86)\MSBuild\Microsoft\.NetNative\x64\ilc\IlcInternals.targets(936,5): error : at System.Xml.Serialization.XmlSerializer.GenerateSerializer(Type[] types, XmlMapping[] mappings, CompilerParameters parameters, String outputDir, IEnumerable 1 referenceDirectories,String intermediateDir,   Boolean loadAssembly)1> C:\ Program Files   (86)\的MSBuild \ Microsoft.NetNative \ 64 \ ILC \ IlcInternals.targets(936,5):   错误:at   System.Xml.Serialization.XmlSerializer.GenerateSerializer(类型[]   types,String outputDir,IEnumerable 1 referenceDirectories, String intermediateDir, List 1 wcfSerializers,Boolean loadAssembly)   1> C:\ Program Files   (86)\的MSBuild \ Microsoft.NetNative \ 64 \ ILC \ IlcInternals.targets(936,5):   错误:在SerializationAssemblyGenerator.Program.Main(String []   args)1> C:\ Program Files   (86)\的MSBuild \ Microsoft.NetNative \ 64 \ ILC \ IlcInternals.targets(936,5):   错误:内部编译器错误:发生了一个或多个错误。

我的.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" IgnorableNamespaces="uap mp">
  <Identity Name="XXXXXXXXXX" Publisher="XXXXXXXXXX" Version="1.0.4.0" />
  <mp:PhoneIdentity PhoneProductId="XXXXXXXXXX" PhonePublisherId="XXXXXXXXXX" />
  <Properties>
    <DisplayName>XXXXXXXXXX</DisplayName>
    <PublisherDisplayName>XXXXXXXXXX</PublisherDisplayName>
    <Logo>Assets\StoreLogo.png</Logo>
  </Properties>
  <Dependencies>
    <TargetDeviceFamily Name="Windows.Universal" MinVersion="10.0.0.0" MaxVersionTested="10.0.0.0" />
  </Dependencies>
  <Resources>
    <Resource Language="x-generate" />
  </Resources>
  <Applications>
    <Application Id="App" Executable="$targetnametoken$.exe" EntryPoint="XXXXXXXXXX.App">
      <uap:VisualElements DisplayName="XXXXXXXXXX" Square150x150Logo="Assets\Square150x150Logo.png" Square44x44Logo="Assets\Square44x44Logo.png" Description="XXXXXXXXXX" BackgroundColor="transparent">
        <uap:DefaultTile Wide310x150Logo="Assets\Wide310x150Logo.png">
        </uap:DefaultTile>
        <uap:SplashScreen Image="Assets\SplashScreen.png" />
      </uap:VisualElements>
    </Application>
  </Applications>
  <Capabilities>
    <Capability Name="internetClient" />
    <uap:Capability Name="phoneCall" />
    <uap:Capability Name="picturesLibrary" />
    <uap:Capability Name="userAccountInformation" />
    <DeviceCapability Name="location" />
    <DeviceCapability Name="proximity" />
    <DeviceCapability Name="webcam" />
  </Capabilities>
</Package>

有没有人知道为什么会这样?

0 个答案:

没有答案