Total Pageviews

Disclaimer

This is a personal web page. The views expressed on this blog are mine and do not necessarily reflect the views of my current employer.

I am currently employed by Morgan Stanley.

August 31, 2012

HoneyCell Drops: Port to Mobile Platforms

I was trying to port #SNMP Library to Windows Compact Edition (CE), and we still have the .NET Compact Framework (CF) compliant assembly (sharpsnmplib.cf35.dll) in binary distribution, which is a good legacy of that attempt.

However, the next port to Silverlight has been marked as a big failure. Microsoft does not design this platform as a suitable one for UDP/SNMP, so any attempt is doomed to fail.

I did not pay much attention to Windows Phone (which uses a Silverlight alike .NET Framework profile), so there was no such port.

OK, above I summarized all official ports (successful or failed) and I thought the story ended a long time ago. Luckily I am now proven to be wrong.

Early this month, this discussion thread attracted my attention, which mentioned successful port to new mobile platforms (MonoTouch and Mono for Android). Though it is based on HoneyCell code base (which is #SNMP 6.1.1), this attempt seems to be quite interesting according to the detailed approach.

If you happen to be interesting in MonoTouch and Mono for Android, now you might try out the unofficial #SNMP port from GitHub,

https://github.com/moljac/MonoMobile.SharpSNMP

Miljenko (mel) has started to work on a port of BigDipper (#SNMP 7.5), and let's see if this latest monster can be turned into something good on mobile platforms.

I will keep an eye on the new attempt and see when and in which way we can accept the changes in official repository.

Stay tuned.

August 12, 2012

Update on Crad’s ActionList 1.2

You probably know that except working on #SNMP and DockPanel Suite, I am also maintaining Crad’s ActionList, http://www.lextm.com/2012/04/packaging-crads-actionlist-for-net-via.html

Today, I am happy to announce the availability of its 1.2 release. The NuGet package can be found here along with its release notes,

https://nuget.org/packages/ActionListWinForms/1.2.0.0

But importantly this time you get better Visual Studio support if you execute this installer,

https://github.com/downloads/lextm/ActionListWinForms/setup_1.2.exe

This install is mandate right now as the design time support is split out and is no longer part of the NuGet package. You have to use the installer to register design time support in Visual Studio.

Supported Visual Studio releases are 2008, 2010, and 2012.

If you have any question, please go to

https://github.com/lextm/ActionListWinForms/issues

Cheers :)

How to Install Custom Controls to Visual Studio, Part II

Part I is here, http://www.lextm.com/2012/08/how-to-install-custom-controls-to.html

In part I I mentioned all you need to install your custom WinForms controls to Visual Studio 2008.

I thought it would be challenging to add support for Visual Studio 2010 and 2012. However, I was fortunately wrong. If you have done the basic integration for .NET 4 AssemblyFoldersEx, then all you need is an updated Toolbox.exe that supports other Visual Studio versions, which is available in

https://github.com/lextm/ActionListWinForms

I have also updated the Inno Setup installer script to reflect the changes (only a few lines) needed.

Now you should be able to start working on your own installer. Good luck.

Sidenote on SharpDevelop

If you are a control vendor that also wants to support SharpDevelop users, you might note that SharpDevelop does not try to locate design time support assemblies following Visual Studio's approach. Instead, SharpDevelop reads its own bin folder,

https://github.com/lextm/ActionListWinForms/issues/10

Besides, I did not yet find a way to automate changes to SharpDevelop's tool box.

So in all, it is reasonable to write a good FAQ article specifically for SharpDevelop users to show them how to manually create the tool box items and add the design time support.

August 11, 2012

How to Install Custom Controls to Visual Studio, Part I

I thought this is an easy task as so many components vendors have their fancy installers doing this, but only when I attempted to create one for Crad’s ActionList (http://github.com/lextm/actionlistwinforms) I found out how difficult it is to locate all information you need. Therefore, this will be a long post with all information you might need.

Note that I just finish Visual Studio 2008 support, which will be covered in part I. Visual Studio 2005 is tool old to attract me, and Visual Studio 2010 and 2012 poses new challenges of supporting both .NET 2 and .NET 4.

Another notice is that I will focus on Windows Forms controls in this post, as I am not an author of WPF or Silverlight controls.

Basic Integration (Mandate)

By creating a new registry key

HKLM\SOFTWARE\Microsoft\.NETFramework\v2.0.50727\AssemblyFoldersEx\ActionListWinForms

I tell Visual Studio to understand that a new control library named ActionListWinForms is added.

I set (Default) value to C:\Program Files\ActionList for Windows Forms\net20\ so that VS knows where to search for the assemblies.

The same should be done for .NET 4 I guess, but I do not yet test it.

After doing this and restart VS, I can now create a new tab named “ActionList for WinForms” in Toolbox panel, right click and activate “Choose Item…” menu item.

You can see that magically Crad.Windows.Forms.Actions.dll is listed there just like any other registered .NET assemblies. That is what AssemblyFoldersEx registry keys brings.

This provides us the basic integration, that we can manually create a tab and add new items.

Advanced Integration (Optional)

Now to achieve better experience, we need to automate Visual Studio to simulate our manual steps above (create a new tab and add items).

This requires familiarity on Visual Studio COM interfaces and Visual Studio SDK. However, you should not be panic, as we are kindly served by open source community with a project named Visual Studio Toolbox Manager,

http://vstudiotoolbox.codeplex.com/

By calling this utility the whole automation process will be carried out automatically.

Please note that this project is no longer active (since 2010), so you might meet various problems using it against Visual Studio 2008. I collected all patches that are available for this project and plan to create a new release in the next few days. You can wait and check out my fork if you plan to also create your own control installer.

Sidenote 1

Some articles indicate that it is safer to install the assemblies to GAC. So I also use gacutil to install them to GAC.

Sidenote 2

If you have split your control library to non-designer and designer assemblies, make sure you put them in the same installation folder. In this way, VS can locate the designer assembly by reading AssemblyFoldersEx. I also install the design assembly to GAC though I am not sure whether I should.

Once the end user drags the control to a form/user control, only the non-designer assembly will be added as a reference. The designer assembly is only important for Visual Studio. In this way, client profiles (.NET 3.5/4) can be perfectly supported.

Full Sample

OK, so if you want to find a sample which covers all details, you can refer to ActionList for WinForms project, where I share an Inno Setup script and the customized Visual Studio Toolbox Manager build,

https://github.com/lextm/ActionListWinForms/tree/cc4a57b20148c19c3fdaef120e9e0aa6d87d288b

Let me know if you have any question simply by leaving a comment. Cheers.

August 02, 2012

OpenCover Addin for SharpDevelop, Part II

You probably heard that I upgraded the existing PartCover addin to support OpenCover, and last weekend I finished all the tasks. So now you can grab it and play with it from my fork,

https://github.com/lextm/SharpDevelop

The final action I need to do now is fax the signed JCA document to Austria and allow the team to take this contribution officially. Due to the two typhoons hitting eastern China today, I will have to wait till next Monday.

Hope you enjoy this addin and continue supporting both OpenCover and SharpDevelop.

Update: my changes are now part of SharpDevelop on its opencover branch.

https://github.com/icsharpcode/SharpDevelop/tree/opencover

Matt Ward will take further care of it. My fork will no longer be maintained.

Update Again: OpenCover addin is now officially part of SharpDevelop!

http://community.sharpdevelop.net/blogs/mattward/archive/2012/08/08/CodeCoverageWithOpenCover.aspx

What a piece of wonderful news :)