I started getting this occasional error. Usually it goes away when I rebuild. Any idea why this is happening
---------------------------
Error Detail
---------------------------
The path is not of a legal form.
System.ArgumentException: 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.SearchEntries(AssemblyName assemblyName, String typeName, Boolean ignoreCase, Assembly& assembly, ReferenceType refType)
at Microsoft.VisualStudio.Design.VSTypeResolutionService.SearchEntries(AssemblyName assemblyName, String typeName, Boolean ignoreTypeCase, Assembly& assembly)
at Microsoft.VisualStudio.Design.VSTypeResolutionService.System.ComponentModel.Design.ITypeResolutionService.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase)
at Microsoft.VisualStudio.Design.VSTypeResolutionService.System.ComponentModel.Design.ITypeResolutionService.GetType(String name)
at System.ComponentModel.Design.DesignerHost.System.ComponentModel.Design.IDesignerHost.GetType(String typeName)
at Microsoft.VisualStudio.OfficeTools.Designer.Helpers.GetWinformControlTypes(String VSTType, IDesignerHost host, Type& baseType, String& extenderType)
at Microsoft.VisualStudio.OfficeTools.Designer.VSTCodeDomParser.AddInitializeComponentMethod(CodeTypeDeclaration rootComponent)
at Microsoft.VisualStudio.OfficeTools.Designer.VSTCodeDomParser.Parse()
at Microsoft.VisualStudio.OfficeTools.Designer.VSTDesignerLoader.Parse()
at System.ComponentModel.Design.Serialization.CodeDomDesignerLoader.EnsureDocument(IDesignerSerializationManager manager)
at System.ComponentModel.Design.Serialization.CodeDomDesignerLoader.PerformLoad(IDesignerSerializationManager manager)
at Microsoft.VisualStudio.OfficeTools.Designer.VSTDesignerLoader.PerformLoad(IDesignerSerializationManager manager)
---------------------------
OK
---------------------------

ERROR: The path is not of a legal form.
Imesh
Suryakant Verma
I don't know what code is causing the problem. If someone has access to the VSTO and .NET Source code can refer to the stack trace that I posted in 1st message.
This error occurs sometimes when I open the solution, and sometimes when I build it. Most of the time it goes away when I rebuild the solution.