Skip to content
This repository was archived by the owner on May 15, 2024. It is now read-only.
This repository was archived by the owner on May 15, 2024. It is now read-only.

Device Type returns Physical instead of Virtual if I run UWP app in a VMware Guest VM #776

@MagicAndre1981

Description

@MagicAndre1981

Description

Steps to Reproduce

run the Essentials Sample app inside a Windows 10 VM that is powered by VMware Workstation.

Expected Behavior

static DeviceType GetDeviceType() returns DeviceType.Virtual

Actual Behavior

static DeviceType GetDeviceType() returns DeviceType.Physical

Basic Information

  • Version with issue: 1.1.0
  • Last known good version: n/a
  • IDE: VS2017 15.9
  • Platform Target Frameworks:
    • iOS:
    • Android:
    • UWP: 16299
  • Android Support Library Version:
  • Nuget Packages:
  • Affected Devices: Windows 10 1803 VM hosted by Vmware Workstation

Screenshots

image

image

Reproduction Link

your sample:

https://github.com/xamarin/Essentials/tree/master/Samples

possible Fix

change var isVirtual = deviceInfo.SystemProductName == "Virtual"; to var isVirtual = deviceInfo.SystemProductName.Contains("Virtual");

at https://github.com/xamarin/Essentials/blob/master/Xamarin.Essentials/DeviceInfo/DeviceInfo.uwp.cs#L64

image

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions