错误信息显示错误.... [英] Error message shown in error....

查看:110
本文介绍了错误信息显示错误....的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

每次启动我的VS2017 Web应用程序项目时,我会得到一些红色下划线并由于隐式类型转换而被标记为错误 - 例如:



但这是错误的 - 要"纠正"它,我转到项目属性页面:



并忽略"选项严格",我改变了"选项推断"。到"关闭",然后保存,然后改变"选项推断"。回到其原始设置"ON"并再次保存(所以一切都恢复原样)现在
错误消息消失了,我可以继续工作!!


所以这不是致命的问题,但每次都要经历这种情况会让人感到恼火。 如果有人对如何制止它有任何想法,我将不胜感激。


问候


Phil





解决方案

尝试更新Visual Studio最高15.5.2:
https ://www.visualstudio.com/en-us/news/releasenotes/vs2017-relnotes 。并按照关于打开和关闭选项的步骤进行操作:

https://developercommunity.visualstudio.com/content/problem/160609/vb-option-strict-on-warnings-are -shown-ON-existing.html


Every time I start my VS2017 web application project I get certain lines underlined in red and flagged as an error due to implicit type conversion - eg:

but this is wrong - to "correct" it, I go to the project properties page:

and, ignoring the "Option strict", I change "Option infer" to "Off", then Save, then change "Option infer" back to its original setting of "ON" and Save again (so everything is back to as it was) and now the error messages disappear and I can carry on working!!

SO this isn't a fatal issue, but it's something of an irritation having to go through this every time.  IF anyonew has any ideas about how to stop it I'd be grateful.

regards

Phil

解决方案

Try updating the Visual Studio up to 15.5.2: https://www.visualstudio.com/en-us/news/releasenotes/vs2017-relnotes. And follow the steps regarding turning the option On and Off: https://developercommunity.visualstudio.com/content/problem/160609/vb-option-strict-on-warnings-are-shown-on-existing.html


这篇关于错误信息显示错误....的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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