I have localized version of Visual Studio and in new solutions XML-documentation from Base Class Library is displayed in IntelliSense in my language. But when I open solutions downloaded from Internet, this documentation is displayed in English. How can I choose this language?
I looked over project and solution properties and but did not found such setting. Changing language of assembly does not affects this. Possibly IntelliSense language setting is stored in hidden .suo file, but is is in binary format.
Actually I need to change documentation language because I am using GhostDoc and it generates documentation for member overloads in current IntelliSense language while generating all other documentation in English. GhostDoc also does not have such setting.
A little late but the answer is:
There is no such setting.
GhostDoc searches for the documentation of the .NET assemblies which are referenced.
Therefore if an english dll is referrenced, the documentation is in english
It is even worse, existing comments for own written methods seem tobe from file code model of VS, base classes from their documentation.
So you can have the case that you try to "ghostcomment" a method and get english, and another one is displayed in spanish )...
Related
My project is written in C++/CX on VS2015 and I am seeking a way to generate API documentation.
After googling and stackoverflow, I have tried doxygen, VSDocman,NDoc, Atomineer Pro Documentation and SandCastle, I found these tools do not support C++/CX syntax, therefore, they cannot generate correct document.
I also tried to generate XML file which VS supports. But it's hard to read XML file.
How do I generate API documentation from C++/CX? Thanks for any suggestion
There are a lot of misconceptions about the C++/CX language extension. You tried too many products that have no hope of getting you anywhere. First and foremost is that it is a native C++ extension and does not generate a .NET compatible assembly. So knock out any that try to use Reflection to parse metadata. Out goes NDoc, VSDocman, Sandcastle. Atomineer is out, it is just an editor add-in.
So all you got left is doxygen.
Sure, it doesn't know about C++/CX out of the box. The FAQ points out that in order to make it compatible with a language, you need to modify src/scanner.l
Having a look at it, I see it already supports the C++/CLI extension. That's another C++ language extension that supports generating MSIL. C++/CX syntax is very close to C++/CLI. Just some minor differences, like the gcnew keyword is too misleading and replaced by ref new. But that's not the kind of syntax that doxygen cares about, it just wants to know about declarations. Those keywords are the same.
So the only obstacle I can guess at is that you just forgot to tell it about the language. It can't guess at it correctly from just the filename extension, .cpp and .h will get it to parse plain C++. Modify or add this line in the config file:
CPP_CLI_SUPPORT = YES
And tweak scanner.l if necessary.
At some point we detected that the comments from the XML documentation files for our .NET assemblies (DLL components) are neither displayed in VS 2010 nor in VS 2012. What could be the reason? Do we need some special settings (in the registry, etc) to get it working?
Found why this happened. We are using our internal tool to generate XML documentation files for our products – but not the equivalent C# compiler feature (in fact, the compiler’s /doc switch). Our documentation tool produces XML comment files in Unicode format, but the big surprise it does not processed by VS 2010/2012! Neither Big Endian nor Little Endian. The C# compiler gives us an ANSI XM comments file, and it works ok.
What to do if you need not only ANSI charset? Use UTF-8. I checked this –works ok in VS.
I'm porting a project from MSVS2005 to MSVS2010. I just loaded the solution in MSVS2010 and let the wizard convert the projects.
I ran into the property manager and found these property sheets (top-to-bottom):
Upgrade from VC 7.1
Microsoft.Cpp.x64(or Win32).user
Multi-byte Character Support (not editable)
Dynamic Link to MFC (not editable)
I understand the last three ones but I don't know what is the purpose of Upgrade from VC 7.1. Can someone give me a little explanation?
P.S. I found C/C++, Preprocessor, Preprocessor Definitions = _VC80_UPGRADE=0x0710;%(PreprocessorDefinitions) in property page "Upgrade from VC 7.1" but in project properties I see NDEBUG;WIN32;_LIB;%(PreprocessorDefinitions). What does all this mean? What is the _VC80_UPGRADE=0x0710 macro?
A project property sheet simply pre-sets settings for a project. Unless the project overrides the setting. Which your project does, it overrides the "Preprocessor Definitions" setting. The extra "%(PreprocessorDefinitions)" macro ensures that the definitions from the property sheets are appended and not lost.
So the definitions that the compiler sees are NDEBUG;WIN32;_LIB;_VC80_UPGRADE=0x0710
The _VC80_UPGRADE macro helps your old project to compile and run correctly on Visual Studio version 2005 or later. It is used, for one, in vc/atlmfc/include/afxres.h to ensure that the manifest resource has the correct ID.
You are skipping many VS and Windows versions so this doesn't exactly mean you'll have no problems at all. Particularly UAC can give you a headache.
I want to build a language service for visual studio 2010. I was first trying to follow the tutorial and documentations from MSDN.
The problem is i don't succeed to make this works (i'll explain later my problem). So i digged into existing implementations, i found Ook! and lua . both of these projects doesn't use the tutorial or documentation i found on MSDN, but something based on MEF. Lua used this only with previous Visual Studio versions.
So i'm wondering if i'm using an obsolete method to create a language service (But the documentation aims Visual Studio 2010), or there is different ways to do this, which depends on needs.
In my case, i've got a language that doesn't need to be compiled into cli, but i want to have an editor that have colorization, syntax warnings and errors, intellisense ...
The problem i mentionned is that when launching exp instance, there is no text editor with my file extension, and visual studio begins to have many lags. The language service is registered using 3 attributes : ProvideServiceAttribute, ProvideLanguageServiceAttribute and ProvideLanguageServiceExtension. Also initialized in Package intialize method, like mentionned in Proffer the Language.... The package is loaded when i try to open the file with my extension, the language service is initialized.
So i don't get it why i does not work, could you please help me to understand how language service works, and what is the best way to implement it
Thanks
Good chance your IScanner implementation has an endless loop, happened to me.
I hope this is a valid question: how does intellisense work in VS2008? I'm after what is known about the algorithm it uses to find the suggestions, when exactly it pops up (the "." is just one obvious trigger), how its behavior can be modified if at all possible, etc.
To put this question into context: The main issue I'm trying to resolve is how to activate and deactivate intellisense in portions of the editor screen and how to modify where it searches to populate the suggestion box.
All information is welcome.
Take a look at this DIY Intellisense article on CodeProject.
It's more fun to reverse-engineer it, though. Let's consider the problem:
you need to identify the words of interest
you need to find the options possible
you need to present them
Now, the first step means you have to parse the code. You've got the C/C** keywords, you pre-parse the various function and class declarations, and load them into some kind of data structure. Then you parse the code and store the class, variable, etc names and put them in the same data structure.
The second step means you want a data structure which efficiently can search for a partial word and get all the words that have that prefix. You can do that with regular expressions, but that's not very efficient. An efficient data structure for that kind of search is a trie, which is discussed here on SO .
Once you have the list of possibilities, you just present it. You probably want to keep a reference to the root of the tree of possibilities so you can search them out in real time as someone types more letters.
Eclipse also has this feature and it is an open source project. Why not check out how Eclipse does it by actually looking at the code?
This question is too broad. Since there are a number of different languages the VS IDE supports out of the box AND there are N number of DSL and IDE enhancements that support alternative intellisense this implies a number of answers. If you are speaking about C# specifically then See the Tools | Options | Text Editor | C# | Intellisense area to see the available options of completion options. As far as the algorithm[s] used, you would be looking for the metadata of assemblies, copious caching of type members, MRU list for last member chosen for specific type, etc. If you have a more specific question, I'd suggest you clarify.
See the example of a DSL (ironpython) and its implementation here.
I haven't seen any text editor in VS that limits where IntelliSense shows up. It's all language specific. If your cursor is located at a point where IntelliSense might contribute to a valid token, that's when it will be used.
I believe there is some interaction with the project system being used, but that's as far as I know. I also believe there is a sample project system in the Visual Studio SDK, and that might give you an idea.
For such cases I sometimes use my own version of InteliSense that I developed for AutoHotKey when I want specific behavior. The point of this script is that it can be used with any editor, or basically any control accepting text. It works by recording text input and interpreting it upon syntax file.
You can perhaps use it as a base for the thing you want to achieve. I used ISense succesifully with several languages that don't have such thing, like Csound or even batch scripts. It will be possible to extend it to support C# using input monitoring in combination with Reflection.
Anyway, with AHK you can even control VS intelissense by "taking" the list of items it presents and filter it, or similar things. You may have some small problems with process boundaries but nothing that cant be fixed.
The intellisense ius generally, AFAIK, implemented using different methods. I read that Delphi is so fast that it implements isense by recompiling the project on each token and thats the reason C++ Builder didn't have isense as its compiling very slow.
As to your how to change where it looks question, short answer is, you can't. Intellisense for the most part is provided by reflection of assemblies included in your project ( and some other tricks with C++ ). What you are getting is a result of VS processing through all the assemblies you have included and all assemblies from the GAC.
That said, if you want to provide explicit intellisense results from a project you are working on, look into IVsContextualIntellisenseFilterProvider
Finally, for some insight into the behind the scenes process, check this blog post