sharing about .NET and technology RSS 2.0
# Wednesday, November 22, 2006

This macro enables you to nest project items inside Visual Studio .NET. Until now, there is no easy way to nest project items through the Visual Studio IDE, you can only do it by manipulating the project (.csproj or .vbproj) file and adding the DependentUpon element.

Inside the IStaySharp.vsmacros file there is a macro called 'Create Dependency' which allows you to nest two selected items. I have even created a video (672,18 KB) to illustrate how to configure and use the macro.

Wednesday, November 22, 2006 12:23:49 AM (Romance Standard Time, UTC+01:00) -  # -  Comments [4] -
.NET | Visual Studio
# Sunday, November 19, 2006

I must have missed that one, but some weeks ago, version 3.0 of Windows Desktop Search for Windows XP/2003 has been released. If you need to search in netwerk files you can download Windows Desktop Search: Add-in for UNC/FAT. If you want to recognize more filetypes, check out the IFilters page on Channel9.

Sunday, November 19, 2006 1:41:50 AM (Romance Standard Time, UTC+01:00) -  # -  Comments [1] -
.NET | Links
# Wednesday, November 15, 2006

PowerShell 1.0 has been released for Windows XP SP2 and Windows Server 2003. The bits can be downloaded here. If you already have installed a previous release of PowerShell, you need to uninstall by selecting 'Show Updates' in the 'Change or Remove Programs'.

Wednesday, November 15, 2006 12:39:07 AM (Romance Standard Time, UTC+01:00) -  # -  Comments [0] -
.NET | Links | PowerShell
# Tuesday, November 14, 2006

One of the oldest and most basic programs is certainly the command prompt (cmd.exe). One thing is certain, you still can't do without the command prompt, and certainly being a developer.  I came across a nice tool, called Console, which enhances the command prompt. I have been using it for a couple of months now, and I really like it.

One of the things you should really customize is your PROMPT. More information about changing the PROMPT can be found here. Having, for example, your current directory path on a separate line is really useful. You can customize it through the environment variable called PROMPT, like Scott is doing, but I prefer passing it as a parameter to the cmd.exe. This way I can easily copy the application and no reboot is required. This can be done by the /k argument of the cmd.exe.

Here is a snippet of my XML configuration file for Console.

<tab title="Console">
    <console shell="cmd /k PROMPT $p$_$+$g" init_dir=""/>
    <cursor style="11" r="255" g="255" b="255"/>
    <background type="2" r="0" g="0" b="0">
        <image file="" relative="0" extend="0" position="0">
            <tint opacity="190" r="0" g="0" b="0"/>
        </image>
    </background>
</tab>
<tab title="cmd">
    <console shell="cmd.exe /k PROMPT $p$_$+$g" init_dir=""/>
    <cursor style="11" r="255" g="255" b="255"/>
    <background type="0" r="0" g="0" b="0">
        <image file="" relative="0" extend="0" position="0">
            <tint opacity="0" r="0" g="0" b="0"/>
        </image>
    </background>
</tab>
<tab title="VS.NET 2005">
    <console shell="cmd /k PROMPT $p$_$+$g &amp;&amp; C:\PROGRA~1\MID05A~1\VC\vcvarsall.bat" init_dir=""/>
    <cursor style="0" r="255" g="255" b="255"/>
    <background type="2" r="0" g="0" b="0">
        <image file="" relative="0" extend="0" position="0">
            <tint opacity="188" r="0" g="0" b="0"/>
        </image>
    </background>
</tab>
<tab title="PowerShell">
    <console shell="C:\WINDOWS\system32\windowspowershell\v1.0\powershell.exe" init_dir=""/>
    <cursor style="0" r="255" g="255" b="255"/>
    <background type="2" r="0" g="0" b="0">
        <image file="" relative="0" extend="0" position="0">
            <tint opacity="189" r="0" g="0" b="0"/>
        </image>
    </background>
</tab>

This is the result in Console

Tuesday, November 14, 2006 10:57:18 PM (Romance Standard Time, UTC+01:00) -  # -  Comments [0] -
Tools
# Wednesday, November 01, 2006

I am currently building software factories and I needed a way to have a list of running Visual Studio instances and the corresponding EnvDTE._DTE object to manipulate the solution. Windows internally keeps a list of COM objects that are currently running, called the Running Object Table (ROT). VS .NET 2005 for example, register itself in the ROT as "!VisualStudio.DTE.8.0:pid" where 'pid' is the process id of the corresponding VS 2005 instance.

