I usually keep a text file in every project with these fields:
- TODO -
// List of things I need to do (bugs, problems etc.)
- SOLVED -
// List of things I've solved
- CHANGED FILES -
// List of files I've changed and need to commit
Is there a built in feature or a plug-in I can install that does something similar?
For todo and solved you can go to
View -> Task List
and see the task list window which will show all places in code that you have marked with //TODO:
You can also add your own tasks in here and mark them complete.
If you also look at
Tools -> Options -> Environment/Task List
then you can change which comments appear in the task list.
For a list of changed files it depends on your source control tool of choice - TFS has the pending changes window built-in, AnkhSVN has something similar if you are using subversion. Not sure about others (I prefer command line with git).
Related
Is there a file somewhere that I can use to do massive changes to the context menu in an easier fashion?
The GUI:
gives me no way to move a command from one menu to another, nor does it let me see what the command actually is (in order to add that same exact command to another menu), thus I don't have much to work with.
And thus I am seeking a file (or a gigantic registry key? ugh.) that I can edit somewhere else where I have more powerful tools. (my VS version is Enterprise 2017 if that matters)
You can find the defaults at C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\Profiles, with a general settings and some language-specific overrides. There's an additional override in IDE\VC\Profiles as well.
In my case, I wanted to move 'Start new instance" on a Project into the top-level context menu. So I:
Made a copy of CurrentSettings.vssettings
Added a new command where I wanted it (via the Tools > Customize... GUI)
Found the command I wanted to clone and moved it up one
Closed VS (it saves on exit)
Compared the two files to find the diffs (use your favorite tool.) You'll find them under Category[#name="Environment_CommandBars"]\CommandBars\UserCustomizations as add remove and modify entries
Took the Cmd attribute from the moved entry and pasted it over the added one (it was Cmd="{1496A755-94DE-11D0-8C3F-00C04FC2AAE2}:00000164" for me, to save interested parties a few steps)
Undid the move to retain only the added entry
I wasn't able to find a command entry for this anywhere in the defaults, so had to figure it out the hard way.
Is there a tool that will let me add/attach/associate notes to lines of code in Visual Studio 2013, but does not go into the source code.
Think of post-it notes sitting on some papers I'm working on, helping me keep track of some things I need to do, when I'm done I take them off.
Try the Visual Studio Task List
http://msdn.microsoft.com/en-us/library/txtwdysk.aspx
You can add items to it as needed, or add special comments in your code such as
// TODO: Do this later
Which will also show up in the task list.
What I usually do, if I don't want anything in the source code, is add a textfile to my project. You can do this by clicking:
Project -> Add New Item
And select Text File under General.
This way your notes are attached to your project to keep it central, but there is nothing actually in your source code. Maybe it helps.
I am doing a merge between two branches and TFS/Visual Studio 2013 is identifying 1800 files required to be merged. However, doing a diff between the two branches shows that there are only ~100 that are actually different.
The pending changes window mostly corroborates this, as all files are listed with a [merge] status except those which have actually changed; those have a [merge, edit] status.
Is there a way to filter the pending changes list to only show files which are really changed so I can do inspect the differences visually? It is very error prone to have to scroll through and manually do this, skipping items that show only [merge].
My current alternative would be to do a diff on the branches, and specifically look in the pending changes window at files which are identified as different, but that is rather cumbersome for something that should be simple.
Edit: Here is a screenshot of the pending changes window. I only care about the items which are [merge,edit] as it means there is a change and I want to see the diff. Conflicts will be shown in the Resolve Conflicts window. I don't care about [merge] items, as they are identical. There are 1000s of files with no changes, but I want to single out the ones that have changed and inspect the diff.
Try the following trick:
In Team Explorer, Ctrl+A all the included changes, right click and select Undo...
You'll get the Undo Pending Changes dialog with all the items selected. First of all, uncheck everything. Then observe that you have a column named Change and you can sort by it to have all the [Merge] changes stacked together, and you can check them all together and undo only them with a single click.
There is a tool which achieves that, "qbus vMerge" - which is a Visual Studio 2012/2013 plugin available in the Visual Studio Gallery. But it's only free for team projects with up to 5 registered users. In the pre-check-in dialog, you can filter the changes by Edits, Deletes and Adds.
Link:
http://visualstudiogallery.msdn.microsoft.com/cb2f3f5b-7cea-4f2b-9d47-0e51b2619bd0
Confession: i am one of the contributors.
You can do the merge and before checking in the files, just compare your branch folder with the latest version. So if you are merging from anywhere into branch-Servicing for example, Compare $/branch-Servicing with your local workspace for that branch:
You will get a list of all files that are binary different. With a simple double click, you can view the diff.
If you want to view all changes in a merge, excluding merge-only with no changes, the easiest way is to run tf diff from the VS command line. This will use the diff tool on all changed files. I believe this shows adds as well as edits. I do wish you could sort the pending changes window by type of change action like in previous versions.
I have been struggling with the same issue. ChangeType used to be a column that was available in the list view of vs 2012 pending changes. I was hoping it would be added to 2015, but no such luck.
Here is a command-line way of doing this against the pending changes:
tf status {pathToWorkspace} /format:brief /recursive | find ", " > c:\merge.txt
ex:
tf status c:\tfs\main /format:brief /recursive | find ", " > c:\merge.txt
It's not pretty, but at least it gets the filtered list easily.
Summary of: http://thesoftwarecondition.com/blog/2011/05/01/tfs-pending-changes-ignoring-files-which-are-identical-to-the-originals/
Method 1: TFS Power Tools
Install TFS Power Tools and execute tfpt uu /noget /r * in the root of the branch. As a result, TFS will go through and undo checkouts for any unchanged files whilst leaving your modified files untouched.
Method 2: Undo Checkout
Another option is to "Undo Checkout" all the changes, and clicking "No to All" when asked to confirm for undo checkout. This way Visual Studio will "undo checkout" all the files that are not changed, and all the changed files will remain checked out.
Drawback: this method undoes renames.
My question would be why do you care?
If you do the merge TFS will figure out at run time that the files do not need modification and you will not see them as changed in the annotate tool. However if you pick-and-choose the files to merge you will leave a bunch of "pending merges" hanging around that you will have to deal with later anyway...
If there are conflicts TFS will highlight them to you for dealing with.
If you do need to compare before you merge you can use the built in diff tool in Visual Studio that will let you diff a branch (or just folders) local->local, local->Server or Server->server.
When I make edits to file, TortoiseSVN will show an indication on the folder that file belongs to that there are changes pending to child items. AnkhSVN only shows (red tick) changes to a project when files are added/removed (because the actual content of the project file in this case has changed)
Can you make ankh give any indication at the project level that child items have been edited?
Unfortunately, no. Ankh only shows an indication on modified files, whereas TortoiseSVN can traverse folders recursively and mark those with changed files within them.
If you desperately need this feature, you can try out VisualSVN plugin. It tries to mimic TortoiseSVN behaviour as close as possible. In fact, it uses TSVN dialogs for operations such as Commit or Update, for instance. When you modify a file within a project, it highlights the file, the project this file belongs to, as well as the solution node in the Solution Explorer.
Unfortunately, it's not free (US $49 per seat), but IMO it is worth its price.
The recommended way to see what changed globally in AnkhSVN is the 'Pending Changes' toolwindow. This shows you all interesting files in a single view and allows you to operate on them easily.
You can open the toolwindow via View->Pending Changes.
Try this:
Right Click the File -> Subversion -> Lock
This places a lock on the file so that others cannot edit it.
When you commit, it should unlock the file.
If it does not, Follow the same steps and select Unlock.
Edit: I use AnkhSVN for my svn but it's just me that uses it. If a corporate environment I mainly use TFS which does the same thing (lock/unlock) but it does not allow others to check out.
I use the code reformatting tool in ReSharper to get some standard format on my code, but I don't like that it moves methods around.
For instance if I rename a method, and then reformat, the method is moved. This makes merging changes between branches a nightmare.
Is there any setting I have missed that will disable this particular part of the reformatting?
Set up a custom R# profile
Click Resharper > Tools > Code Cleanup
Then choose "Edit profiles", add a new profile, deselect what you don't want and save it.
Run this profile in the future
You should modify the Type Members Layout xml for that. In that file you have several patterns which you can reorder or delete to get the behaviour you want. All the changes you make in that file will be reflected in the following file:
C:\Documents and Settings\user\Program Data\JetBrains\ReSharper\v4.5\vs8.0\UserSettings.xml
so you can make a backup before playing with it or add it to your source code tree.