What are the common issues in redirecting assemblies using the publisher policy files?

1) Make sure to follow proper naming conventions for the policy dll. For example, if the original assembly name is TestAssembly.dll then the corresponding policy assembly should be called ‘policy.1.0.TestAssembly.dll’ to make this redirection work for all ‘1.0.*’ version bindings of the original assembly. 2) While specifying the name for the assembly in the policy file, do not include the ‘.dll’ extension. This is wrong: >assemblyIdentity name='TestAssembly.dll' publicKeyToken='f638d0a8d5996dd4' culture='neutral' /< Instead use: >assemblyIdentity name='TestAssembly' publicKeyToken='f638d0a8d5996dd4' culture='neutral' /< 3) Make sure to sign the policy assembly with the same strong name as the original. 4) Make sure to distribute the policy file along with the policy assembly. Installing the policy assembly in the GAC alone will not suffice. Note that any change made to the policy file after creating the policy assembly will not take effect. 5) Always use /link (to the policy file) in the ‘al’ command while creating the policy assembly. Do not use /embed. It doesn’t seem to be supported. Some good links: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconcreatingpublisherpolicyfile.asp http://www.newtelligence.com/downloads/downloads-basta2001.aspx http://www.only4gurus.com/DotNet/studies/managevers.htm

How can I restrict or control the size of my form?

You can restrict the size of a form by setting it’s MaximumSize and MinimumSize properties. This will help you control the maximum and minimum size the form can be resized to. Also note that WindowState property of the form plays a part in how the form can be resized. [C#] //Minimum width = 300, Minimum height= 300 this.MinimumSize = new Size(300, 300); //Maximum width = 800, Maximum height= unlimited this.MaximumSize = new Size(800, int.MaxValue); [VB.NET] ’Minimum width = 300, Minimum height= 300 Me.MinimumSize = New Size(300, 300) ’Maximum width = 800, Maximum height= unlimited Me.MaximumSize = New Size(800, Integer.MaxValue)

How can I ensure that my form will always be on the desktop?

To set or control the location of the form using desktop coordinates, you can use the SetDeskTopLocation property. You can do this by setting the child form’s TopMost to False and setting its Owner property to the Main Form. [C#] this.SetDesktopLocation(1,1); [VB.NET] Me.SetDesktopLocation(1,1)