In .NET 1.1 you would use the the following UCOMIRunningObjectTable, UCOMIBindCtx for enumerating the ROT. In .NET 2.0 these interfaces are obsolete and are replaced by IRunningObjectTable and BIND_OPTS respectively. Note that the same code can be used for getting other instances like MS Word, IE, etc.

using System;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using System.Runtime.InteropServices.ComTypes;
using EnvDTE;

public static class DTEHelper
{
    const uint S_OK = 0;

    [DllImport("ole32.dll")]
    public static extern uint GetRunningObjectTable(uint reserved, out IRunningObjectTable ROT);
    
    [DllImport("ole32.dll")]
    public static extern uint CreateBindCtx(uint reserved, out IBindCtx ctx);

    static IDictionary<string, object> GetRunningObjectTable()
    {                        
        IDictionary<string, object> rotTable = new Dictionary<string, object>();
        
        IRunningObjectTable runningObjectTable;            
        IEnumMoniker monikerEnumerator;
        IMoniker[] monikers = new IMoniker[1];

        GetRunningObjectTable(0, out runningObjectTable);
        runningObjectTable.EnumRunning(out monikerEnumerator);
        monikerEnumerator.Reset();

        IntPtr numberFetched = IntPtr.Zero;
        
        while (monikerEnumerator.Next(1, monikers, numberFetched) == 0)
        {
            IBindCtx ctx;
            CreateBindCtx(0, out ctx);

            string runningObjectName;
            monikers[0].GetDisplayName(ctx, null, out runningObjectName);
            Marshal.ReleaseComObject(ctx);

            object runningObjectValue;
            runningObjectTable.GetObject(monikers[0], out runningObjectValue);
            
            if (!rotTable.ContainsKey(runningObjectName))
                rotTable.Add(runningObjectName, runningObjectValue);
        }

        return rotTable;
    }

    public static IDictionary<string, _DTE> GetRunningVSIDETable()
    {            
        IDictionary<string, object> runningObjects = GetRunningObjectTable();
        IDictionary<string, _DTE> runningDTEObjects = new Dictionary<string, _DTE>();            

        foreach (string objectName in runningObjects.Keys)
        {
            if (!objectName.StartsWith("!VisualStudio.DTE"))
                continue;

            _DTE ide = runningObjects[objectName] as _DTE;
            if (ide == null)
                continue;
            
            runningDTEObjects.Add(objectName, ide);
        }

        return runningDTEObjects;
    }        
}
Wednesday, November 01, 2006 4:40:07 PM (Romance Standard Time, UTC+01:00) -  # -  Comments [1] -
.NET | Visual Studio

The Microsoft Patterns & Practicess Team recently released a new version of the Web Client Software Factory that can be found on CodePlex. One of the things I noticed directly, is that they implemented a web version of the Composite UI based on the ObjectBuilder.

The goals of Web Client Software Factory are:

  • CAB for Web
    • Hiding complexity
    • Separation of infrastructure & biz logic
    • Biz logic reuse amongst different UI Technologies
    • Promoting consistent development practices
  • Navigation
  • UI Richness
  • UI Layout management
  • State management
  • Best use of technology available (Ajax, WinForms controls, ...)
  • Security
  • SaaS implications on application design

More information about the vision & scope can be found here.

Wednesday, November 01, 2006 2:37:11 PM (Romance Standard Time, UTC+01:00) -  # -  Comments [2] -
.NET | Links
# Thursday, October 26, 2006

On IStaySharp.NET I created an article that shows you, how you can load a DSL file. This is necessary if you need to access your model from GAT, a Visual Studio AddIn, custom library, etc. The last couple of weeks I am digging into DSL and GAT for creating a set of software factories at Real Software that will be used as a baseline for building applications.

Learning two (DSL & GAT) simultaneously and combining them was not so trivial and there is some learning curve. For GAT there are some interesting resources:

The MSDN forums is a good resource when you have some issues and/or questions. DSL has also a specific forum. The capabilities of DSL are really impressive. Now you have finally the tools to write for example your own dataset designer with code generation!!!

Thursday, October 26, 2006 2:07:20 AM (Romance Daylight Time, UTC+02:00) -  # -  Comments [0] -
.NET | Visual Studio
# Monday, October 23, 2006

