Converting form from VB 2003 to 2005

I've installed 2005 on a new computer and moved a VB project to it. When I try to open the main form in the designer, I get this string of errors:

The path is not of a legal form.

at System.IO.Path.NormalizePathFast(String path, Boolean fullCheck)
at System.IO.Path.GetFullPathInternal(String path)
at System.Reflection.AssemblyName.GetAssemblyName(String assemblyFile)
at Microsoft.VisualStudio.Design.VSTypeResolutionService.AddProjectDependencies(Project project)
at Microsoft.VisualStudio.Design.VSTypeResolutionService.AssemblyEntry.get_Assembly()
at Microsoft.VisualStudio.Design.VSTypeResolutionService.AssemblyEntry.Search(String fullName, String typeName, Boolean ignoreTypeCase, Assembly& assembly, String description)
at Microsoft.VisualStudio.Design.VSTypeResolutionService.SearchProjectEntries(AssemblyName assemblyName, String typeName, Boolean ignoreTypeCase, Assembly& assembly)
at Microsoft.VisualStudio.Design.VSTypeResolutionService.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase, ReferenceType refType)
at Microsoft.VisualStudio.Design.Serialization.CodeDom.AggregateTypeResolutionService.GetType(String name, Boolean throwOnError, Boolean ignoreCase)
at Microsoft.VisualStudio.Design.Serialization.CodeDom.AggregateTypeResolutionService.GetType(String name, Boolean throwOnError)
at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.GetType(ITypeResolutionService trs, String name, Dictionary`2 names)
at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.FillStatementTable(IDesignerSerializationManager manager, IDictionary table, Dictionary`2 names, CodeStatementCollection statements, String className)
at System.ComponentModel.Design.Serialization.TypeCodeDomSerializer.Deserialize(IDesignerSerializationManager manager, CodeTypeDeclaration declaration)
at System.ComponentModel.Design.Serialization.CodeDomDesignerLoader.PerformLoad(IDesignerSerializationManager manager)
at Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomDesignerLoader.PerformLoad(IDesignerSerializationManager serializationManager)
at System.ComponentModel.Design.Serialization.BasicDesignerLoader.BeginLoad(IDesignerLoaderHost host)

I can edit in the code window, and the application runs and displays just fine. Is the problem in the .resx file, and if so, how can I fix it

Thanks



Answer this question

Converting form from VB 2003 to 2005

  • Willgart

    VS2005 is very unforgiving in what the design view will allow. It also runs only some of your code to try and create your control/form. You should have an error in your task list. This will hopefully give you some idea where your code is going wrong. Obviously, there's some code in a control that works with a path that is failing. Any code in your Load event and any code that will get triggered by events such as a size changed event should aggressively check the validity of all variables before using them, simply so that the design view will work. I moved a C# winforms app to 2005 and spent a week off and on working through issues that were not issues at all, I just had to refactor my code to support the design view.



  • daniel 01

    I experienced the same problem. It took months to locate it's source. I removed all reference paths, which were old, invalid and imported from the Visual 2003 environment.

    To access the paths open MyProject (project properties), select the References page and finally click the Reference Paths button.

    In my case there were onld reference paths from VS2003 that were not longer valid.

    I deleted all items in the list and was able to open the UserControl in Design View mode.

    Bruce


  • Converting form from VB 2003 to 2005