Detailed compiler warning settings in Visual Studio - visual-studio-2005

How to change the detailed settings of the compiler warnings in Visual Studio? All I could find is the "Warning levels" property on the "build" tab of a project.
In particular, I'd like the VS to display "Missing XML comments" not only for public members, but also for internal and protected. Are such settings possible?

Not really an answer to your question but you can use an external tool, like StyleCop, to enforce coding guidelines like documenting all members, regardless of the fact it's public or not.
Maybe you can add it as a pre-build event, integrating the enforcement with your build process.

Related

Where is the idiom configuration for VS "Quick actions and refactoring"?

When writing non english comments in Visual Studio 2022, "Quick actions and refactorings" it offers spelling corrections in the english dictionary (EN-US). There is any way to have multiple dictionaries, on different idioms?
I cannot find the options for it, or any documentation on how to setup the dictionary, or if is possible to have multiple idioms.
I didn't noticed that I had a spell checker extension installed.
I thought that it was a native feature of VS.
Specifically, I had EWSoftware Visual Studio Spell Checker extensión, whose documentation is here.
His settings can be found at VS menu Tools>Spell Checker>Edit Global Configuration>Dictionary Settings
There, is possible to select more dictionaries, and add them, as documented here. It does not works until VS is restarted.

Visual Studio trying to step into BCL cs files

When I step through my application and get to a object like List... the debugger looks for a List.cs file somewhere on disk, can't find it and then asks me where it is with some pop up window inside VS. I feel like this was some setting I made in the properties and now I don't know how to turn it off. VS 2012
I just encountered a similar error in VS2013 - in my case it was looking for Stack.cs in the BCL code. The fix for me was to go into Options > Debugging > General and check the "Enable Just My Code" checkbox.
You might have "Enable .NET Framework source stepping" enabled (see http://msdn.microsoft.com/en-us/library/cc667410.aspx). So when you are at List... and trying to step into, it will actually try, but you don't have the sources for that. There is also a new experience for using the .NET framework reference source that was announced recently: http://blogs.msdn.com/b/dotnet/archive/2014/02/24/a-new-look-for-net-reference-source.aspx

Visual Studio Find All Not Referenced

In Visual Studio is there an automatic way to search over file(s) and find all classes/properties/methods that aren't referenced. Essentially abandoned code.
I don't want to manually have to right click on each and select "Find All References"
This is not a feature of Visual Studio in the current version. Using Roslyn you could code and Inspector yourself, but Roslyn doesn't offer one out of the box either at the moment. The walk-through on Semantic analysis should get you started. The roslyn forum is a good place to seek help or find examples, and there's a well monitored tag on StackOverflow as well of course.
Productivity plugins like Resharper and Code Rush offer this for sure. There are other similar tools that might have this feature JustCode, VisualAssist, CodeItRight are likely candidates.
You can also use something like Visual NDepend to detect unused methods. Their new command Linq to Code features should make it relatively easy to build a commandline tool that fishes out all unused calls.
A bit late but if you install SSDT (Sql Server Data Tools) this also add grayed reference count to each method in visual studio.
Note: This is actually "code lens" which is no longer available for VS2015. Installing the SSDT is the way you can have "code lens" in VS2015.

Live compiler checks when developing and CTRL clicks in Visual Studio 2010?

I'm working from home and can't reach the server where my Resharper license is hosted, so Resharper is not working at the moment.
Without Resharper I don't see any develepment time compiler checks. So when I type
var test = new NonExistentClass();
I am not seeing any warning until I build the project. I assume this can be configured somewhere, but I can't find it.
Secondly, I am really missing the ability to CTRL + click method calls, variables and class names to jump directly to their declarations. Is this something Visual Studio 2010 is not capable of? I use this a lot and I must say I haven't seen a IDE that can't do this before, so I am hoping this also can be configured somewhere.
You can enable live error checking by checking Tools, Options, Text Editor, C#, Advanced, Show live semantic errors.
You can enable Ctrl - MemberName navigation by installing the Productivity Power Tools.

No IntelliSense for C++/CLI in Visual Studio 2010?

I just moved from Visual Studio 2008 to Visual Studio 2010 (final) and noticed one major flaw:
When I try to use AutoComplete in a C++ source file for managed C++, a small note in the footer appears:
IntelliSense for C++/CLI is not available
Uh, has IntelliSense for C++/CLI been dropped from Visual Studio 2010? Is there any way to get this back? It is rather useful...
You are correct. Unfortunately it has been dropped. You can check this opened issue on Microsoft's Connect website.
I'll just quote them for the sake of the answer:
Unfortunately in this release we had to cut the intellisense support for C++/CLI due to time constraints. If you want to get some intellisense like quick info and memberlist on the native classes you can get it by choosing no /clr support in the project properties.
About getting back intellisense, your best chances for now are using third-party tools like VA Assist for example. I've tried it with Visual Studio 2008 and its IntelliSense is a whole lot better than the default one.
It is available again in Visual Studio 2012.
If you want to get IntelliSense back, install Visual Assist X from Whole Tomato Software. Here you can get a 30-days trial to check the intellisense.
According to the Visual C++ Team Blog, C++/CLI Intellisense will be in the next version of Visual Studio, but not in a service pack for VS2010. That blog post also gives some detail as to what went wrong and led to this sad state.
I don't know if you can use this settings but it work for me. I only check the Common Language RunTime Support for the cpp files that use it. I do not check it for the whole project and I've got intellisense for all the files that don't use the CLI.
Yes! you can enable the IntelliSence, but in a tricky way. Follow these instructions:
Go to your project properties. (Right click on your project name in
Project Explorer, and select Properties. or simply Alt + Enter)
From Configuration Properties, select General
In the right-hand section, find "Common Language Runtime Support"
and change it to "No Common Language Runtime Support".
Click the OK Button.
Now the IntelliSence is working. But a problem is an error when you compile your code! (The error is: error LNK1123: failure during conversion to COFF: file invalid or corrupt)
You can simply go back to Project Properties an change Common Language Runtime Support to "Common Language Runtime Support, Old Syntax (/clr:oldSyntax)".
Good luck.
This solution is only if you don't want Common Language Runtime
It worked for me in VS2010
Go to Project Propreties > Configuration Properties > General > Common Language Runtime Support and set it to No Common Language Runtime Support.
This will work fine just after hitting Apply button.
As mentioned you could install some paid software such as "Visual Assist X from Whole Tomato Software".
or
You could use open source tools that contain intellisense*, one such tool is Qt Creator 3.3.1 (opensource). You have two options, either setup your entire project with Qt to compile using VS2010 compiler, or use Qt to link to your source files and compile with VS2010. You write your code in Qt, save, flip windows to vs2010 and compile and debug.
When changes are saved in Qt, vs2010 will automatically reload the source file in the project and you can compile.

Resources