I'm working on a middle-sized project that contains several class libraries, database model and an ASP .NET MVC website project. However, even though there are less than 15 projects in the solution, I often find myself collapsing and expanding endless folders to find a certain class or view.
While looking for class is mostly solved by Resharper type navigation feature, I often want to switch to a certain view in MVC project. I don't remember the file name and it wouldn't solve the problem either because there are many views with same file name (e.g. Message\ViewSingle.cshtml, Product\ViewSingle.cshtml).
What I'd rather want is an ability to “favorite” certain files, projects or folders so they are displayed on a separate Solution Explorer-like window for quick access.
Is there such an extension available (for free)?
Update
#samy pointed out that Sergey Vlasov's Favorite Documents extension allows for quick access via the menubar, I usually tend to hide it and would prefer a dockable window solution so I'm still looking. I wrote Sergey to find out if he plans to work on this functionality.
Update (Aug 4th)
I just received a letter from Sergey in which he points me to Favorite Documents 1.1 got a dedicated window. Therefore I accept samy's answer.
You're in luck, this Favorite Documents extension is just out. I found it via the Morning Brew.
Favorite Documents by Sergey Vlasov
The free Favorite Documents extension lets you create links to
frequently used code files and then quickly open them as a group or
individually from the Favorites menu in Visual Studio 2010
Update
After being contacted about this thread, Sergey rolled out version 1.1 with several improvements and a dedicated window (as requested in question).
You can use Libraries on Windows Vista or Seven, and organize folders as you wish. Maybe is not complete solution for your problem, but just to mention that :)
Related
I have a solution in VS2013 that has multiple projects, one of which is code from a library which I don't often contribute to but I frequently pull from a repo. I'm looking for a way to show "//TODO" comments in the Task List from only the project I'm currently working on.
As it stands, the task list is inundated with //TODOs that other people are working on. My workaround is to name all of my personal TODOs as //JOB, but even being able to view just one project's //JOBs at a time would be a big plus and would prevent me needing to invent new comment names for each project I have in the solution.
VS2103 doesn't contain this functionally and some people requested this feature in MSDN VS blog.
You can extend VS2013 with Resharper that has a nice ToDo explorer.
Have a look here:
http://www.jetbrains.com/resharper/webhelp80/Reference__Windows__To-do_Explorer.html
You can group your TODOs by namespaces or projects for example...
Let me know if that supports you question.
We have some legacy Classic ASP websites to maintain, and are wanting to use VS2010 to edit them, due to familiarity because of lots of .Net work.
I can open the website inside Visual Studio.
I can configure IIS to run the website based on the working folder used in VS2010.
I can configure VS2010 to automatically open my default browser pointing to the correct location, using the 'Base Url' setting in the Properties page.
What I CAN'T do, is work out where VS2010 stores this value, as there's no mention of it in the solution file that VS2010 has created, and as there's no project file for the website, there's nothing there too. Yet, when I close and re-open VS2010, it somehow retains this information.
This is important to me, as I need to be able to commit all files to our source control for use by other developers and, ideally, not have them worry about setting this value themselves.
So, the question is: Where does Visual Studio 2010 store the Base Url when working on Classic ASP websites?
I don't know where this is saved, but in tracking things like this down in the past I typically take the following approach:
Open Visual Studio and change this one setting
Apply the changes
Look for all files that have been modified in the last 1 minute in the project folders and in the Visual Studio folders
You can be sure there will be at least a few other files changed that are not relate to this, but it should narrow your search. You may want to re-close VS before searching too, but that will modify other files as well (making for a slightly larger pile of changed files to sift through).
If you still don't have it, search the registry (but I cannot imagine this would be where it was storing anything project specific).
EDIT:
Just created a new project and played with setting this property. It is definitely stored in the .suo (Solution User Options) file for the project, in the root of the project folder as #Lankymart suggested (and is a hidden file if you are not seeing it). It is not stored in plain-text.
You may be able to access it programmatically here: http://msdn.microsoft.com/en-us/library/microsoft.visualstudio.shell.interop.ivspersistsolutionopts.loaduseroptions.aspx
As there are a ton of absolute path settings in these files, moving it to other environments is not really an option. I would suggest you are stuck with project start up documentation that lists these settings as part of the project setup process. I think any other solution is going to be equally annoying|fragile (or worse).
Not sure if there is another way to accomplish what setting the base URL does without managing from the Start Options panel - that is likely your last-best hope for a solution.
as VS2010 Task List only scans active file for Comment Tokens and Bookmarks may make troubles if developers have there project on different drives/paths, what would be the best way to manage open TODOs for projects where more than just two people are working on?
How do you solve such problems?
We use a Bugtracking tool but for develeopers it's common to use such tags as "TODO" in the code. Nowadays we use PRAGMAS, but we want to get rid of them to get less warnings in our nightly test builds.
For proper "to-do" management, we use JIRA, but calling it "to-do" management is doing it a little disservice. When you want to manage work chains across teams, you need to start looking at third party tools.
If you want Visual Studio integration, then Visual Studio Team System is designed for this, but I've got no experience with it so won't comment any more than that.
Another tool I have had experience with in the past is OnTime from Axosoft, but it has changed a lot from when I last used it. That said, when I was using it, it was quite a competent tool - I can only hope it has improved with age.
At home I use the issue tracking software in bitbucket, but this likely uses JIRA in the background as well - same parent company.
To improve the "to-do" view in VS, you can use ReSharper. It has a to-do list that scans all files and puts them in a tree view, but it isn't free.
Accessible via the "ReSharper -> Windows -> To-do Items" menu.
The to-do items comes with a decent amount of customization, so you can add your own literals and control how they appear in the code file (to-do is bold blue, for example). You can then apply filters to the to-do window to constrain what you are looking at.
If there is a to-do for a particular developer you could easily make a "TODO AH" tag (developer initials), then this developer can filter on his own items.
ReSharper is worth the money for possibly more reasons than I can effectively count at the moment.
On the current project I am working on, there is, at the moment, a large churn of code, which means updating from source control can mean at times many csproj file changes. As we all know, VS2010 doesn't have a "Reload all" button, but you must reload each project and confirm each reload.
Is there a method where either the project is auto-reloaded or the IDE can detect this and ask for a solution reload?
Finally found a solution:
http://lostechies.com/jimmybogard/2011/01/27/reloading-all-projects-with-vscommands/
Quoting from the site:
Quite often I’ll find myself working
in situations where multiple projects
have changed, and Visual Studio asks
to reload them, one at a time. This
happens when I’m working a lot with
source control, and doing things like
switching branches, performing merges,
or just integrating upstream changes.
I have to click “Reload” a million
times for each project that changed on
disk, and it’s quite annoying. On top
of that, VS forgets which files I have
open, so every file that I was working
on gets closed.
I may be the last VS user to find out
about this, but a free lite version of
the VSCommands plugin is available on
the Visual Studio Gallery that does
just what I need – reload all changed
projects at once, preserving which
files I had open:
It's a pain, but the best option I've found is to Close the solution before Getting the latest source code.
If there are more than two changed projects, it is faster to manually unload&reload the entire solution than it is to Get and wait for it to unload&reload the affected projects only - reloading projects is achingly slow (even disregarding having to click the OK button for every project that changed).
(In my mind the real question is: Why does it ask that question at all??? If you Get the latest source code, there is absolutely no sane reason why you would want to only use part of it. It's like a petrol station attendant saying "You've bought some fuel. Would you like me to now actually put it in your car, or shall I just pour it out on the ground?")
Well, that doesn't work if your references paths changed in the csproj file and your using something like the sysinternals junction tool to change a symlink. E.g. tool switches D:\Projects symlink from D:\Baselines\1.0\Prjects to D:\Baselines\2.0\Projects , and because someone changed the folder structure between 1.0 and 2.0, your .csproj file suddenly points the dll path from ....\References\some.dll to ....\References\3rd-Party\some.dll . I know that is a special case, but happens (e.g. in my company).
There is an alternative solution though, one which I highly recommend as it has other benefits, too: the not-so-well-known VS 2010 Extension Solution Load Manager. It defers loading of Projects to the background, or until manually loaded, improving solution load time a lot for large solution files. It has this "reload solution" button in it's menu (unfortunatlely there seems to be no shortcut) which then reloads all solutions from scratch, skipping/backgroundloading the solutions you set. A Microsoft guy commented on his blog that they wanted to include something similar into VS 2010, but the feature didn't quite make it.
Sure, it may take longer then "just" one click and updating 100 documents, but it solved my problem of (relative) reference path changes, and gives a nice speed boost every time I open an at least medium sized solution.
Edit as of Oct 2013
VS2012 includes this functionality by default. At least the async loading stuff. The "don't load at all" functionality is unfortunately only possible by using manual "unload project" in VS2012. But as pr-project memory consumption did go down with VS2012, it's not that big of a deal anymore.
If you have checked the option "detect when file is changed outside the environment" in the "Documents" section of options, projects and files are reloaded when changed. It works for me when switching branches in git.
I am new to using Microsoft development tools but have been using Visual Studio 2010, .NET 4 and C# for the past few weeks. I ran into a problem yesterday creating a new project the same way I have been doing it successfully from the start: right-click on the project in the Solution Explorer → Add Reference, which used to bring up this dialog:
Old Dialog Box http://img514.imageshack.us/img514/8978/oldaddreferencedialogue.jpg
After a couple of weeks of no new projects I went to create one yesterday and got a new Add Reference dialog. And trying to add the same dll I have been adding for weeks now resulted in the error seen here:
New Dialog http://img692.imageshack.us/img692/2074/newaddreferencedialogue.png
So, after a painful day trying to determine the cause, it looks to me like it has something to do with the new dialog choking on the # I had in my reference path. When I removed the # everything works as expected. Considering Microsoft has two .NET languages with # in the name, I am surprised that this issue keeps biting people (I have heard of this problem over the years, but I have never done much with Microsoft tools until recently, so of course I did not recall it.)
Questions from a Visual Studio newbie:
Is it common knowledge to not use # in paths?
How/why did I get this new Add Reference dialog when my colleagues, using the same VS version, still have the old dialog that handles # in paths just fine?
My opinion is that if you use weird characters in paths, you get what you deserve. :)
I know there are bugs about '#' character in paths in the core VS product, in addition to whatever may be in the Pro Power Tools extension. There is a surprising amount of code that goes to/from URIs and filenames, and '#' characters (and everything thereafter) get dropped when roundtripping via a System.Uri.
In general, I think it's safe to assume that when creating filenames/paths, there will be 10,000 tools of various quality trying to parse the filenames, and a (large) subset of those tools will fail on 'weird' characters. Just avoid weird characters whenever possible. You gotta choose your battles. In an ideal world, tools would be robust to these kinds of issues. In the real world, it's better to name a path "CSharp" rather than "C#" and move on with more important things in life.
The second dialog is the one from the VS2010 productivity power tools pack - I havent used it myself so dont know of any problems with it. Have you recently installed this?