成功构建Visual Studio 2015时Intellisense不断显示错误 [英] Intellisense keeps showing errors while build is successful Visual Studio 2015

查看:120
本文介绍了成功构建Visual Studio 2015时Intellisense不断显示错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以我正在研究Xamarin项目,突然间Visual Studio 2015吓坏了它,几乎在所有情况下都会显示错误红线:

InitializeComponent();

每个页面上都有红线,该项目的构建和运行没有错误,错误是来自Intellisense的,只有我在网上寻找解决方案的时候,很多帖子都在谈论这个问题,但没有一个对我有用. >

这就是我尝试过的:

1)删除.suo文件

2)删除xamarin临时文件夹(最终我删除了临时文件夹中的所有内容)

3)构建/清理-构建/重建

4)试图找到sdf Intellisense文件,但没有找到

5)许多人谈到了整形器问题,但我没有.

6)项目不在git上,所以这也不是问题

7)试图删除/bin和/obj也没有运气

我为此感到疯狂,有人可以帮忙吗?

解决方案

根据要求,我分享了为我解决问题的方法, 我从程序包管理器中的项目中卸载了xamarin表单,然后尝试再次安装它以查看是否有帮助,但没有成功,在一个绝望的举动中,我查看了程序包管理器中提供的更新, xamarin我不相信它将解决问题,因为该项目在当前版本上运行良好,但是无论如何还是尝试了一下,令我惊讶的是该问题已解决,似乎该更新修复了一些由于某些原因未重新安装的文件

由于我不认为这可以称为解决方案,因为并非每次都会发生此问题的解决方案,因此我得出结论,确定解决此问题的唯一方法是公开解决一个新项目,并痛苦地将您的代码迁移到新项目中, 这肯定可以解决问题,但这是一个痛苦的过程.

So I'm working on a Xamarin project and suddenly Visual studio 2015 started freaking out it shows error red lines under every thing nearly for example :

InitializeComponent();

in every page is red lined ,the project builds and runs without error, the errors are coming from Intellisense only I looked for a solution on the net many posts talked about this issue but none had a working solution for me.

so here is what I tried:

1)deleting the .suo file

2)deleting xamarin temp folder (and eventually I deleted everything in the temp folder)

3)Build/Clean - Build/Rebuild

4)tried to locate the sdf Intellisense file but found none

5)many talked about reshaper problems but I don't have it.

6)the project is not on git so this also is not the problem

7) tried to delete the /bin and /obj also with no luck

I'm getting crazy about this can someone help with this one?

解决方案

As requested I'm sharing what solved the problem for me, I uninstalled xamarin forms from my project in the Package manager and tried to install it back again to see if that helps but it didn't, in a desperate act I took a look at the updates available in the package manager and there was one for xamarin I didn't believe it will solve the problem since the project ran fine on the current version,but tried it anyway for my surprise the problem was solved, It seems that the update fixed some files that the reinstall didn't for some reason.

Since I don't think this can be called a solution since not every time this will happen there will be an update available to sort the issue, I came to a conclusion that the only thing to certainly fix the issue is to open a new project and painfully migrate your code to the new project, This will surely solve the problem but is a painful process.

这篇关于成功构建Visual Studio 2015时Intellisense不断显示错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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