2017 年 Visual Studio 无法引用 Windows 物联网
Unable to reference Windows IoT in Visual Studio 2017
当我将 Visual Studio 2017 升级到 15.8.2 时,它崩溃了,我不得不擦除所有内容并重新加载。从那以后,我一直无法获得 UWP 的 Windows IoT 扩展。当我单击项目中的引用时,Windows IoT Extension 会显示一个黄色三角形。我右键单击引用以添加引用,转到通用 windows(它显示核心和扩展),我单击扩展,但 Windows IoT 不存在。我已经卸载并安装了 VS2017 很多次,我认为我正在按照安装信中的 IoT 说明进行操作,但显然我太笨了,遗漏了一些东西。任何帮助将不胜感激。
<?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:iot="http://schemas.microsoft.com/appx/manifest/iot/windows10" IgnorableNamespaces="uap mp iot">
<Identity Name="3ac96fd1-69de-454f-a811-1b1ac668e762" Publisher="CN=kbown" Version="1.0.0.0" />
<mp:PhoneIdentity PhoneProductId="3ac96fd1-69de-454f-a811-1b1ac668e762" PhonePublisherId="00000000-0000-0000-0000-000000000000" />
<Properties>
<DisplayName>Water_Dewater</DisplayName>
<PublisherDisplayName>kbown</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="Water_Dewater.App">
<uap:VisualElements DisplayName="Water_Dewater" Square150x150Logo="Assets\Square150x150Logo.png" Square44x44Logo="Assets\Square44x44Logo.png" Description="Water_Dewater" BackgroundColor="transparent">
<uap:DefaultTile Wide310x150Logo="Assets\Wide310x150Logo.png">
</uap:DefaultTile>
<uap:SplashScreen Image="Assets\SplashScreen.png" />
</uap:VisualElements>
</Application>
</Applications>
<Capabilities>
<Capability Name="internetClient" />
<iot:Capability Name="lowLevelDevices" />
<iot:Capability Name="systemManagement" />
<DeviceCapability Name="109b86ad-f53d-4b76-aa5f-821e2ddf2141" />
</Capabilities>
</Package>
enter image description here
UWP 的 Windows IoT 扩展将通过 Windows Software Development Kit(SDK) 安装在以下路径上。
安装完成后,您可以在控制面板中查看。
您可以尝试安装SDK看看是否有帮助。
更新:
当我将 Visual Studio 2017 升级到 15.8.2 时,它崩溃了,我不得不擦除所有内容并重新加载。从那以后,我一直无法获得 UWP 的 Windows IoT 扩展。当我单击项目中的引用时,Windows IoT Extension 会显示一个黄色三角形。我右键单击引用以添加引用,转到通用 windows(它显示核心和扩展),我单击扩展,但 Windows IoT 不存在。我已经卸载并安装了 VS2017 很多次,我认为我正在按照安装信中的 IoT 说明进行操作,但显然我太笨了,遗漏了一些东西。任何帮助将不胜感激。
<?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:iot="http://schemas.microsoft.com/appx/manifest/iot/windows10" IgnorableNamespaces="uap mp iot">
<Identity Name="3ac96fd1-69de-454f-a811-1b1ac668e762" Publisher="CN=kbown" Version="1.0.0.0" />
<mp:PhoneIdentity PhoneProductId="3ac96fd1-69de-454f-a811-1b1ac668e762" PhonePublisherId="00000000-0000-0000-0000-000000000000" />
<Properties>
<DisplayName>Water_Dewater</DisplayName>
<PublisherDisplayName>kbown</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="Water_Dewater.App">
<uap:VisualElements DisplayName="Water_Dewater" Square150x150Logo="Assets\Square150x150Logo.png" Square44x44Logo="Assets\Square44x44Logo.png" Description="Water_Dewater" BackgroundColor="transparent">
<uap:DefaultTile Wide310x150Logo="Assets\Wide310x150Logo.png">
</uap:DefaultTile>
<uap:SplashScreen Image="Assets\SplashScreen.png" />
</uap:VisualElements>
</Application>
</Applications>
<Capabilities>
<Capability Name="internetClient" />
<iot:Capability Name="lowLevelDevices" />
<iot:Capability Name="systemManagement" />
<DeviceCapability Name="109b86ad-f53d-4b76-aa5f-821e2ddf2141" />
</Capabilities>
</Package>
enter image description here
UWP 的 Windows IoT 扩展将通过 Windows Software Development Kit(SDK) 安装在以下路径上。
安装完成后,您可以在控制面板中查看。
您可以尝试安装SDK看看是否有帮助。
更新: