Friday, June 08, 2007

ClickOnce Signing Bug

Visual Studio 2005 has a minor bug related to removing the ClickOnce signing option for a project. When the 'Sign the ClickOnce manifests' option is enabled, VS2005 creates an two entries in the project file: <ManifestCertificateThumbprint> and <ManifestKeyFile>. The problem is that when the ClickOnce option is disabled, these two entries still exist in the project settings (but are not configurable through the IDE). The entries have to be manually deleted from the project file.

Not that big of a deal, but annoying when you're syncing projects between developers. This bug leads to the classic, "Well, it builds on my machine" argument.

Happy (un)signing!

Wednesday, June 06, 2007

.Net Remoting Woes

I've run into a number of problems related to Serialization that have prevented normal, everyday, remoting from working.

Signed Assemblies

When using signed assemblies…

Specifying Types as Serializable

It may not seem obvious at first, but .Net remoting is a form of serialization. Serialization is the "deconstruction" of an object into a flat binary object for storage or transmission over some medium. So, when an object is remoted using, say, MarshalByRefObject attention must be paid to serialization…

Monday, June 04, 2007

Assembly.LoadwithPartialName vs Assembly.Load

Isn't it true that when we want things done 'right' it generally means we have to do more work? This is true for loading assemblies in .NET 2.0. Remember the good old days of loading DLLs in Win32 using LoadLibrary and simply specifying a DLL name? Sure, it was easy and straightforward, but it led to countless hours of contractors dollars wasted on untangling DLL Hell.

Using a framework that promises to rid us of DLL hell means we need to me more precise when loading Assemblies. This is why 'LoadWithPartialName' has been depricted in v2 .net.

But can't there be a happy medium? What if the DLL I'm loading is part of a shared framework that my organization has control over. What if we can guarantee backward compatibility and all I want to guarantee is that the latest version is always loaded?


Â