I want to get bootstrapped to analysis Visual Studio 2013 source.
To do that, I want to get a list of symbols of member variable, member function, local variable, class name, and so on.
I tried ctags, Clang.
ctags let me know some information, and easy to use it. But it doesn't show me local variables information.
Clang let me know about local variables, but compiling Visual Studio project with Clang is very difficult. :(
I heard Microsoft Visual Studio Language Service could help me, but it's not clear how to use it.
Is there any way to do get symbols, analysis codes? Can you provide the sample code?
You can analyze your Visual Studio 2013 source code with our SourceMeter tool, which creates CSV files containing all the information you asked for: list of member variables, member functions, etc. You simply have to provide your project file in command line.
Related
I'm working with Pybind11 in Visual Studio 2015. I configured the projects necessary properties. that is I set the include and library directories accordingly. That is I set them to these values:
Include Directories:
L:\FV\pybind11\pybind11\include;C:\Users\Master\Anaconda3\include;L:\FV\pybind11\pybind11\pybind11;$(IncludePath)
and for Library Directories:
C:\Users\Master\Anaconda3\Lib;C:\Users\Master\Anaconda3\libs;$(LibraryPath)
and currently everything seems working and compilations succeeds.
However, I get wiggly error lines when trying to use different methods, classes, etc from Pybind11, which is related to the intellisense failing to get the needed information.
This is how it looks :
Is there a way I can fix this and get full intellisense in this regard?
Upgraded to Visual Studio 2019 and the intellisense is working perfectly. This seems like an inherent problem in VS2015 and its lack of ability to properly index and provide intellisense.
I have my visual studio 2017 display red lines under many statements although the code compile fine !! any idea why and how to fix this ?
here is a picture
hover over one of the errors:
Before actually compiling and linking the game UE4 runs its own Unreal Header Tool. It generates a great deal of extra code. Because of that Visual Studio sometimes doesn't find some of the symbols that will be available after generation. There's is a page that explains that it's normal when you work with UE4.
Also, consider this. UE4 may use a unity build so it will make a giant .cpp file out of all your source files. It may happen that all of your "false positive" errors are resolved by the order in which those source files are included. But since Visual Studio treats every source file as a separate translation unit (not unity build) it will make sure that you don't use any undefined symbols.
If squiggles bother you too much, try to include all of the headers with the necessary symbols (for example "Components/InputComponent.h") in your source file.
I'm creating a Visual Studio 2010 extension package (Microsoft.VisualStudio.Shell.Package) that needs to analyze all of the projects and those project's references. I would assume that this is done with a service (e.g. Package.GetService(typeof(IMenuCommandService))). What I need is the interface that contains the functionality to get a list of projects and references for those projects. Also, any advice on where to find a reference that contains the available interfaces within visual studio would be much appreciated.
Note that I've seen multiple people trying to do something similar using DTE from a macro. That's not what I'm trying to do. I'm trying to do the same thing from within a Visual Studio Extension.
So even though you're doing this as part of an extension, you'll still need to use the DTE APIs to get all of the information you want. It may seem backwards but that's just how it works. You should grab the DTE object via (EnvDTE.DTE)Package.GetService(typeof(SDTE)). Once you have a EnvDTE.Project, access it's Object member and cast that to a VSLangProj.VSProject if it's a C# or VB project. This has the reference information you need.
Xcode has a feature where each type of file has a template that is filled out when that type of file is created. By default, those files are located at /Developer/Library/Xcode/Templates/File Templates.
These files are used to give whatever default code you want, such as a common file header, even including things like the copyright year. I've gotten quite used to the functionality in Xcode, but I find myself missing it in Visual Studio. With VS I have to manually copy-paste the header and modify it myself for each file. Is there a way to get Visual Studio to automatically populate files (such as cpp's or .h's) with code?
EDIT: I'm trying to do this with C++.
Yes, you can use templates with macros etc in Visual Studio as well. MSDN has an article on it, and there are various blog posts on the topic too. I know they work for C# and VB - I expect C++ works in the same sort of way, but you'll need to check of course. (Apologies if this isn't the case.)
Unfortunately last time I looked it required expanding and then compressing zip files in a way that seemed a little unnecessary, but it should be doable.
I am new to Visual Studio Extensibility and want to make an addin/extension which shall do the following:
It should read all the files with a specific file extension (assume "*.ump").
It should process the text/code/whatever in the files.
It should create new Class/Code file with some code in it. [The code will be produced in step 2, just need to know how to do it?]
Yet, I have been racking my brains through extensibility, saw the single file generators .... and addins which go through ProjectItems and can detect the file extension,
BUT I HAVE NOT BEEN ABLE TO FIND a complete tutorial, guide or explanation as to how or what to do!!
Please help...
You don't want to read all files with a specific file extension in Visual C++ project nor standard Visual C# project. You may do that with hand-made MSBuild project (included in the solution).
In Visual C++ projects, there is a way to define custom tools. They are run as separate processes, so you can implement them in anything you want. Studio will ask you whether you want to define a tool (they are defined in special xml files; studio has dialog for editing them) when you add a file with extension unknown to it. In Visual C# projects, just manually write a MSBuild tasks and insert them into the project.
Do whatever you want. IIRC the generated files will have to be included in the project though. Well, for MSBuild, just tweak the project to your heart's desire, but in Visual C++ they have to.
You can combine MSBuild (csproj,vbproj) and VisualC++ projects in a single solution, so I recommend using separate.
If you ever find out you need to compile for different target where you can't use Visual Studio, you'll be glad that you have stand-alone tool you were just calling from Studio and not something that embeds in it.