[ ] Regression (a behavior that used to work and stopped working in a new release)
[x] Bug report <!-- Please search GitHub for a similar issue or PR before submitting -->
[ ] Feature request <!-- Please file a UserVoice request and include the link below https://wpdev.uservoice.com/forums/110705-universal-windows-platform/category/193402-uwp-community-toolkit -->
[ ] Sample app request
[ ] Documentation issue or request
[ ] Question of Support request => Please do not submit support request here, instead see https://github.com/Microsoft/UWPCommunityToolkit/blob/master/contributing.md#question
Would be like in Mobile emulator - model=Virtual, vendor=Microsoft
Nuget Package(s):
Package Version(s):
Windows 10 Build Number:
- [ ] Anniversary Update (14393)
- [ ] Creators Update (15063)
- [ ] Fall Creators Update (16299)
- [x] Insider Build (17074)
App min and target version:
- [x] Anniversary Update (14393)
- [ ] Creators Update (15063)
- [x] Fall Creators Update (16299)
- [ ] Insider Build (xxxxx)
Device form factor:
- [x] Desktop
- [ ] Mobile
- [ ] Xbox
- [ ] Surface Hub
- [ ] IoT
Visual Studio
- [x] 2017 15.3
- [x] 2017 15.4
Hey @DkmS1953, just to clarify, what kind of Virtual Machine are you using? VirtualBox, HyperV, etc...
ping @Romasz in case you can help here :)
@nmetulev I will try to check this out in upcoming days.
Hyper-V, Windows 10 b.17074 as guest system.
[image: Встроенное изображение 1]
public string DeviceModel => SystemInformation.DeviceModel.IfEmpty("🤷♂️");
public string ModelAndManufaker => $"{DeviceModel}, {DeviceManufacturer}";
public string DeviceManufacturer =>
SystemInformation.DeviceManufacturer.IfEmpty("🤷");
Wbr, Dyakov K.M.
2018-01-23 6:05 GMT+03:00 Nikola Metulev notifications@github.com:
Hey @DkmS1953 https://github.com/dkms1953, just to clarify, what kind
of Virtual Machine are you using? VirtualBox, HyperV, etc...ping @Romasz https://github.com/romasz in case you can help here :)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/Microsoft/UWPCommunityToolkit/issues/1754#issuecomment-359659883,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AYtJFTSSF6zQzmlH9xpV8EX96nI7_tqoks5tNUxrgaJpZM4Rlc_z
.
@DkmS1953 @nmetulev In the past days, finally I was able to run emulators on my machine, though the results are not promising. The mobile emulator shows correct values, but the virtual W10 desktop edition shows empty values like above. I've tried various methods Eas, Device, Enviornment finally Dns host. Unofrtunately all we are able to get is 'Windows.Desktop'. I'm not sure what we should put in such case - 'Unknown' may be one option, however IMHO string.Empty is still better, hence it's not localized and means that the developer has to handle such case himself.
It is probably because the Virtual Phones were custom made by Microsoft (Emulating an OEM phone), and Model = Virtual were actually used as values in the OS. Since any user can create a VM using a regular Windows Install, these values will be blank, as if using a non-prebuilt machine (That doesn't have hardware report values).
If any time that value was null or whitespace was determined to be a VM, would likely catch situations where the device was not a VM. Unknown is better.
Thanks for looking into this @Romasz.
Agree, there is no manufacturer or model, so it would make sense for these to be empty. Doesn't look like there is much we can do here other than updating the documentation to specify that the values will be empty if running in a VM. @Romasz would you mind updating the docs?
@WilliamABradley I didn't mean to treat empty strings as Virtual. Just thought that the toolkit is world-wide and would like to avoid strings in any language if possible. In such cases developer can decide what to do.
@nmetulev Sure, not a problem, though not today - it's quite late my time.
Thanks for adding documentation @Romasz . Closing issue.