Question: Fresh Xamarin WebView Razor Template does not compile

Question

Fresh Xamarin WebView Razor Template does not compile

Answers 0
Added at 2017-09-07 20:09
Tags
Question

Fresh WebViewApp (Android) Template out of the box won't compile. Why does VS2015 not find the references? Do the referenced dlls even contain the required namespaces? How can I run the template?

Basic demo

Details below...


Errors occur only in RazorView.cshtml (only when opened, project does not run either)

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 Assemblies\Microsoft\Framework\MonoAndroid\v1.0\System.Xml.Linq.dll

Path of assembly Mono.Android is:

C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\MonoAndroid\v7.1\Mono.Android.dll

Target Framework (in Projekt Properties):

Use newest platform (Android 7.1 (Nougat))

Versions:

  • Microsoft Visual Studio Community 2015, Version 14.0.25431.01 Update 3
  • 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
Answers to

Fresh Xamarin WebView Razor Template does not compile

Source Show
◀ Wstecz