简体   繁体   English

Intellisense 无法在现有网站上的 VS2010 中运行

[英]Intellisense not working in VS2010 on Existing Websites

I have the strangest error in VS 2010, that I have been Googling for 2 days and nothing fixes it.我在 VS 2010 中遇到了最奇怪的错误,我已经用谷歌搜索了 2 天,但没有任何解决方法。 The site was built in 2005. But my co-workers can open it in 2010 and get intellisense.该网站建于 2005 年。但我的同事可以在 2010 年打开它并获得智能感知。

I can't get it for anything in App_Code.我无法在 App_Code 中获得任何东西。 Which would make sense if opened as "Web Application".如果作为“Web 应用程序”打开,这将是有意义的。 But its created and opened as "website"但它创建并打开为“网站”

So here is what works: (1) Open "new Website" --> Go to existing site directory --> Get prompt that it exists --> Select "open existing website" --> I get intellisense.所以这是有效的:(1)打开“新网站”-> Go 到现有站点目录--> 提示它存在--> Select“打开现有网站”--> 我得到了智能感知。

(2) Close VS, use solution file from above, no intellisense. (2)关闭VS,使用上面的解决方案文件,没有智能感知。

(3) Close VS, Open same site as "Open Website" --> No intellisense. (3)关闭VS,打开与“打开网站”相同的站点-->没有智能感知。

Reason i even found this work around, if just trial and error.如果只是反复试验,我什至发现这个工作的原因。 But I don't want to create a new project every single time I open a website.但我不想每次打开网站时都创建一个新项目。 It creates a bunch of temp files under C:/Windows/Microsoft.NET every time.它每次都会在 C:/Windows/Microsoft.NET 下创建一堆临时文件。 Plus site is huge, and it takes forever to load.另外网站很大,加载需要很长时间。

Any ideas why my settings won't stick.任何想法为什么我的设置不会坚持。 I tried to take setting from a Virtual Machine where it works when opening existing website.我尝试从打开现有网站时可以工作的虚拟机进行设置。 No luck.没运气。

Tried to reset settings.试图重置设置。 No luck.没运气。

Reinstalled VS.重新安装VS。

Any ideas?有任何想法吗? Cause I'm stomped.因为我被踩到了。

Dunno if this is you or not, but this happened at my company.不知道这是不是你,但这发生在我的公司。

If ALL the following statements are true:如果以下所有陈述都为真:

  1. Using SQL Management Studio 2008 R2使用 SQL Management Studio 2008 R2
  2. Connecting to a SQL 2008 or higher database server连接到 SQL 2008 或更高版本的数据库服务器
  3. Have Visual Studio 2010 Service Pack 1 installed已安装 Visual Studio 2010 Service Pack 1
  4. Intellisense in SQL Management Studio is not working SQL Management Studio 中的 Intellisense 无法正常工作

Management Studio uses the Visual Studio editor and VS2010 SP1 broke Management Studio's Intellisense feature Management Studio 使用 Visual Studio 编辑器和 VS2010 SP1 打破了 Management Studio 的 Intellisense 功能

You can fix the problem by installing the cumulative update.您可以通过安装累积更新来解决此问题。 Please install this only if Intellisense is broken in Management Studio.请仅在 Management Studio 中的 Intellisense 损坏时安装它。


Noticed you're looking for the.ncb files... Starting with Visual Studio 2010, it no longer uses the.ncb system.注意到您正在寻找 .ncb 文件...从 Visual Studio 2010 开始,它不再使用 .ncb 系统。 Instead, it creates a file with a.sdf extension.相反,它会创建一个扩展名为 .sdf 的文件。

if you'd rather let Visual Studio handle it then you can go Tools / Options / Text Editor / C/C++ / Advanced / Browsing/Navigation / Recreate Database: True, then restart Visual Studio.如果您宁愿让 Visual Studio 处理它,那么您可以 go 工具/选项/文本编辑器/C/C++/高级/浏览/导航/重新创建数据库:True,然后重新启动 Visual Studio。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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