Untitled

Random thoughts about everything and nothing

Archive for the ‘VSX’ Category

Web Service Factory Workshop – Loved it

leave a comment »

Apparently not a lot of people were up to date with the Web Service Factory Workshop which was held at Info Support last week (see Olaf’s post here).  Don and Olaf did a terrific job at explaining the ins and outs.  Which reminds me, we still need you buy you real (Belgian) beer = topic 11 😉

To our surprise we were sitting next to the cream-de-la-cream of the Dutch Software Factory community!

Another surprise was the openness of the different participants about there products, ideas, etc..one thing’s for sure, we need to do some catching up here (= Belgium).   

BTW…the Belgium user-group “Visug” is planning a redelivery of some the tech-ed sessions next Thursday, including the Web Service Factory : Modeling Edition…

Written by Michael

November 19, 2007 at 9:08 pm

How to keep intellisense during GAT config editing

with 2 comments

Problem:
I use (need :-)) intellisense when editing GAT config files. However, it stops working when it can’t resolve a type.

e.g. Intellisense breaks after including TypeAlias.xml, it can resolve “<xi:include …>”

<Recipe Name=”GenerateRepeatingClassT4″ Bound=”false”>
<xi:include href=”TypeAlias.xml” xmlns:xi=”http://www.w3.org/2001/XInclude&#8221; />

Solution:
Add the “xi:include” element to different complex types defined in the http://schemas.microsoft.com/pag/gax-core&#8221; namespace.

1. Edit the GuidancePackageConfig.xml, located at: C:Program FilesMicrosoft Visual Studio 8XmlSchemas

Note: If the xml file is missing, do a search for it and copy the file into this directory to achieve intellisense.

2. Add xmlns:xi=”http://www.w3.org/2001/XInclude&#8221;, resulting in the following heading.

<xs:schema attributeFormDefault=”unqualified” elementFormDefault=”qualified”
xmlns:xi=”http://www.w3.org/2001/XInclude&#8221;
xmlns:xs=”http://www.w3.org/2001/XMLSchema&#8221;
xmlns=”http://schemas.microsoft.com/pag/gax-core&#8221;
xmlns:gax=”http://schemas.microsoft.com/pag/gax-core&#8221;
version=”1.0″
targetNamespace=”http://schemas.microsoft.com/pag/gax-core”&gt;

3. Find the “Recipe” element, add the following element “<xs:element ref=”xi:include” minOccurs=”0″></xs:element>”

<xs:element name=”Recipe”>
<xs:annotation>
<xs:documentation>
Defines a recipe.
</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element ref=”xi:include” minOccurs=”0″></xs:element>
<xs:element name=”DocumentationLinks” minOccurs=”0″>
<xs:annotation>
<xs:documentation>
A list of documentation links to be displayed by the Guidance Navigator
window as part of the information for a given recipe.
</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element ref=”Link” maxOccurs=”unbounded” minOccurs=”0″ />
</xs:sequence>
</xs:complexType>

Use the same approach (step 3) when you encounter other “failing” xi:include references.

Written by Michael

May 8, 2007 at 9:01 pm

Posted in .NET, GAT, VSX

Macros – Visual Studio 2003

leave a comment »

Been going through my existing VS.NET 2003 macros the other day… Close all active documents:

Sub CloseAllDocuments()
Try
If DTE.ActiveDocument.Collection.Count > 0 Then
DTE.ActiveDocument.Collection.CloseAll()
End If
Catch
‘Lazy catch, we do nothing
End Try
End Sub

Or just use “>Edit.CloseAll” in the immediate window.

To collapse all projects in the solution explorer:

Sub CollapseAll()
Dim UIHSolutionExplorer As UIHierarchy
UIHSolutionExplorer = DTE.Windows.Item( _
Constants.vsext_wk_SProjectWindow).Object() If (UIHSolutionExplorer.UIHierarchyItems.Count = 0) Then
MsgBox(“Nothing to collapse. You must have an open solution.”)
Return
End If

Dim UIHSolutionRootNode As UIHierarchyItem
UIHSolutionRootNode = UIHSolutionExplorer.UIHierarchyItems.Item(1)

Dim UIHItem As UIHierarchyItem
For Each UIHItem In UIHSolutionRootNode.UIHierarchyItems
UIHItem.UIHierarchyItems.Expanded = False
Next

UIHSolutionRootNode.Select(vsUISelectionType.vsUISelectionTypeSelect)
End Sub

Written by Michael

March 19, 2006 at 12:21 am

Posted in VSX

Good ‘ol macros

leave a comment »

Been going through my existing VS.NET 2003 macros the other day…

Close all active documents:

Sub CloseAllDocuments()
Try
If DTE.ActiveDocument.Collection.Count > 0 Then
DTE.ActiveDocument.Collection.CloseAll()
End If
Catch
‘Lazy catch, we do nothing
End Try
End Sub

Or just use “>Edit.CloseAll” in the immediate window.

To collapse all projects in the solution explorer:

Sub CollapseAll()
Dim UIHSolutionExplorer As UIHierarchy
UIHSolutionExplorer = DTE.Windows.Item( _
Constants.vsext_wk_SProjectWindow).Object() If (UIHSolutionExplorer.UIHierarchyItems.Count = 0) Then
MsgBox(“Nothing to collapse. You must have an open solution.”)
Return
End If

Dim UIHSolutionRootNode As UIHierarchyItem
UIHSolutionRootNode = UIHSolutionExplorer.UIHierarchyItems.Item(1)

Dim UIHItem As UIHierarchyItem
For Each UIHItem In UIHSolutionRootNode.UIHierarchyItems
UIHItem.UIHierarchyItems.Expanded = False
Next

UIHSolutionRootNode.Select(vsUISelectionType.vsUISelectionTypeSelect)
End Sub

Written by Michael

March 5, 2006 at 8:31 pm

Posted in VSX