Grabacr07 / VirtualDesktop

C# wrapper for the Virtual Desktop API on Windows 11.
MIT License
631 stars 135 forks source link

System.NullReferenceException #20

Open ghost opened 7 years ago

ghost commented 7 years ago

If I start the example in a desktop app I get the following error: foreach (var id in VirtualDesktop.GetDesktops().Select(x => x.Id)) <<<<<<<<<<<<< ! Error { }

System.NullReferenceException: "Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt."

TorstenPr commented 7 years ago

Same here. Windows 10 (x64) 1703, Framework 4.6.1

var desktops = VirtualDesktop.GetDesktops();

"Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt."

bei WindowsDesktop.VirtualDesktop.d__17.MoveNext() bei System.Linq.Buffer1..ctor(IEnumerable1 source) bei System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source) bei WindowsDesktop.VirtualDesktop.GetDesktops()

jcb871 commented 7 years ago

Same issue with Stable build(1.0.3). But latest beta build(2.0.0-beta3) works :)