Note that there are some explanatory texts on larger screens.

plurals
  1. POWindows Form Designer Error "Illegal characters in path."
    text
    copied!<p>Last week I closed my working VS 2012 (11.0) project and today I am unable to load up the Windows Form Designer. Instead, I get this message: "To prevent possible data loss before loading the designer, the following errors must be resolved: Illegal characters in path." There is no option to ignore the message. I can still run my code and it works fine. Please prepare yourself for a lengthy call stack:</p> <pre><code>at System.IO.Path.CheckInvalidPathChars(String path, Boolean checkAdditional) at System.IO.Path.Combine(String path1, String path2) at Microsoft.VisualStudio.Platform.VsAppDomainManager.d__1.MoveNext() at Microsoft.VisualStudio.Platform.VsAppDomainManager.InnerResolveHandler(String name) at Microsoft.VisualStudio.Platform.VsAppDomainManager.ResolveHandler(Object sender, ResolveEventArgs args) at System.AppDomain.OnAssemblyResolveEvent(RuntimeAssembly assembly, String assemblyFullName) at System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMarkHandle stackMark, IntPtr pPrivHostBinder, Boolean loadTypeFromPartialName, ObjectHandleOnStack type) at System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark&amp; stackMark, IntPtr pPrivHostBinder, Boolean loadTypeFromPartialName) at System.RuntimeType.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark&amp; stackMark) at System.Type.GetType(String typeName) 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) at System.ComponentModel.Design.DesignerHost.System.ComponentModel.Design.IDesignerHost.GetType(String typeName) at System.ComponentModel.Design.Serialization.CodeDomDesignerLoader.EnsureDocument(IDesignerSerializationManager manager) 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) ) </code></pre> <p>Visual Studio isn't giving me any more details beyond this, annoyingly (I don't even know which "path" it is referring to), but I can add some more information:</p> <ul> <li><p>In my Settings.settings I have a string <code>logFileDir</code> that points to a log file directory. The path is currently valid and when I run my program it correctly updates the log file.</p></li> <li><p>The form load method is simple and as follows: </p> <pre><code>if (Properties.Settings.Default.logFileDir != null) { _logFileDir = Properties.Settings.Default.logFileDir; PopulateLstDirectory(); } else { _logFileDir = null; } </code></pre></li> <li><p>The call stack grows sometimes when I run the code but the new lines appear to be duplicates of existing ones that I pasted above.</p></li> <li>I have tried cleaning &amp; rebuilding my solution and project, as well as restarting VS multiple times.</li> <li>I don't have any 3rd party controls in the project.</li> <li><p>The 2nd highest line of the call stack says something about Path.Combine - the only time I call that function is in the Click() method of some button on my form: </p> <pre><code>string pathString = Path.Combine(_logFileDir, logFileName); </code></pre></li> </ul>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload