My first thought is did you use the newer version of .NET to build the application. (What is it now? 4.5.2 or something like that?)
Or it may just be something that is going to happen when Revit has to upgrade a template. Have you tried doing a form.refresh()?