I am building a UWP app on Visual Studio 2015 Update 1. I am encountering errors where Compiler says "async is not a feature of C# 4.0 use 5.0 or greater", "Windows namespace cannot be found"
Error CS8025 Feature 'async function' is not available in C# 4.
Error CS0246 The type or namespace name 'ConnectionProfile'
However upon closing my solution and reopening it these errors disappear. And my app runs(in debug mode). However after a few debug sessions the problem resurfaces.
To Correct any errors on my part I Have :
1> Reset VS user Settings
2>Reinstalled VS
3>Reset Windows 10
But the problem doesn't want to go. I am using Windows 10 Home Edition and also I don't use insider builds. Recreated my project from scratch
As a result even the most basic tasks performed in my code appear erroneous.
Can you revise if you have installed Microsoft.NETCore.UniversalWindowsPlatform as a nuget package? Wen you create a new uwp project, automatically its added.
I had similar problem that some namespaces was not encountered and the answer was this nuget package.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.