Fresh WebViewApp (Android) Template out of the box shows Intellisense Errors (see below).
Why does VS2017 not find the references? Do the referenced dlls even contain the required namespaces? How can I solve this issue?
Basic demo
Official Xamarain RazorTodo Sample also has same Intellisense Errors
Details below...
Errors occur only in RazorView.cshtml (only when opened)
Error CS0234 The type or namespace name 'Linq' does not exist in the namespace 'System' (are you missing an assembly reference?)
Error CS0234 The type or namespace name 'Helpers' does not exist in the namespace 'System.Web' (are you missing an assembly reference?)
Error CS0234 The type or namespace name 'WebPages' does not exist in the namespace 'System.Web' (are you missing an assembly reference?)
Error CS0115 "_Page_Views_RazorView_cshtml.Execute()": No suitable method found to override.
Out of the box, there are referenced:
Mono.Android
mscorlib
System
System.Core
System.Web.Services
System.Xml
System.Xml.Linq
Path of reference assemblies are as follows:
C:Program Files (x86)Reference AssembliesMicrosoftFrameworkMonoAndroidv1.0System.Xml.Linq.dll
Path of assembly Mono.Android is:
C:Program Files (x86)Reference AssembliesMicrosoftFrameworkMonoAndroidv7.1Mono.Android.dll
Target Framework (in Projekt Properties):
Use newest platform (Android 7.1 (Nougat))
Versions:
- Microsoft Visual Studio Community 2017, Version 15.3.5
- Also Visual Studio Community 2015
- Microsoft .NET Framework, Version 4.6.01038
- Mono Debugging for Visual Studio 4.6.8-pre (ec7034f)
- NuGet-Paket-Manager 3.5.0
- Xamarin 4.6.0.299 (b63523e27)
- Xamarin.Android 7.4.0.21 (2851083)
Installed Android SDK:
- Android 7.1.1 (API 25): SDK Platform, Sources for Android SDK
- Android 7.0 (API 24): SDK Platform, Sources for Android SDK, Google APIs
- Android 5.0.1 (API 21): SDK Platform
- Android 4.4.2 (API 19): SDK Platform, Google APIs
- Extras: Android Support Repository Rev. 47
----UPDATE----
I updated my question. Project does compile BUT I cannot work because I get Intellisense Errors and no syntax highlighting ;)
I tested out IntelliSense in Razor files (.cshtml) stopped working and Xamarin WebView - No Intellisense in razor
So I cleared ComponentModelCache and deleted RazorTemplatePreprocessor in registry.
----UPDATE 2----
I INSTALLED VS2017. STILL SAME ERRORS. THIS $§%& SHOULD WORK RIGHT OUT OF THE BOX!!! WHAT AM I DOING WRONG???
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…