Visual Studio编辑器的行为怪异!显示编译错误与每一个实例 [英] Visual Studio editor is behaving weird! Showing compilation error with every instance

查看:252
本文介绍了Visual Studio编辑器的行为怪异!显示编译错误与每一个实例的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

每当我编译在Visual Studio中的任何网站,我面临多重编译错误,但code被完全执行。我假设一些设置与我的VS编辑修改。

Whenever I compile any website in Visual Studio I face multiple compilation errors but code gets executed perfectly. I am supposing that some setting is changed with my vs editor.

以下是一些错误的列表:

Following are few error from list:

非法语法。期望有效起始名字符。 D:\\ Gourav \\的WebSite1 \\ Demo.aspx

Illegal syntax. Expecting valid start name character. D:\Gourav\WebSite1\Demo.aspx

字符'%',十六进制值0x25是XML名称是非法的。

Character '%', hexadecimal value 0x25 is illegal in an XML name.

字符'@',十六进制值0x40在以XML名称的开头是非法的。

The character '@', hexadecimal value 0x40 is illegal at the beginning of an XML name.

字符'@',十六进制值0x40在一个XML名称是非法的。

Character '@', hexadecimal value 0x40 is illegal in an XML name.

请帮忙!!

推荐答案

这很难说,不知道多一点,但还有的这里链接有关试图把一个正则表达式在这样的Web.config

It's hard to tell without knowing a bit more, but there's a link here about a trying to put a Regex in the web.config like this

<appSettings>
    <add key="SpecialCharacterRegEx" value="[~" # % & * :" < > ? / \ { | }]+"/>
</appSettings>

其中给出编译错误是这样的:

Which gives compilation errors like this:

1. Character ' ', hexadecimal value 0x20 is illegal in an XML name
2. Illegal syntax. Expecting valid start namecharacter
3. Application Configuration file"App.config" is invalid

诀窍是喜欢的东西替代它:

The trick was to replace it with something like:

<appSettings>
    <add key="SpecialCharacterRegEx" value="[~&quot; # % &amp; * : &lt; &gt; ? / \ { | }]+"/>
</appSettings>

我敢打赌,你的问题是在Demo.aspx类似的东西。

I'll bet your problem is something similar in Demo.aspx.

这篇关于Visual Studio编辑器的行为怪异!显示编译错误与每一个实例的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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