Xamarin WebView 项目中的智能感知错误 [英] Intellisense errors in Xamarin WebView Project

查看:41
本文介绍了Xamarin WebView 项目中的智能感知错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Intellisense 在 Xamarin Mono.Android 项目中的 Razor 文件 (.cshtml) 中不起作用(例如您的 RazorTodo 或在 VS2017: New Project -> 选择 V​​isual C# -> WebView-App (Android))

Intellisense does not work in Razor Files (.cshtml) in a Xamarin Mono.Android Project (e.g. your RazorTodo or in VS2017: New Project -> Choose Visual C# -> WebView-App (Android))

编译没问题,但我收到了参考错误(仅限 Intellisense).

Compilation is fine, but I am getting reference errors (Intellisense only).

The type or namespace name 'Linq' does not exist in the namespace 'System' 
The type or namespace name 'Helpers' does not exist in the namespace 'System.Web'
The type or namespace name 'WebPages' does not exist in the namespace 'System.Web'

C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\MonoAndroid\中没有System.Web.dll

There is no System.Web.dll in C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\MonoAndroid\

我只是想知道这是否是预期行为?

如果需要,我会提供更多屏幕截图或信息.谢谢您的支持.

I will provide further Screenshots or info if required. Thank you for your support.

另外我无法编译项目.我的 Razor 视图 (.cshtml) 的处理文件 (.cs) 中存在错误.

In addition I cannot compile the project. There are errors in the processed file (.cs) of my Razor view (.cshtml).

Name "Href" is not found in current context

这里出了什么问题?

推荐答案

当您在 .cshtml 页面 中引用库时,请确保在添加 '@' 之前你参考图书馆.

When you are referencing libraries in .cshtml pages make sure that you are adding '@' before you reference the library.

-示例:

@using System;
@using System.Collections.Generic;
@using System.Web;

这篇关于Xamarin WebView 项目中的智能感知错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