News

The future of MSMQ Studio

2009-06-05 14:22:50 by Kjell-Åke Andersson

There hasn’t been too many updates of MSMQ Studio for quite a while now and this due to that small children does require a lot of time… During the spring I decided that I will invest more time into MSMQ Studio and I will make it into a product. So I have now started a company for this and I will soon launch a new website for the company and there I will sell MSMQ Studio.

In my vision there will be at least two versions of MSMQ Studio, Free and Pro. The Free version will just have enough features so that it will better than the MSMQ Management Console and an annoyingly short time before you will have to re-install it. The Pro version will include features that will make your life with MSMQ a lot easier!

I cannot tell you so much more about the set of features that will be included in MSMQ Studio as I am currently re-writing the internals of it at the moment.

So if you have any ideas on features that would like in MSMQ Studio then please go to the feedback forum and register that idea!

|

Utils and Common is Dead! – Part 2

2009-05-27 10:15:31 by Kjell-Åke Andersson

I got a brilliant comment from my former colleague Johan Slottner that I want to make sure that it will not disappear since I use HaloScan for comments.

Thank you Kjella for posting this one. I totally agree with you that the use of internal common libraries causes far more pain than it brings value to an IT organization. I have seen a number of those common libraries and all of them are facing the same problems:

  • They are not fully reliable.
  • Versioning is a pain, and there are several versions in use, and even several branches of the same common library.
  • They are hard to learn, implying that is actually takes more time to get productive with the libraries than without them.
  • Maintenance is abandoned, since there is simply no budget set to do maintenance.
  • As they grow old, they rely on old technology, and nobody wants to put the effort to upgrade (due to versioning hell, and no budget).

So is there any time it is a good idea to develop internal commons? I have yet not found a good argument, but a few hints perhaps:

  • Thinking of reuse probably makes the code better looking and easier to maintain in the project
  • Sharing ideas and thoughts in the organization with links to where it is implemented is probably a good idea. The ideas can be copied, adjusted and partly reused.
  • Service orientation may be the way to go to reuse business rules. It is easier to maintain a service than a library.
  • Buying components may be a good idea if the component solves a common problem. But be aware of that even those components have to be maintained with respect to upgrades and licensing and thus require a budget.

Still, this is actually the first post I have ever read, that actually questions the use of commons. Everywhere I go, all praise the use of commons.

So, instead of using a common library you should focus on using patterns. Patterns will survive technology changes for sure!

|

Utils and Common is Dead!

2009-05-09 22:18:50 by Kjell-Åke Andersson

I totally agree with Ayende Rahien about that creating Utils and Common-projects for re-use in other solutions are unnecessary. Out office is mainly working with one big client and they want to have a Common-library which is re-used in all their projects. We have refused to do this as there is a too big risk with how maintenance and updates would be handled for this library. We have instead tried to re-use successful patterns from previous projects. And if we need to re-use some code from another project we just copy it over to the new project.

By not using a Common-library and instead copy code from previous projects we don’t get a problem with maintenance and updates of the Common-library as each project is responsible for its own code. The risk for that there is bugs in the code which is copied is almost minimal since is has been used in production already and it’s most likely that the bugs have been found and been fixed. Also if you would need to change the functionality in the Common-library to fit your project this could introduce a breaking change for other projects, but if you have the code in your project you would not have to deal with this at all.

Of course there are benefits of having a Common-library but just the administration of it makes it a pain.

|

WPF Intellisense problem in VS 2008 SP 1 after .NET 3.5 SDK installation

2009-04-22 10:17:48 by Kjell-Åke Andersson

When I installed the .NET 3.5 SDK I lost Intellisense for WPF in VS 2008 SP1 and it seems like it is a common problem. Here is a link to a forum post that describes a solution for it http://social.msdn.microsoft.com/forums/en-US/windowssdk/thread/dd6f14ed-e582-4b49-9358-64f2afaec151/.

|

Feedback forum for MSMQ Studio

2008-11-10 22:17:39 by Kjell-Åke Andersson

I wanted to make it easier for you, the users of of MSMQ Studio, to provide feedback on the application and also to be able to vote on what you think is important for you.

So go to the feedback forum and post your ideas and vote on other ideas.

|

InternalsVisibleTo and Unit Testing

2008-11-10 21:45:39 by Kjell-Åke Andersson

I’m posting this as a reminder for myself!

When doing unit testing of internal and private members of an assembly which has a strong name you have to add the InternalsVisibleToAttribute to it.

In C# it should look like this:

[assembly: System.Runtime.CompilerServices.InternalsVisibleTo("My.Assembly.UnitTest, PublicKey=00240000048000009400000006020000002400005253413100040000010001002b942c093e3324a162084ae586f6de65ca4d79f82fd5e4939bd4a26ac5cfe0d42fae6b1b29e659a0710eb5b62e551bcde2494f17d3098f1dc664e0bf9e596e28effd9549bf4aff6dd3c00e28d66d7951ab86df06a8682070df557de4cfc8510ddb9fdb5de1c1f17235eaa3590d38114e4960a95820c375204050bc967c56a3c1")]