Version 0.22 of SyntaxColor4Writer is compiled against the new build release of Windows Live Writer 1.0 (Build 145). The issues around spell checking and FireFox will be fixed in the next release.

Monday, October 23, 2006 9:31:23 PM (Romance Daylight Time, UTC+02:00) -  # -  Comments [2] -
.NET | SyntaxColor4Writer | Windows Live Writer
# Wednesday, October 18, 2006

Last week I bought an external harddisk, Vantec Nexstar 3 (NST-360SU-BK), that can be connected through USB 2.0 and eSata. eSata is simply a new standard for connecting external SATA drives at full speed! I use the external harddisk to share data between my laptop (through USB 2.0) and my desktop PC (through eSata). I use extensively Virtual PC for development, and it's a good thing when developing on my desktop PC I can use the full speed of my HD. 

Wednesday, October 18, 2006 11:46:39 PM (Romance Daylight Time, UTC+02:00) -  # -  Comments [2] -
Hardware
# Thursday, October 12, 2006

Microsoft released the beta program for Virtual PC 2007. The new features are

  • Hardware-assisted virtualization
  • Support for Windows Vista as a guest and host operating system
  • Support for 64-bit host operating system

You can participate on the beta program through the Microsoft Connect web site.

Thursday, October 12, 2006 1:40:33 AM (Romance Daylight Time, UTC+02:00) -  # -  Comments [1] -
Links | Vitualization
# Friday, October 06, 2006

I've upgraded SyntaxColor4Writer with the new version of CodeHighlighter 4.0. It uses a new parsing model and it supports some additional language definitions, namely:

  • Assembly
  • Lua
  • MSIL
  • Pascal

For example:

HasChanges method of a DataSet in MSIL - Copy Code
1 .method public hidebysig instance bool HasChanges() cil managed 2 { 3 .maxstack 2 4 L_0000: ldarg.0 5 L_0001: ldc.i4.s 28 6 L_0003: call instance bool System.Data.DataSet::HasChanges(System.Data.DataRowState) 7 L_0008: ret 8 }

Any suggestions and/or feedback about SyntaxColor4Writer is welcome!

Friday, October 06, 2006 2:07:46 AM (Romance Daylight Time, UTC+02:00) -  # -  Comments [4] -
.NET | SyntaxColor4Writer | Windows Live Writer
# Thursday, October 05, 2006

A new version of CruiseControl.NET has been released. The release notes of version 1.1 can be found here. This is the defacto standard tool if you want to continuous integration together with unit testing, code metrics, code analysis, etc.

Thursday, October 05, 2006 1:48:25 PM (Romance Daylight Time, UTC+02:00) -  # -  Comments [2] -
.NET | Links

Recently I switched from RSSBandit to GreatNews as RSS reader (noticed by a post from Bert Jansen).

The speed for aggregating feeds using GreatNews is really fast! I think it was better called SpeedNews ;). Besides that, it has a nice user-interface and all config & feed data is kept in the installation folder. This means that no installation (MSI) is required, and that it can easily be deployed to other computers.

Thursday, October 05, 2006 3:31:16 AM (Romance Daylight Time, UTC+02:00) -  # -  Comments [0] -
Tools
# Friday, September 29, 2006

Today I published a new version of SyntaxColor4Writer on IStaySharp.NET. It's compiled against the new beta version of Windows Live Writer with the following added features:

  • 'Copy Code' link (copies everything to the clipboard)
  • Caption text
  • Customize backcolor, including line numbering
  • Spaces in tabs
  • Font size

 

Below you find some examples:

1 <system.web> 2 <compilation defaultLanguage="VB" debug="true"/> 3 <customErrors mode="ReadOnly"/> 4 </system.web>

C# code of the Main method class.

Program.cs - Copy Code
1 /// <summary> 2 /// The main entry point for the application. 3 /// </summary> 4 [STAThread] 5 static void Main() 6 { 7 Application.EnableVisualStyles(); 8 Application.SetCompatibleTextRenderingDefault(false); 9 Application.Run(new TestForm()); 10 }
Friday, September 29, 2006 2:12:38 AM (Romance Daylight Time, UTC+02:00) -  # -  Comments [0] -
.NET | SyntaxColor4Writer | Windows Live Writer
# Wednesday, September 27, 2006

