intellisense

Visual Studio 2005 - 'Updating IntelliSense' hang-up

醉酒当歌 提交于 2019-12-21 12:42:58
问题 I am having trouble with my Visual Studio 2005 IntelliSense for some time now. It used to work fine, but for some reason the 'Updating IntelliSense...' does no longer seem to be able to complete for the solution I'm working on currenly- it simply gets stuck somewhere at about 3-bars of progress and blocks one of my precious CPUs for eternity. Deleting the .ncb file of my solution and performing a full 'Clean' afterwards was no help. The 'Update' simply gets stuck again. The project I'm

Why EditorBrowsableState.Never exists?

北慕城南 提交于 2019-12-21 12:07:45
问题 There exists an EditorBrowsableAttribute in the System.ComponentModel namespace. The type EditorBrowsableState has following members: Advanced Always Never What could be the reason for this annoying attribute? Especially the state Never. It's hiding functionality and then when you find it you feel dirty using it. So if you are working at Microsoft and implemented this class tell me plz... :) The only case I can imagine this attribute makes sense is when you want to mark something as obsolete

C# Class Library method summaries are not showing in intellisense

眉间皱痕 提交于 2019-12-21 12:03:31
问题 Fairly self-explanatory I feel 回答1: I'm guessing here, but if this is your class library, you have to make sure you actually build the XML documentation file, otherwise the method summaries will only be available from within the same assembly. Project Properties -> Build Tab -> Output section -> Check "XML documentation file" Obviously, as Mitchel points out, you have to import it too, but this is generally automatic when you add an assembly reference (as long as it exists). 回答2: When you

C#: Adding extension methods to a base class so that they appear in derived classes

喜欢而已 提交于 2019-12-21 10:12:08
问题 I currently have an extension method on System.Windows.Forms.Control like this: public static void ExampleMethod(this Control ctrl){ /* ... */ } However, this method doesn't appear on classes derived from Control, such as PictureBox. Can I make an extension method that appears not only in Control, but for classes derived from Control, without having to do an explicit cast? 回答1: You must include the using statement for the namespace in which your extensions class is defined or the extension

Why no intellisense when LINQ statement has no where clause?

时光总嘲笑我的痴心妄想 提交于 2019-12-21 07:57:11
问题 Can anyone tell me why I do not get intellisense with this code: var testDocuments = (from u in db.TestDocuments orderby u.WhenCreated descending select u). but I do get intellisense with this code: var testDocuments = (from u in db.TestDocuments orderby u.WhenCreated descending where 1==1 select u). 回答1: When I run into this kind of problem I switch my coding style a little: var testDocuments = (from u in db.TestDocuments orderby u.WhenCreated descending select u). Translates into var

Visual Studio default Auto Complete to use System Type Name

让人想犯罪 __ 提交于 2019-12-21 05:49:09
问题 Strange question but my boss is a touch old school and has insisted in our coding standards that we do not use C# shorthands for system types, he likes us to use the full system name. He likes things to be verbose and I happily comply with the standard. However, something which after several months has started to grate on me is the fact that visual studio does not like to comply with the standard when completing code. So if I type: KeyValuePair<Int32, Object> MyValue = new Visual studio will

How do I get intellisense for WCF Ajax Services?

怎甘沉沦 提交于 2019-12-21 05:32:35
问题 I've finally got Intellisense working for JQuery by applying patch KB958502 to Visual Studio 2008 and including this line: /// <reference path="JQuery\jquery-1.3.2.js"/> at the top of my .js files. Now I'm trying to figure out how to get JavaScript intellisense for the client proxies generated by the ScriptManager's ScriptReference elements (as shown here): <asp:ScriptManager ID="ScriptManager1" runat="Server" EnablePartialRendering="false" AsyncPostBackTimeout="999999"> <Services> <asp

Can I customize the intellisense value shown when hovering while debugging in visual studio?

混江龙づ霸主 提交于 2019-12-21 04:31:22
问题 When I hover over a variable in visual studio, it brings up a small control which shows the variable name, type, and a + box for viewing members, etc. But for some types the variable type is replaced by more helpful information such as "{X = 0.0 Y = 0.0 Width = 0.0 Height = 0.0}" for a RectangleF. Is there a way to specify what should be displayed? Is there an IDE setting? Is there a function attribute? I am using visual studio 2008, language is visual basic. 回答1: The DebuggerDisplay

ASP.net MVC 3 Razor - jQuery Intellisense

我的梦境 提交于 2019-12-20 18:45:18
问题 I am using Visual Studio 2010 / ASP.net MVC 3 with the Razor View Engine. I created a new Project with the Internet Application template. What do I need to do to get Intellisense working? 回答1: If that's jQuery specific as the title specifies, trying adding line to the tag in the Views/Shared/_layout.cshtml (or .vbhtml ) file: @if (false) { <script src="../../Scripts/jquery-1.4.4-vsdoc.js" type="text/javascript"></script> } This will reference the intellisense file to VisualStudio and still

Visual Studio Crash when typing in editor

穿精又带淫゛_ 提交于 2019-12-20 18:31:36
问题 I have been using VS2010 for a few weeks but for the past few days it has been totally unusable, when i type anything into the editor Visual Studio throws an exception, then I get lots of intellisence errors (the code is fine, I can compile it if I run before trying to use the editor) - here is the log message: <entry> <record>241</record> <time>2011/01/25 08:30:34.109</time> <type>Error</type> <source>Editor or Editor Extension</source> <description>System.InvalidCastException: Unable to