如何将我的 UWP 应用程序添加到 Windows 10 个可以访问文件系统的应用程序的列表中?
how to add my UWP app to the list of Windows 10 apps that can access the file system?
如何将我的 UWP C# 应用程序添加到 Windows 10 文件系统隐私设置以允许我的应用程序的 broadFileSystemAccess 访问文件系统?
当我打开 "Choose which apps can access you file system" 下方的文件系统隐私设置时,我不知道如何将我的应用程序添加到那里列出的应用程序。
MANIFEST VALIDATION ERROR(由应用部署引起)...
Validation error. error C00CE014: App manifest validation error: The
app manifest must be valid as per schema: Line 50, Column 6, Reason:
Element
'{http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities}Capability'
is unexpected according to content model of parent element
'{http://schemas.microsoft.com/appx/manifest/foundation/windows10}Capabilities'.
Expecting:
{http://schemas.microsoft.com/appx/manifest/foundation/windows10}DeviceCapability. MOBILE
UPLOADER C:\PRIMARY\WORK\MOBILE
UPLOADER\Samples\CameraFrames\cs\bin\x64\Debug\AppxManifest.xml
添加答案 1 中的推荐后鼠标悬停弹出错误清单的屏幕截图...
因此,我根据上述 "Expecting" 建议更改了清单,部署后出现此错误:
Error DEP0700: Registration of the app failed. [0x80073CF6]
AppxManifest.xml(52,6): error 0x80070002: Cannot map the
broadFileSystemAccess well-known device name to a device interface
GUID for the
Microsoft.SDKSamples.CameraFrames.CS_1.0.0.0_x64__8wekyb3d8bbwe
package. Check that the device name is correct. MOBILE UPLOADER
我该如何纠正?
最新的应用清单...
<?xml version="1.0" encoding="utf-8"?>
<Package xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities"
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="Microsoft.SDKSamples.CameraFrames.CS" Publisher="CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US" Version="1.0.0.0" />
<mp:PhoneIdentity PhoneProductId="2344b9de-5071-42a6-8873-7fdeb38d53dd" PhonePublisherId="00000000-0000-0000-0000-000000000000" />
<Properties>
<DisplayName>Camera Frames C# Sample</DisplayName>
<PublisherDisplayName>Microsoft Corporation</PublisherDisplayName>
<Logo>Assets\StoreLogo-sdk.png</Logo>
</Properties>
<Dependencies>
<TargetDeviceFamily Name="Windows.Universal" MinVersion="10.0.15063.0" MaxVersionTested="10.0.17134.0" />
</Dependencies>
<Resources>
<Resource Language="x-generate" />
</Resources>
<Applications>
<Application Id="App" Executable="$targetnametoken$.exe" EntryPoint="CameraFrames.App">
<uap:VisualElements DisplayName="MOVANO System Hub Camera interface" Square150x150Logo="Assets\SquareTile-sdk.png" Square44x44Logo="Assets\SmallTile-sdk.png" Description="Camera Frames C# Sample" BackgroundColor="#00b2f0">
<uap:SplashScreen Image="Assets\Splash-sdk.png" />
<uap:DefaultTile>
<uap:ShowNameOnTiles>
<uap:ShowOn Tile="square150x150Logo" />
</uap:ShowNameOnTiles>
</uap:DefaultTile>
</uap:VisualElements>
<Extensions>
<uap:Extension Category="windows.fileTypeAssociation">
<uap:FileTypeAssociation Name="access">
<uap:SupportedFileTypes>
<uap:FileType>.txt</uap:FileType>
<uap:FileType>.bin</uap:FileType>
</uap:SupportedFileTypes>
</uap:FileTypeAssociation>
</uap:Extension>
</Extensions>
</Application>
</Applications>
<Capabilities>
<Capability Name="privateNetworkClientServer" />
<Capability Name="internetClientServer" />
<DeviceCapability Name="microphone" />
<DeviceCapability Name="webcam" />
<DeviceCapability xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities"
Name="broadFileSystemAccess"/>
</Capabilities>
</Package>
UWP 项目属性
将此行添加到您应用的清单文件并部署您的应用。然后它将显示在隐私设置的该部分:
<rescap:Capability xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities" Name="broadFileSystemAccess"/>
答案:Visual Studio > 构建 > 部署
然后,按 Window 键并搜索 FILE SYSTEM PRIVACY SETTINGS
你会看到你的应用程序。
您可以启用它,以便
如何将我的 UWP C# 应用程序添加到 Windows 10 文件系统隐私设置以允许我的应用程序的 broadFileSystemAccess 访问文件系统?
当我打开 "Choose which apps can access you file system" 下方的文件系统隐私设置时,我不知道如何将我的应用程序添加到那里列出的应用程序。
MANIFEST VALIDATION ERROR(由应用部署引起)...
Validation error. error C00CE014: App manifest validation error: The app manifest must be valid as per schema: Line 50, Column 6, Reason: Element '{http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities}Capability' is unexpected according to content model of parent element '{http://schemas.microsoft.com/appx/manifest/foundation/windows10}Capabilities'. Expecting: {http://schemas.microsoft.com/appx/manifest/foundation/windows10}DeviceCapability. MOBILE UPLOADER C:\PRIMARY\WORK\MOBILE UPLOADER\Samples\CameraFrames\cs\bin\x64\Debug\AppxManifest.xml
添加答案 1 中的推荐后鼠标悬停弹出错误清单的屏幕截图...
因此,我根据上述 "Expecting" 建议更改了清单,部署后出现此错误:
Error DEP0700: Registration of the app failed. [0x80073CF6] AppxManifest.xml(52,6): error 0x80070002: Cannot map the broadFileSystemAccess well-known device name to a device interface GUID for the Microsoft.SDKSamples.CameraFrames.CS_1.0.0.0_x64__8wekyb3d8bbwe package. Check that the device name is correct. MOBILE UPLOADER
我该如何纠正?
最新的应用清单...
<?xml version="1.0" encoding="utf-8"?>
<Package xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities"
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="Microsoft.SDKSamples.CameraFrames.CS" Publisher="CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US" Version="1.0.0.0" />
<mp:PhoneIdentity PhoneProductId="2344b9de-5071-42a6-8873-7fdeb38d53dd" PhonePublisherId="00000000-0000-0000-0000-000000000000" />
<Properties>
<DisplayName>Camera Frames C# Sample</DisplayName>
<PublisherDisplayName>Microsoft Corporation</PublisherDisplayName>
<Logo>Assets\StoreLogo-sdk.png</Logo>
</Properties>
<Dependencies>
<TargetDeviceFamily Name="Windows.Universal" MinVersion="10.0.15063.0" MaxVersionTested="10.0.17134.0" />
</Dependencies>
<Resources>
<Resource Language="x-generate" />
</Resources>
<Applications>
<Application Id="App" Executable="$targetnametoken$.exe" EntryPoint="CameraFrames.App">
<uap:VisualElements DisplayName="MOVANO System Hub Camera interface" Square150x150Logo="Assets\SquareTile-sdk.png" Square44x44Logo="Assets\SmallTile-sdk.png" Description="Camera Frames C# Sample" BackgroundColor="#00b2f0">
<uap:SplashScreen Image="Assets\Splash-sdk.png" />
<uap:DefaultTile>
<uap:ShowNameOnTiles>
<uap:ShowOn Tile="square150x150Logo" />
</uap:ShowNameOnTiles>
</uap:DefaultTile>
</uap:VisualElements>
<Extensions>
<uap:Extension Category="windows.fileTypeAssociation">
<uap:FileTypeAssociation Name="access">
<uap:SupportedFileTypes>
<uap:FileType>.txt</uap:FileType>
<uap:FileType>.bin</uap:FileType>
</uap:SupportedFileTypes>
</uap:FileTypeAssociation>
</uap:Extension>
</Extensions>
</Application>
</Applications>
<Capabilities>
<Capability Name="privateNetworkClientServer" />
<Capability Name="internetClientServer" />
<DeviceCapability Name="microphone" />
<DeviceCapability Name="webcam" />
<DeviceCapability xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities"
Name="broadFileSystemAccess"/>
</Capabilities>
</Package>
UWP 项目属性
将此行添加到您应用的清单文件并部署您的应用。然后它将显示在隐私设置的该部分:
<rescap:Capability xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities" Name="broadFileSystemAccess"/>
答案:Visual Studio > 构建 > 部署 然后,按 Window 键并搜索 FILE SYSTEM PRIVACY SETTINGS 你会看到你的应用程序。
您可以启用它,以便