To get the public key from a strong named assembly you have to use sn.exe with the –Tp option.

This would give you the following result:

PS c:\....> sn -Tp My.Assembly.UnitTest.dll

Microsoft (R) .NET Framework Strong Name Utility  Version 3.5.30729.1

Copyright (c) Microsoft Corporation.  All rights reserved.

Public key is

00240000048000009400000006020000002400005253413100040000010001002b942c093e3324

a162084ae586f6de65ca4d79f82fd5e4939bd4a26ac5cfe0d42fae6b1b29e659a0710eb5b62e55

1bcde2494f17d3098f1dc664e0bf9e596e28effd9549bf4aff6dd3c00e28d66d7951ab86df06a8

682070df557de4cfc8510ddb9fdb5de1c1f17235eaa3590d38114e4960a95820c375204050bc96

7c56a3c1

Public key token is 77a86484916e64d9

|

Set the PATH environment variable for .NET tools in your PowerShell profile

2008-08-05 11:07:41 by Kjell-Åke Andersson

To set the PATH environment variable for your PowerShell profile you have to do the following:

  1. Make sure you have a folder called WindowsPowerShell in My Documents.
  2. Create a file called profile.ps1 in the new folder and open it.
  3. Copy the following into the new file:
  4. $paths = @();
    $paths += $env:PATH;
    $paths += join-path (get-itemproperty "HKLM:SOFTWARE\Microsoft\Microsoft SDKs\Windows").CurrentInstallFolder "bin";
    $paths += join-path (get-itemproperty "HKLM:SOFTWARE\Microsoft\.NETFramework").InstallRoot "v2.0.50727";
    
    $env:PATH = [string]::Join(";", $paths);
  5. Close  the file.
  6. Open a new PowerShell prompt.

|

Debugging windows services

2008-06-27 08:45:52 by Kjell-Åke Andersson

