Visual Studio 2010 Extension for grouping files into folders - visual-studio-2010

I'm looking for an Extension that allows me to group Files into Virtual folders.
Example:
I have a Solution with 3 Projects. UI (MVC), Security Layer, BusinessLayer/DAL.
Each of the 3 Projects have some classes/views that handles stuff for let's say "User Management":
UI : Views, Controller, ViewModels
Security Layer: Security Checks
BL/DAL: Business Logic, Data Access
What I want is an Extension like a "Logical Solution Explorer" where I can create Virtual Folders in it and put links to all "User Management" classes/views in it.
Is there something like that available?

I really like the Favorite Documents extension. It sounds like it could help. You can find more information about it at: http://www.svprogramming.net/favorite-documents/

Related

Menu-commands extension for Visual Studio without command-table

I am building a Visual Studio extension (VSIX) with menu commands depending on the options for the extension. Its dynamic, what commands (how many) depends on the options.
I have a solution for it that uses the command-table, like: Dynamically add menu items
I would like to skip the command-table and build the menus totally programmatically, like: HOWTO: Package with commands created by code
The reason is to make it more dynamic. So if the user adds/changes/deletes in the options of the extension it would be handled dynamically (programmatically). On saving options the menu-command tree would be rebuildt. If I use a command-table I will have to add/delete nodes there to be able to solve it.
The thing I can not figure out is howto add the objects for "groups" and "menus" programmatically.
So I am out for the class/interface that has "AddGroup" or "AddMenu" as methods.
Is this at all possible or do I have to use the command-table? If it is possible I would appreciate links to code-examples for it.
Regards Hans
MVP Carlos Quintero has published sample code using IVsProfferCommmands3.AddNamedCommand that illustrates how to programmatically add menu items via the automation services (formerly utilized by the now discontinued add-in extensibility model).
https://github.com/visualstudioextensibility/VSX-Samples/tree/master/PackageCommandsCreatedByCode
While add-ins are no longer supported, the automation interfaces are still present. So you can use these, bearing in mind these menu items (aka commands) are temporary.
Also, the sample code here is a little outdated, using Package instead of AsyncPackage, and ProvideAutoLoad attributes. So you'll also want to read up on the following:
https://github.com/microsoft/VSSDK-Extensibility-Samples/tree/master/AsyncPackageMigration
https://devblogs.microsoft.com/visualstudio/updates-to-synchronous-autoload-of-extensions-in-visual-studio-2019/
Sincerely,

Is it possible to target Office Add-Ins in the Ribbon based on AD Properties?

I am trying to build a new add-in command (button) to add to the Home tab in the Outlook ribbon. This is easy enough to do, but my organization also wants to target the button based on properties in one's Active Directory profile (specifically department). Is this possible? Thank you so much!
This is pretty straightforward with desktop office add-ins (like VSTO). All you need to do is basically to get information about the currently logged in user organizational unit from the active directory, and then show/hide/modify buttons depending on this information.
From the tags on your question, it looks like this is NOT what you are looking for (please correct me if I am wrong)? The fact that you added "office365", probably means that you are interested in javascript (cloud/browser/store) solution?
For javascript-based add-ins, the part where you get the user department from its profile was impossible until recently. Now you may check out the Single-Sign-On API (added last year). It provides you information from user's Azure active directory profile, meaning that your organization is supposed to be part of it.
Another difficulty could be, dynamic display of the related buttons (showing/hiding/enabling/disabling) (I may be wrong, but it looks like it is still not supported for javascript). You can try to create a workaround for that by building a custom task pane instead (you can do whatever you want on your task pane)
--- update ---
In case of .NET VSTO add-in, you can get user groups using:
UserPrincipal.Current.GetAuthorizationGroups()
Then you can control which buttons/controls to show/hide by providing callback function(s) in your code and in your ribbon interface definition file (you need to define Ribbon using XML, not with UI designer). There are callbacks available like getVisible, getLabel, etc.

Solution Explorer - custom icons for my folders

Is there any way I can change the icon for my folders? In a large MVC project with a number of areas, it would be nice to see that Controllers, Model and Views have a different icon (or text).
Folder with M or V or C would be nice. I can create those if I know how to substitue them in. Even on a project by project based change.
Here is a screenie showing that some system type folders have different icons.
according to the following post, it is possible, but you will need to create your own project subtype:
http://social.msdn.microsoft.com/Forums/en/vsx/thread/7403bcaf-6389-4a9f-b64b-cd7e297027aa
the microsoft help page for the sample can be found at:
http://msdn.microsoft.com/en-us/library/bb165055(VS.80).aspx
and the sample itself is in the VS 2010 SDK SP1:
http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=21835
there may be another way to do it with the new managed extensions, however, i did not locate samples for this for VS 2010.

Is my Visual Studio project a web application or a web site?

First of all, when to use what and the overall differences between them has already been answered before. But I couldn't find an answer to this question:
Where can I check if my Visual Studio project is a Web Application or a Web Site?
The easiest way to differentiate between Web Site and Web Application is to look at the project's icons.
Web Site
has an icon without the used language
displays its physical root path
does not have a Properties folder
Web Application
has an icon including the used language
displays the project's name
has a Properties folder
To find out more about the technical differences between them ...
ASP.NET Web Site or ASP.NET Web Application?
Personally, one tell tale sign for me is whether the project folder actually contains a project file, or not.
You can see the icons differ slightly in VS - a web application has a layered world->docs->language icon and a web site just consists of world->docs.
Also, once opened within VS, right-clicking will display Properties and Property Pages for web applications and web sites respectively; further, on clicking this option you will be greeted with a dialog for the former and MDI tabbed form for the latter - the latter also exposes more functionality to control pre and post build steps and so forth.
A a web application will also display Properties and References special folders as part of the project tree in the Solution Explorer, whereas a web site does not necessarily; unless manually created for some reason (but they still won't be special - web sites use the bin folder for their references).
I recently found out (painfully) that web applications do not support Profiles which is not fun. Web sites however do support them and make life much easier. I noticed here people saying there are no major differences. This one is quite major and can make your life difficult if you select to make a web application instead of a web site.
Web application and Web Site are VS templates, nothing more. I doubt you will find this information directly somewhere in project. You can try to go through template differences list and guess how this particular project was created.
For Web Site project, once run (F5) you can change the code in the code-behind, the solution will allow it and it will compile on the fly when saved.
A Web Application project, however, will not allow this. This is the simplest way of being able to tell between the two.

How to do design list view like SharePoint 2010 Custom List or Document Library?

I am generation Recent Activity list from SharePoint 2010 site,
What i need is ,i have to display the list in a particular page,The UI must be like a SharePoint 2010 Custom List or Document Library,
How to design it, Is there any way to do this.
If your data source is a SharePoint list, you could use the [ListViewWebPart][1] to achieve this. What exactly are the requirements of the view - should you also include the context-sensitive menu ("Edit properties" etc) ? If not, you could just create a custom web part and override the CreateChildControls method, and there mimic the html/css that is rendered in a document library.

Resources