Overriding the three slashes automatic documentation - visual-studio

Is there a way to automatically fill in the XML documentation created by Visual Studio when you type ///?
I want to auto fill the documentation like the variable name separated based on camel casing.
I could write a Visual Studio Add-In and bind it to different key combination, but wanted to see if there is any other way to do so.

GhostDoc might be able to help - it's excellent for generating XML comments.

You can use either GhostDoc or Resharper with the stylecop plugin.

Related

autoexp.dat does not seem to take affect in Visual Studio C++ 2005 debugger

autoexp.dat does not seem to take affect in Visual Studio C++ 2005 debugger.
I am not trying to add any custom rules. Just want commonly used stuff like stl::string, to display in a friendlier manner.
Does anyone know. how I can accomplish this? Is this just question of specifying a path to the autoexp.dat file somewhere. The file is available under the Visual Studio installation directory.
I had a similar problem in 2008, with the debugger showing only the e.g. std::vector _Myfirst,
_Mylast members rather than the vector size and children.
Open Tools/Options/Debugging/General and clear the flag "Show raw structure of objects in variable windows"
(Presumably the suggest
This got me the closest.
http://garrys-brain.blogspot.com/2007/12/stlport-visual-studio-2005-visualisers.html
It would appear you need to make adjustments for types while using ports.
Also you might have to make changes to the display to display exactly what you want.
I think this may have to do with the infamous VirtualStore in Windows Vista/7. I could change this in XP but when I try to update the autoexp.dat file in Win7 it creates a copy in AppData\Local\VirtualStore.... instead. I assume that the studio does read the original file when starting, so my changes are not seen. If anyone knows how to be able to edit the actual file please tell me how!

Visual Studio solutions - how to ensure project properties are shared?

If you use Visual Studio 2008 and have many project files within solutions how do you keep them in sync? In other words, if you change a property in one project, how do you ensure that this property is automatically changed in other projects?
Given that enough contributors are mystified about the notion of nested solutions, I'll just work from the assumption you meant "solution with multiple projects". You give them common settings by using a project property sheet. Start with View + Other Windows + Property Manager. Open one of the nodes, right-click a configuration and choose Add New. Choose a location that makes sense for the solution, the solution directory for example. Configure the settings the way you want them.
Repeat this procedure for all other projects in your solution, now using Add Existing. Every project will inherit the settings you configured in the sheet, unless it overrides them explicitly. You may have to go back to the project properties and change an override back to "inherit".
IDE support for project property sheets is a bit flaky, be sure to save them explicitly when you make a change.
I have to say, I've not heard of "nested solutions", and I'd need a pretty compelling reason to do anything of this sort. Especially considering your question really centers on "how do I maintain duplication?" since you say the solutions will share properties. It's a cardinal rule in programming "do not duplicate thyself".
You could put the required options into a compiler response file, and use the same response file in each of your .vcproj files.
See here: http://msdn.microsoft.com/en-us/library/3te4xt0y(VS.71).aspx
Basically, you create a text file like SharedOptions.rsp, and on each line of the file specify a different command-line compiler option. Like /I.\include or /DDEFINE or whatever.
Then in the c++ command-line property page of each project, you add this in the additional options box: #"SharedOptions.rsp".
Then when you edit the options in the text file, they will be picked up by all projects. It is possible that the property manager solution provided by nobugz is just a gui for this - I don't know, I am more of a command-line kinda guy.
I guess you've already done something about this in the last 2 months, but this answer is more for the googlers...
I ended up using global variables available within Visual Studio. These were variables like $ProjectName and the like. There are many available already within VS, they can be user-defined as well.

Schema for .vssettings files?

I would like to hand edit a Visual Studio team settings file to make a few changes. Is there a documented schema anywhere (either XSD or English prose) for .vssettings files?
Could you please elaborate on what you want to edit, and why? I'd be very surprised if you came across something that isn't settable from the GUI. If you need to automate some IDE setup across multiple machines, I'd suggest IDE macros.
Technically - the answer is no. vssettings files are not validated against any schema, documented or not.
In case it isn't obvious from the element names how to achieve what you want - you might, for example, set the desired option with the GUI and diff the resulting vssettings with the initial one.
But, again, why would you want to do that?

Is there a 'scratch pad' window in Visual Studio

I currently use notepad to store little notes to myself about my code.
This is usually a mixture of code and requirements.
Is there a 'scratch pad' type window in VS where i could do this.
The other alternative is to use code comment blocks in the source files, but that's not quite what I'm looking for.
Try the sticky notes add in
http://www.davidhayden.com/blog/dave/archive/2008/03/18/VisualStudio2008AddInStickyNotes.aspx
http://code.msdn.microsoft.com/StickyNotes
On "Solution Level" you can add files (text, html or code) to act as notes files.
Also in projects, you can add files, and set the Build Action to None.
Most of the time I'd simply add a .txt file to the solution or abuse comments to do it. However, if you use the scratch pad to store todo lists et cetera you can use TODO: in your comments and visual studio will add them to the built in todo list.
I just found that visual studio has support for git style .md or markdown:
This provides good way of storing notes, requirements and developer instructions such as a readme.
To use: Just add a file to your solution with a .md extension.
I think Stick notes wont support VS 2005. Anyway WinDBG rocks.

Can I generate values for a custom parameter such as a timestamp for a Visual Studio Item Template?

I would like to include the current timestamp as part of a Visual Studio Item Template (the timestamp of when the file is created by the user). Is this possible?
It's really simple. There are several built-in replacement parameters that you can use. For a timestamp, include $time$ in the template. It will be replaced by the current date and time in the format DD/MM/YYYY HH:MM:SS.
Check this excellent guide: Create Reusable Project And Item Templates For Your Development Team
You can cause code to be executed when a template is expanded by implementing a wizard. The wizard need not have a user interface, but can populate a dictionary of name/value pairs. The values can then be substituted into the template.
Look in the Visual Studio SDK documentation for the topic named "How to: Use Wizards with Project Templates". I believe you can also use a wizard in an item template.
Also, take a look at the Guidance Automation Toolkit, which provides a declarative way to create wizards, among many other things.

Resources