2016-07-14 82 views
0

我们正在尝试为我们的Cordova项目的Package.appxmanifest添加Iot功能。 Visual Studio抱怨说我们试图使用的功能无法找到,也不是基础名称空间的孩子。Windows 10 IOT Foundation命名空间丢失IOT

下划线的IOT:能力显示了当鼠标悬停在以下几点:命名空间“http://schemas.microsoft.com/appx/manifest/foundation/winows10” 元素“BackgroundTasks”在命名空间“http://schemas.microsoft.com/appx/manifest/iot/windows10”无效子元素“能力”。预期可能的元素列表:'...

事情是我创建这个作为一个新项目,让vs做所有的工作,但它无法解决它自己创建的条目。我们用VS生成的一个新的C#和JS项目来看这个。任何人都可以帮忙吗? (是的,我们也为项目添加了“UWP的Windows IoT扩展”参考10.0.10586.0)。仅供参考我们在添加时也会遇到同样的错误。

这里的package.appxmanifest:

<?xml version='1.0' encoding='utf-8'?> 
<Package IgnorableNamespaces="uap mp iot" xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10" xmlns:iot="http://schemas.microsoft.com/appx/manifest/iot/windows10" xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest" xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10"> 
    <Identity Name="com.project.syndication.sitepad" Publisher="CN=$username$" Version="2.0.0.0" /> 
    <mp:PhoneIdentity PhoneProductId="a885d1d0-453e-11e6-a59d-550bfa336405" PhonePublisherId="00000000-0000-0000-0000-000000000000" /> 
    <Properties> 
     <DisplayName>SitePad App</DisplayName> 
     <PublisherDisplayName>ERT</PublisherDisplayName> 
     <Logo>images\StoreLogo.png</Logo> 
    </Properties> 
    <Dependencies> 
     <TargetDeviceFamily MaxVersionTested="10.0.10586.0" MinVersion="10.0.10586.0" Name="Windows.Universal" /> 
    </Dependencies> 
    <Resources> 
     <Resource Language="x-generate" /> 
    </Resources> 
    <Applications> 
     <Application Id="com.project.syndication.sitepad" StartPage="ms-appx-web:///www/index.html"> 
      <uap:VisualElements BackgroundColor="#464646" Description="CordovaApp" DisplayName="SitePad App" Square150x150Logo="images\Square150x150Logo.png" Square44x44Logo="images\Square44x44Logo.png"> 
       <uap:SplashScreen Image="images\splashscreen.png" /> 
       <uap:DefaultTile ShortName="SitePad App" Square310x310Logo="images\Square310x310Logo.png" Square71x71Logo="images\Square71x71Logo.png" Wide310x150Logo="images\Wide310x150Logo.png" /> 
      </uap:VisualElements> 
      <uap:ApplicationContentUriRules> 
       <uap:Rule Match="ms-appx-web:///" Type="include" WindowsRuntimeAccess="all" /> 
      </uap:ApplicationContentUriRules> 
     </Application> 
    </Applications> 
    <Capabilities> 
     <Capability Name="internetClient" /> 
     <uap:Capability Name="picturesLibrary" /> 
     <iot:Capability Name="systemManagement" /> 
    </Capabilities> 
</Package> 
+0

您的代码是否编译并运行正常? – Jackie

回答

0

悬停错误看起来像什么(VS?),我看到一个bug它多次,但我的代码仍然编译和运行正常。

不用担心这一点。