Archives
-
TechEd 2004 in Amsterdam!
I know TechEd 2003 is still starting (and I am NOT there :-( ), but for me this is great news: next year TechEd will be in Amsterdam! Thanks Patrick, for the news! Since I live in Belgium (near the Netherlands) my company HAS TO LET ME ATTEND IT! I hope my manager reads this... ;-)
-
My MSDN Belux Article online!
Today my article about Collections in .NET was published on the MSDN Belux site. The article is the first of two about the collection classes in the .NET Framework:
<quote>
When you lookup the System.Collections namespace in the MSDN Library, you will find over 10 different classes. Choosing the right one for using in your application can be hard. This article will provide an overview and give some guidelines for choosing the right collection. The next article in this series will focus on building custom strongly typed collections and applying advanced techniques on them, such as data binding and sorting.
</quote> -
NAnt BuildFile Builder, added C# support
The Hippo.NET BuildFile Builder is updated and can now generate NAnt build files for VB.NET and C# Visual Studio projects.
-
NAnt BuildFile Builder Beta Version
One of the complaints that I've received about using the Hippo.NET Build tool, is the fact that you manually have to write your own NAnt build file. So one of the features I want to implement in the next release of Hippo.NET, is either generating buildfiles on the fly, or providing a tool to easily generate buildfiles based on the Visual Studio project file. That's why I've created the Hippo.NET BuildFile Builder (what's in a name ;-). On this site, you can generate NAnt buildfiles, based on a Visual Studio project file. You simply browse to your project file on your local harddisk and press the Generate button and a the contents of a NAnt buildfile are generated.
-
Extending Intellisense: Namespace lookup with a macro (bis)
A few weeks ago, I posted a macro to improve the Intellisense of Visual Studio. This macro automates the lookup of namespaces (AddDirective methode). For example when you type "Dim r As XmlReader", you probably need to add the "Imports System.Xml" (or "using System.Xml;" in C#) statement to your code. This macro helps you by searching for the corresponding namespace and add it to your code automatically. Additional there is a macro function (AddNamespace method) that replaces "xmlreader" with "System.Xml.XmlReader", so it just adds the namespace in front of your type.
Thanks to a tip of Yves Hanoulle, there is now one single function that adds the using/Imports directive for both VB.NET and C#.
The macro works great if you assign a shortcut key to it, you can do that like this:- Enter or copy-and-paste the macro code in the Macro Editor of Visual Studio.
- Choose in the Tools menu the Customize menu item.
- Press the Keyboard button (below right).
- In the list of the commands, find Macros.MyMacros.TypeFinder.AddDirective, and select it.
- In the textbox "Press shortcut key(s)", press the key combination you want to use. (I use Ctrl+`)
- Change the "Use new shortcut in:" value to "Text Editor"
- Press the Assign button.
Imports EnvDTE
Imports System.Diagnostics
Imports System
Public Module TypeFinder
Private Function SearchTypeInAssembly(ByVal typename As String _
, ByVal ass As Reflection.Assembly)
DTE.StatusBar.Text = "Searching for '" & typename & "' " & _
ass.GetName.Name & "..."
Dim t As Type
For Each t In ass.GetTypes
If t.Name.ToLower = typename Then
Return t
End If
Next
End Function
Private Function SearchType(ByVal typename As String) As Type
typename = typename.ToLower
Dim projs As System.Array = DTE.ActiveSolutionProjects
Dim ass As Reflection.Assembly = _
Reflection.Assembly.LoadWithPartialName("mscorlib")
Dim t As Type = SearchTypeInAssembly(typename, ass)
If Not t Is Nothing Then Return t
Dim proj As Project
For Each proj In projs
Dim o As VSLangProj.VSProject = proj.Object
Dim ref As VSLangProj.Reference
For Each ref In o.References
ass = Reflection.Assembly.LoadFile(ref.Path)
t = SearchTypeInAssembly(typename, ass)
If Not t Is Nothing Then Return t
Next
Next
DTE.StatusBar.Text = "Could not find type '" & typename & _
"' in the referenced libraries. Make sure your cursor " & _
"is right behind the text (without selection)!"
DTE.StatusBar.Highlight(True)
Return Nothing
End Function
Public Sub AddNamespace()
Dim text As TextSelection = DTE.ActiveDocument.Selection
text.WordLeft(True)
Dim t As Type = SearchType(text.Text)
If Not t Is Nothing Then
text.Text = t.FullName
text.EndOfLine()
DTE.StatusBar.Text = "Ready"
End If
End Sub
Public Sub AddDirective()
Dim text As TextSelection = DTE.ActiveDocument.Selection
text.WordLeft(True)
Dim t As Type = SearchType(text.Text)
If Not t Is Nothing Then
Dim keyword, suffix As String
Dim line As Integer = text.AnchorPoint.Line
text.Text = t.Name
text.StartOfDocument()
Select Case DTE.ActiveDocument.Language
Case "CSharp"
keyword = "using"
suffix = ";"
Case "Basic"
keyword = "Imports"
suffix = String.Empty
Case Else
Throw New System.Exception("Invalid Language: " & _
DTE.ActiveDocument.Language)
End Select
text.Insert(keyword & " " & t.Namespace & suffix & vbCrLf)
text.MoveToLineAndOffset(line + 1, 1)
text.EndOfLine()
DTE.StatusBar.Text = "'" & keyword & " " & t.Namespace & _
suffix & "' added to the document."
DTE.StatusBar.Highlight(True)
End If
End Sub
End Module
-
Hippo.NET Articles
Recently I added a counter to the Hippo.NET home page. I nifty feature of that counter is that it can track referrers. I discovered 2 articles about Hippo.NET:
-
Hippo.NET features feedback
A few days ago I asked for some feedback about the Hippo.NET build tool. For now, there are a couple of intresting feature requests and remarks:
-
MSN Messenger 6.0 (Preview) is here!
Seems MS is a little bit slow with updating the sites mentioned in their press release, but you can download it from this link.
-
New MSN Messenger preview version comes today!
According to this press release, Microsoft will release MSN Messenger 6 preview at 11 am PDT here.
-
Belgian .NET bloggers?
Today I discovered that Patrick Verbruggen has a weblog. Patrick is one of the founding members of the Belgian .NET Usergroup (BENUG) and lives in Belgium. He has even made a list on the BENUG site of Belgian bloggers. So if there are any other Belgian .NET bloggers: please stand up!
-
Hippo.NET feedback requested!
The Hippo.NET build tool is available quite some time. I've got some feedback (not very much) and there are some problem reports, mostly due to the rather limited installation manual.
-
Extending Intellisense: Namespace lookup with a macro
Namespaces in .NET are great! But how many times do you find yourself typing "Private r As xmlreader", and then noticing that there is no Imports/using statement for the System.Xml Namespace? Then you would have to scroll to the top of your document and add the Imports/using statement by hand. Alternatively you could choose to add the namespace to your declaration: "Private r As System.Xml.XmlReader". Since we are all developers, why not develop something to help developers with this tedious task of namespace lookups?
-
PowerToys going open source
Yesterday I wrote something about the new PowerToys, and compared them to the other alternatives. I you read that post, you'll see the comments of Josh Ledgard of MS:
Hi Jan. I'm one of the guys at Microsoft who works on the Power Toys. I wanted to let you know a little bit about the PowerToys effort. I promise that we didn't work on these projects to displace third party tools. I actually think that all of the commenting tools you mention have their plusses and minuses. And at the moment some are more polished than the one our team released. One of the motivations included giving people samples from Microsoft for extending the shell. You can never have too many samples. Another is that we just thought it would be a cool project to work on and provide a forum for other developers in the community to also work on. Actually, we've been in contact with the writer of the VBXC tool you mentioned and he has recently joined our workspace project on gotdotnet that allows for other people to modify the code. If your interested feel free to check out our workspaces.. http://www.gotdotnet.com/Community/MessageBoard/Thread.aspx?id=107870
Thanks,
josh
I think Josh is completly right: you can't have too many samples and it's a cool project to work on! And ofcourse they did not start these projects to kill similar third party tools. I hope my previous post wasn't misunderstood, because I was trying to say that I really like the initiative. And going open source to the GotDotNet workspaces only makes it better: -
Going to visit MS headquarters in Brussels!
Recently I was invited to visit the MS Belux Headquarters in Brussels. Today is the day! ;-)
-
XML Comments in VB: PowerToys and "the others"
Microsoft has released some PowerToys for Visual Studio.NET 2003, including a tool that enables XML comments in Visual Basic.NET: VB Commenter. XML comments were available for C# developers since VS.NET 2002, and I still do not understand why they did not implement them in VB. But anyway, the great (open source) community of (VB).NET, has produced several tools to enable XML comments in VB:
-
Webservice without IIS and ASP.NET: problem with SoapFormatter...
Today I played a little bit with remoting over an HTTP channel using the SOAP protocol. I created a factory class, comparable to a webservice class (asmx) when using normal webservices in ASP.NET.
Public Class Engine
Inherits MarshalByRefObject -
Remoting, Events and the 1.1 Framework
This weekend I played with the Observer Pattern to create a system that could publish events to a central server. To this server, other applications could subscribe to receive this events. Because I wanted the system to be fast, I choose .NET Remoting as communication between the clients and the server.