Reputation: 55
I followed this tutorial: https://learn.microsoft.com/en-us/windows/uwp/audio-video-camera/media-playback-with-mediasource and copied following line:
mediaSource = MediaSource.CreateFromStorageFile(file);
But Visual Studio shows an error: "The type name 'CreateFromStoargeFile' does not exist in the type 'MediaSource'"
And MediaSource
doesn't contain any Method/Property/... The IntelliSense poup doesn't even show.
I guess there is something wrong with Visual Studio or the UniversalWindowsPlatform core. I let Visual Studio repair itself but it doesn't work.
Edit: The metadata of MediaSource contains all methods though...
Solution:
I put the new
keyword in front of the MediaSource
...
I am ashamed of myself...
Upvotes: 1
Views: 158
Reputation: 119
From your screenshots, it looks like you are using the new
keyword in front of your method call.
Try removing that.
Upvotes: 2