将分辨率添加到Visual Studio Simulator for Windows 10 UWP应用程序
如何在win 10 Visual Studio 2015模拟器的默认分辨率列表中添加/更改分辨率?通过创建如下XML配置,可以向模拟器添加更多分辨率:将分辨率添加到Visual Studio Simulator for Windows 10 UWP应用程序,uwp,windows-10-universal,simulator,Uwp,Windows 10 Universal,Simulator,如何在win 10 Visual Studio 2015模拟器的默认分辨率列表中添加/更改分辨率?通过创建如下XML配置,可以向模拟器添加更多分辨率: <?xml version="1.0" encoding="UTF-8"?> <ArrayOfHardwareConfiguration xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.
<?xml version="1.0" encoding="UTF-8"?>
<ArrayOfHardwareConfiguration xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<HardwareConfiguration>
<Name>Surface55</Name>
<DisplayName>Surface 55"</DisplayName>
<Resolution>
<Height>1080</Height>
<Width>1920</Width>
</Resolution>
<DeviceSize>55</DeviceSize>
<DeviceScaleFactor>100</DeviceScaleFactor>
</HardwareConfiguration>
</ArrayOfHardwareConfiguration>
表面55
表面55“
1080
1920
55
100
您需要按如下方式命名该文件:
硬件配置-{Name}.xml 在我的例子中,这将是: 硬件配置-Surface55.xml 然后将XML文件弹出到以下文件夹中,用您安装的版本替换{version}: C:\Program Files(x86)\Common Files\Microsoft Shared\Windows Simulator\{version}\HardwareConfigurations
创建名为
HardwareConfigurations
的文件夹(如果尚未存在)我在C:\Program Files(x86)\Common Files\Microsoft Shared\Windows Simulator\14.0\文件夹中没有硬件配置。然后怎么办?是否有文件名约定?HardwareConfigurations-{Name}.xml,因此在我的示例中是HardwareConfigulations-Surface55.xml。我已更新了答案以反映这一点。此解决方案不再适用于Visual Studio 2019,如果我将提及的文件添加到文件夹不支持可用的分辨率
@alvinmeimoun,单击分辨率按钮时会出现以下错误,到目前为止,它正在工作。我正在使用VS 2019 16.7.1和Windows Simulator版本16。我已经成功地执行了上述步骤并创建了“Surface go”屏幕。没有任何错误消息。可能是您创建的XML中的一些错误?