Cassini is a ASP.NET sample application that shows how to write a web server using .NET. This means that you can host ASP.NET using the ASP.NET hosting APIs (System.Web.Hosting). This is really an alternative to IIS. There is also a second project called UltiDev Cassini Web Server which is based on the Cassini source with the following additional features:

  • Comes ready for distribution with Visual Studio ASP.NET applications
  • Runs as a windows service
  • Hosts and runs multiple ASP.NET applications
  • Provides management UI and simple API for configuring web applications
  • Comes in two flavors: 2.0 version for ASP.NET 2.0 applications, and 1.1 for applications compiled for ASP.NET 1.1

If you have the need for an offline version of your ASP.NET application, where easy deployment is required (without IIS), then this is a very good solution.

Wednesday, September 27, 2006 1:16:18 AM (Romance Daylight Time, UTC+02:00) -  # -  Comments [0] -
.NET | ASP.NET
# Sunday, September 24, 2006

Ubuntu is a free linux-based operating system. Ubuntu works very well on Virtual PC, and I didn't encounter any problems during installation. A detailed step-by-step explanation can be found on the documentation site of Ubuntu, How To - Configure Ubuntu for Microsoft Virtual PC 2004.

Setting Ubuntu to the same screen resolution as the host in full-screen mode didn't worked for me. I tried the following post, but without any success.

One of the reasons for installing Ubuntu, was to see if my blog site rendered correctly in Firefox. Only the line under the post title was not positioned correctly. I will update the 'business' theme soon.

Sunday, September 24, 2006 6:32:17 PM (Romance Daylight Time, UTC+02:00) -  # -  Comments [2] -
Linux | Vitualization
# Friday, September 22, 2006

DasBlog 1.9 is released. It's a major update with a lot of extra features and fixes. I contributed to this release for improving DasBlog in a multi-user setup. The following features has been added (will update the documentation on dasblog.info):

  • Top Posters macro & Profile Combo control
  • Every admin/contributor can create/edit a personal profile page
  • A Contributor can be notified by mail for certain events and can be configured through the 'User Settings' screen
    • Notify when a new post has been added
    • Notify when comments has been added for ALL posts
    • Notify when comments has been added for OWN posts

I also created a new theme called 'business', which is running on my weblog now. It's not yet included in this release, but it's available through the subversion repository. I am also planning to create a theme, based on 'business', for in a multi-user setup.

Soon I will update RealDN (corporate blog of my company I am working for) to DasBlog 1.9.

Friday, September 22, 2006 12:58:40 PM (Romance Daylight Time, UTC+02:00) -  # -  Comments [2] -
.NET | DasBlog
# Friday, August 18, 2006

Windows Live Writer is a desktop application that makes it easier to compose compelling blog posts using Windows Live Spaces or your current blog service. For Windows Live Writer I created a plugin called SyntaxColor4Writer that enables you to embed syntax highlighting in your blog posts. More details about SyntaxColor4Writer can be found here. This is how the plugin looks:

This is an example of a xml fragment generated by SyntaxColor4Writer:

<system.web> <compilation defaultLanguage="VB" debug="true" /> <customErrors mode="RemoteOnly" /> </system.web>
Friday, August 18, 2006 3:17:50 AM (Romance Daylight Time, UTC+02:00) -  # -  Comments [0] -
.NET | SyntaxColor4Writer | Windows Live Writer
# Wednesday, August 16, 2006

It has been quiet for some time on my blog, but that will change now. It was mainly due to the fact that we bought a new house in Hombeek, we didn't know that little village before :). Every weekend we spend time on painting and some chores. But the fact that we moved now, and that practically everything is done, I can again spend more time for programming and sharing with the community.

Wednesday, August 16, 2006 8:49:35 PM (Romance Daylight Time, UTC+02:00) -  # -  Comments [1] -
Personal
# Tuesday, May 23, 2006

That's right, a public preview of Office 2007 Beta 2 is available. You can download the bits from here. Note that right now it is very difficult to connect to the server, due to high traffic.

Tuesday, May 23, 2006 11:10:13 PM (Romance Daylight Time, UTC+02:00) -  # -  Comments [0] -
.NET | Links | Office | Software
Navigation
Archive
<November 2006>
SunMonTueWedThuFriSat
2930311234
567891011
12131415161718
19202122232425
262728293012
3456789
About the author/Disclaimer

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

© Copyright 2010
Christoph De Baene
Sign In
Statistics
Total Posts: 176
This Year: 2
This Month: 0
This Week: 0
Comments: 249
All Content © 2010, Christoph De Baene
DasBlog theme 'Business' created by Christoph De Baene