简体   繁体   中英

IDE0007 Visual Studio error isn't preventing build but won't go away. How do i get rid of it?

We just switched from VS 2015 to VS 2017 a week ago, and when I opened the project in 2017, we got all kinds of errors, including but not limited to the following:

IDE0007 - Use var instead of explicit type IDE0022 - Use expression body for methods

I don't want these as errors. I want them as suggestions AT BEST. preferably i need them to go away completely. but no matter what i do, i can't fix it. i went into tools -> options -> code style preferences to no avail. I changed them all to "suggestions" but it hasn't changed anything. They're all showing up as suggestions, warnings, AND errors at the same time.

I don't have any extensions installed. I thought maybe resharper, but it isn't there. We've used StyleCop from the start of the project, but it has NEVER complained about these errors, and it never marks them as errors, it always marks them as warnings. I'm at a loss. Any help would be greatly appreciated.

I re-ran the VS 2017 installer and modified it by adding an extra package (data and analytics). when i brought it back up, it was fixed. not much of an answer, i'm sorry. but a commenter above said that the data to which I'm referring is stored in the references node of the project.

I ran into the same problem, and I was able to hide those kinds of errors by selecting the "Build Only" option from the dropdown in the Error List menu (instead of "Build + IntelliSense", which was showing by default for me)

Here is a screenshot of the ErrorList and dropdown

在此处输入图片说明

EDIT: Unfortunately, the build error underlines still show up on my file. I am trying to resolve that now.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM