Well, finally after 3 months delay I moved to UK (with my wife).
The weather - well, I assume no sunglasses will be needed.
The food - a lot of people told me that the food is horrible in compare to Israel, well I disagree - the food is very good (not excellent, but very good non the less).
The prices - naturally, as every foreigner, I divide and multiply all the time and the outcome is usually in favor of UK.
The people - I visited the bank, the police and various shopping centers - all the people were very very nice (even the policeman !) - my wife and I are really surprised in comparison to service-oriented-people in Israel.
I'm starting in Microsoft on Monday and I'm really exited about it! (need to get used to fact that the week starts from Monday)
Regarding the blog - I'll continue to write as usual, perhaps more about Visual Studio extensibility and DSL tools, but other topics as well.
How do I save a project via API in silent mode
Interfaces and classes needed
And the guids needed to handle menus:
Microsoft.VisualStudio.Shell.VsMenus, Microsoft.VisualStudio.Shell.9.0, Version=188.8.131.52
Microsoft.VisualStudio.VSConstants.VSStd2KCmdID, Microsoft.VisualStudio.Shell.9.0, Version=184.108.40.206
Microsoft.VisualStudio.VSConstants.VSStd97CmdID, Microsoft.VisualStudio.Shell.9.0, Version=220.127.116.11
VSLangProj.PrjKind, VSLangProj, Version=7.0.3300.0
VSLangProj2.PrjKind2, VSLangProj2, Version=7.0.5000.0
Project item kinds
EnvDTE.Constants.vsProjectItemKindMisc, EnvDTE, Version=18.104.22.168
EnvDTE.Constants.vsProjectItemKindPhysicalFile, EnvDTE, Version=22.214.171.124
EnvDTE.Constants.vsProjectItemKindPhysicalFolder, EnvDTE, Version=126.96.36.199
EnvDTE.Constants.vsProjectItemKindSolutionItems, EnvDTE, Version=188.8.131.52
EnvDTE.Constants.vsProjectItemKindSubProject, EnvDTE, Version=184.108.40.206
EnvDTE.Constants.vsProjectItemKindVirtualFolder, EnvDTE, Version=220.127.116.11
Microsoft.VisualStudio.Shell.Interop.LogicalViewID, Microsoft.VisualStudio.Shell.Interop.8.0, Version=18.104.22.168
Output window panes
Microsoft.VisualStudio.VSConstants.GUID_BuildOutputWindowPane, Microsoft.VisualStudio.Shell.9.0, Version=22.214.171.124
Microsoft.VisualStudio.VSConstants.GUID_OutWindowDebugPane, Microsoft.VisualStudio.Shell.9.0, Version=126.96.36.199
Microsoft.VisualStudio.VSConstants.GUID_OutWindowGeneralPane, Microsoft.VisualStudio.Shell.9.0, Version=188.8.131.52
Microsoft.VisualStudio.Shell.Interop.ToolWindowGuids, Microsoft.VisualStudio.Shell.Interop.8.0, Version=184.108.40.206
Microsoft.VisualStudio.Shell.Interop.ToolWindowGuids80, Microsoft.VisualStudio.Shell.Interop.8.0, Version=220.127.116.11
Microsoft.VisualStudio.Shell.Interop.UIContextGuids, Microsoft.VisualStudio.Shell.Interop.8.0, Version=18.104.22.168
Microsoft.VisualStudio.Shell.Interop.UIContextGuids80, Microsoft.VisualStudio.Shell.Interop.8.0, Version=22.214.171.124
VSLangProj80.vsContextGuids, VSLangProj80, Version=126.96.36.199
Check the post to get updates regarding the various guids.
In the last weekend there were number of tools/frameworks that were published/upgraded/etc
- FxCop 1.36 - .NET Code Analysis Tool for Microsoft .NET Framework Design Guidelines - documentation and download
- 200+ bug fixes that reduce noise, missing analysis and rule crashes
- Support for analyzing anonymous methods and lambda expressions
- New option for skipping analysis over tool generated code
- Spell checker libraries now ship in the box
- Changes in the way references are resolved and located
- Better support for C++/CLI and the Compact Framework
- Language 'friendly' API names in the UI and resolutions (ie Visual Basic syntax if running over a Visual Basic binary)
- New globalization, design and usage rules
- New rule for targeting specific versions of the Framework (I'll talk about this in a future post)
- Performance improvements that cut analysis by 2x and use half as much memory
- StyleCop 4.3 - Microsoft Source Code Style and Consistency Tool - download
- Enforce sort order for using directives. This aligns with the Organize Usings functionality in VS 2008
- Require standard summary text for constructors and destructors
- Require parenthesis in arithmetic and comparison expressions for added clarity
- Require String.Empty rather than “”
- Require explanation message text in debug asserts
- Require justification text in Code Analysis suppressions
- Enforce use of built-in type aliases for int, string, float, etc.
- Require a blank line between elements
- Disallow blank lines at the top or bottom of documentation headers
- Disallow regions within method bodies (enabled by default)
- Disallow the use of regions anywhere within the code (disabled by default)
- Disallow empty static constructors
- Disallow empty unsafe, lock, checked, and unchecked statements
- Disallow unnecessary or empty try\catch\finally
- Unity 1.2 First Drop - download
- Fix for a CLR bug that we hit that caused issues when running in release mode without a debugger attached
- Refactorings to support an easier Silverlight port
- Support for Generic Decorator Chains
- NHibernate 2.0 - download
With NHibernate, you do not need to-
- decorate your entities with any attributes
- inherit your business objects from any base classes
- implement an interface on your entities
Source files rebasing enables a common CI scenario where the code is compiled in one location and analyzed in another one.
One useful scenario is during 2 builds comparison. Usually, analysis results are done the same way and thus, source files paths are the same both in older and newer analysis results. In this condition, when trying to compare 2 versions of a source file NDepend tells that because the 2 paths are the same, it can’t compare the source files.
A solution to this problem is to fetch the older and the newer source files hierarchy from the source code repository and rebase both the older and newer application in VisualNDepend. This way, 2 versions of a source file can be compared properly.
The Visual Studio 2008 SDK 1.1 compliments the Service Pack 1 release of Visual Studio 2008. The SDK contains several new features such as:
· Significant size reduction for Visual Studio Shell redistributable packages. The Visual Studio Shell Isolated and Visual Studio Shell Integrated redistributables are now approximately 150 megabytes smaller. The redistributables no longer carry the full .NET Framework 3.5 payload. However, they contain a bootstrapper that automatically downloads the .NET Framework 3.5 runtime if it is not installed on the target computer.
· Support for progress feedback in a chained installation. The Visual Studio Shell Isolated and Visual Studio Shell Integrated redistributables can now pass installation progress back to the chaining process. This lets developers display accurate progress in their setup programs.
· Visual Studio Shell development now supports normal user. Developing and deploying a Visual Studio Shell application no longer requires the developer to be an administrator on a Windows XP computer or to have elevated privileges on a Windows Vista computer.
· DSL Print Preview. The ability to preview a DSL before printing has been added to the DSL designer.
· New XML Tree Editor sample. The SQL Server team has provided a new XML Tree Editor sample. The earlier sample has been removed.
· New TFS Samples. Two new TFS samples have been added.
o This new TFS sample provides an example of creating a Visual Studio add-in that interacts with the Version Control user interface of Team Explorer. The sample comes with a detailed Word doc that provides insight into the requirements of such an add-in.
o This new TFS sample provides an example of creating Work Item Tracking custom controls that work within Team Explorer. The sample comes with a detailed Word doc that provides insight into the requirements of custom controls as well as a separate document that describes how to write custom controls that can be used within the Team Server Web Access environment .
· Updated Shell documentation. Documentation about the Shell has been added.
In order to use the Visual Studio 2008 SDK 1.1, you will need to install Visual Studio Service Pack 1. The Visual Studio Service Pack is available here.
Once you have Service Pack 1 installed, you can download the Visual Studio 2008 SDK 1.1 from here.
If you run into any issues, check out our online readme here.
Although these tools are not that new but I want to remind all of you about their existences because they are very powerful and must part of the developers productivity toolkit.
Below is a list of the included in PowerCommands for Visual Studio 2008 version 1.1.
Enable/Disable PowerCommands in Options dialog
This feature allows you to select which commands to enable in the Visual Studio IDE. Point to the Tools menu, then click Options. Expand the PowerCommands options, then click Commands. Check the commands you would like to enable.
Note: All power commands are initially defaulted Enabled.
Format document on save / Remove and Sort Usings on save
The Format document on save option formats the tabs, spaces, and so on of the document being saved. It is equivalent to pointing to the Edit menu, clicking Advanced, and then clicking Format Document. The Remove and sort usings option removes unused using statements and sorts the remaining using statements in the document being saved.
Note: The Remove and sort usings option is only available for C# documents.
Note: Format document on save and Remove and sort usings both are initially defaulted OFF.
Clear All Panes
This command clears all output panes. It can be executed from the button on the toolbar of the Output window.
This command copies the full path of the currently selected item to the clipboard. It can be executed by right-clicking one of these nodes in the Solution Explorer:
The solution node; A project node; Any project item node; Any folder.
To email the lines of text you select in the code editor, right-click anywhere in the editor and then click Email CodeSnippet.
Insert Guid Attribute
This command adds a Guid attribute to a selected class. From the code editor, right-click anywhere within the class definition, then click Insert Guid Attribute.
Show All Files
This command shows the hidden files in all projects displayed in the Solution Explorer when the solution node is selected. It enhances the Show All Files button, which normally shows only the hidden files in the selected project node.
This command reopens a closed document , returning the cursor to its last position. To reopen the most recently closed document, point to the Edit menu, then click Undo Close. Alternately, you can use the Ctrl+Shift+Z shortcut.
To reopen any other recently closed document, point to the View menu, click Other Windows, and then click Undo Close Window. The Undo Close window appears, typically next to the Output window. Double-click any document in the list to reopen it.
This command collapses a hierarchy in the solution explorer starting from the root selected node. It can be executed from three different places: solution, solution folders and project nodes respectively.
This command copies a selected class entire content to the clipboard. It can be executed from a single project item or a project item with dependent sub items.
This command pastes a class entire content from the clipboard. It can be executed from a project or folder node.
This command copies a reference or set of references to the clipboard. It can be executed from the references node, a single reference node or set of reference nodes.
This command pastes a reference or set of references from the clipboard. It can be executed from different places depending on the type of project. For CSharp projects it can be executed from the references node. For Visual Basic and Website projects it can be executed from the project node.
Copy As Project Reference
This command copies a project as a project reference to the clipboard. It can be executed from a project node.
Edit Project File
This command opens the MSBuild project file for a selected project inside Visual Studio. It can be executed from a project node.
Open Containing Folder
This command opens a Windows Explorer window pointing to the physical path of a selected item. It can be executed from a project item node
Open Command Prompt
This command opens a Visual Studio command prompt pointing to the physical path of a selected item. It can be executed from four different places: solution, project, folder and project item nodes respectively.
This command unloads all projects in a solution. It can be executed from the solution node.
This command reloads all unloaded projects in a solution. It can be executed from the solution node.
Remove and Sort Usings
This command removes and sort using statements for all classes given a project. It can be executed from a solution node or a single project node.
Note: The Remove and Sort Usings feature is only available for C# projects since the C# editor implements this feature as a command in the C# editor (which this command calls for each .cs file in the project).
This command creates a constant definition statement for a selected text. It can be executed from the code window over a selected text.
Clear Recent File List
This command clears the Visual Studio recent file list.
Clear Recent Project List
This command clears the Visual Studio recent project list.
This command executes the associated custom tool with text templates items. It can be executed from a DSL project node or a folder node.
This command closes all documents. It can be executed from a document tab.
You can download the PowerCommands from here, and check this 7:18min demo.