When I need to debug a windows service I usually make a call to Thread.Sleep and then attach the debugger manually.

   1:  protected override void OnStart(string[] args)
   2:  {
   3:   
   4:      Thread.Sleep(10000);
   5:   

 

But now I have realized that there is an easier solution to this problem and it is to launch the debugger by yourself!

   1:          protected override void OnStart(string[] args)
   2:          {
   3:   
   4:              #if DEBUG
   5:              if (Properties.Settings.Default.Debug)
   6:              {
   7:                  System.Diagnostics.Debugger.Launch();
   8:              }
   9:              #endif

|

WiX Service Account Dialog

2008-05-30 09:21:41 by Kjell-Åke Andersson

In my current project we had a need to be able to enter the service account details during setup for the service which is hosting our WCF services. I couldn't find a dialog that does this using WiX so I created my own.

image

In my setup project I used the WIXUI_FeatureTree template as a base. To "hook in" the new dialog you will have to override the template because if you just add new Publish elements they will not override the existing elements.

 

   1:      <UIRef Id="WixUI_ErrorProgressText"/>
   2:      <UIRef Id="WixUI_Common" />
   3:   
   4:      <Binary Id="WarningIcon" SourceFile="warning.bmp"/>
   5:      
   6:      <UI Id="MyWixUI_FeatureTree">
   7:        <TextStyle Id="WixUI_Font_Normal" FaceName="Tahoma" Size="8" />
   8:        <TextStyle Id="WixUI_Font_Bigger" FaceName="Tahoma" Size="12" />
   9:        <TextStyle Id="WixUI_Font_Title" FaceName="Tahoma" Size="9" Bold="yes" />
  10:   
  11:        <Property Id="DefaultUIFont" Value="WixUI_Font_Normal" />
  12:        <Property Id="WixUI_Mode" Value="FeatureTree" />
  13:   
  14:        <DialogRef Id="ErrorDlg" />
  15:        <DialogRef Id="FatalError" />
  16:        <DialogRef Id="FilesInUse" />
  17:        <DialogRef Id="MsiRMFilesInUse" />
  18:        <DialogRef Id="PrepareDlg" />
  19:        <DialogRef Id="ProgressDlg" />
  20:        <DialogRef Id="ResumeDlg" />
  21:        <DialogRef Id="UserExit" />
  22:   
  23:        <Publish Dialog="ExitDialog" Control="Finish" Event="EndDialog" Value="Return" Order="999">1</Publish>
  24:   
  25:        <Publish Dialog="WelcomeDlg" Control="Next" Event="NewDialog" Value="LicenseAgreementDlg">1</Publish>
  26:   
  27:        <Publish Dialog="LicenseAgreementDlg" Control="Back" Event="NewDialog" Value="WelcomeDlg">1</Publish>
  28:        <Publish Dialog="LicenseAgreementDlg" Control="Next" Event="NewDialog" Value="CustomizeDlg">LicenseAccepted = "1"</Publish>
  29:   
  30:        <Publish Dialog="CustomizeDlg" Control="Back" Event="NewDialog" Value="MaintenanceTypeDlg" Order="1">Installed</Publish>
  31:        <Publish Dialog="CustomizeDlg" Control="Back" Event="NewDialog" Value="LicenseAgreementDlg" Order="2">NOT Installed</Publish>
  32:        <Publish Dialog="CustomizeDlg" Control="Next" Event="NewDialog" Value="ServiceAccountDlg" Order="1">1</Publish>
  33:   
  34:        <Publish Dialog="ServiceAccountDlg" Control="Back" Event="NewDialog" Value="CustomizeDlg">1</Publish>
  35:        <Publish Dialog="ServiceAccountDlg" Control="Next" Event="NewDialog" Value="VerifyReadyDlg">1</Publish>
  36:   
  37:        <Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="ServiceAccountDlg" Order="1">NOT Installed OR WixUI_InstallMode = "Change"</Publish>
  38:        <Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="MaintenanceTypeDlg" Order="2">Installed</Publish>
  39:   
  40:        <Publish Dialog="MaintenanceWelcomeDlg" Control="Next" Event="NewDialog" Value="MaintenanceTypeDlg">1</Publish>
  41:   
  42:        <Publish Dialog="MaintenanceTypeDlg" Control="ChangeButton" Event="NewDialog" Value="CustomizeDlg">1</Publish>
  43:        <Publish Dialog="MaintenanceTypeDlg" Control="RepairButton" Event="NewDialog" Value="VerifyReadyDlg">1</Publish>
  44:        <Publish Dialog="MaintenanceTypeDlg" Control="RemoveButton" Event="NewDialog" Value="VerifyReadyDlg">1</Publish>
  45:        <Publish Dialog="MaintenanceTypeDlg" Control="Back" Event="NewDialog" Value="MaintenanceWelcomeDlg">1</Publish>
  46:   
  47:        <Dialog Id="ServiceAccountDlg" Width="370" Height="270" Title="[ProductName] Setup">
  48:          <Control Id="Back" Type="PushButton" X="180" Y="243" Width="56" Height="17" Text="!(loc.WixUIBack)" />
  49:          <Control Id="Next" Type="PushButton" X="236" Y="243" Width="56" Height="17" Default="yes" Text="!(loc.WixUINext)">
  50:            <Condition Action="disable"><![CDATA[ACCOUNT = "" OR PASSWORD = ""]]></Condition>
  51:            <Condition Action="enable">ACCOUNT &lt;&gt; "" AND PASSWORD &lt;&gt; ""</Condition>
  52:          </Control>
  53:          <Control Id="Cancel" Type="PushButton" X="304" Y="243" Width="56" Height="17" Cancel="yes" Text="!(loc.WixUICancel)">
  54:            <Publish Event="SpawnDialog" Value="CancelDlg">1</Publish>
  55:          </Control>
  56:          <Control Id="BannerBitmap" Type="Bitmap" X="0" Y="0" Width="370" Height="44" TabSkip="no" Text="WixUI_Bmp_Banner" />
  57:          <Control Id="BannerLine" Type="Line" X="0" Y="44" Width="370" Height="0" />
  58:          <Control Id="BottomLine" Type="Line" X="0" Y="234" Width="370" Height="0" />
  59:          <Control Id="Description" Type="Text" X="25" Y="23" Width="280" Height="15" Transparent="yes" NoPrefix="yes" Text="Enter service account details.">
  60:          </Control>
  61:          <Control Id="Title" Type="Text" X="15" Y="6" Width="200" Height="15" Transparent="yes" NoPrefix="yes" Text="{\WixUI_Font_Title}Service account" />
  62:          <Control Type="Text" Width="322" Height="26" X="25" Y="56" Id="BodyLabel" Text="Specify the logon account for the [ProductName] service." NoPrefix="yes">
  63:          </Control>
  64:          <Control Type="Text" Width="275" Height="10" X="25" Y="98" Id="AccountLabel" Text="&amp;Account name (Example: domain\user or user@domain):" />
  65:          <Control Type="Edit" Width="194" Height="15" X="25" Y="111" Id="AccountTextbox" Property="ACCOUNT" />
  66:          <Control Type="Text" Width="275" Height="10" X="25" Y="135" Id="PasswordLabel" Text="Pa&amp;ssword:" />
  67:          <Control Type="Edit" Width="194" Height="15" X="25" Y="148" Id="PasswordTextbox" Property="PASSWORD" Password="yes" />
  68:   
  69:          <Control Width="12" Height="12" FixedSize="yes" Type="Bitmap" X="25" Y="170" Id="Warning" Text="WarningIcon"/>
  70:          <Control Id="WarningLabel" Type="Text" X="40" Y="170" Width="200" Height="40" Text="The account entered here will not be validated. Make sure that the account details entered are correct." />
  71:        </Dialog>
  72:      </UI>

|

Purge the BizTalk Tracking Database

2008-05-14 23:40:51 by Kjell-Åke Andersson

We've had a problem with disk space our development server and one of the issues was that the BizTalk Tracking Database (BizTalkDTADb) grew to over 2 Gb. But tonight I found this great article on how to purge the database and to schedule the purging.

 

BizTalk Developers, have you enabled DTA Purge and Archive (BizTalkDTADb) SQL job on your development machine?

|