.NET 6 Winforms Designer / Argument Exception: Illegal characters in path #6826
Replies: 4 comments 21 replies
-
Yes, sorry, something went wrong on the GitHub side, the GitHub support is looking at the issue. Thank you for re-raising it.
Process Monitor may also come handy investigating what path is causing the issue. If all else fails, can you provide a standalone repro? Thank you |
Beta Was this translation helpful? Give feedback.
-
Given that it's only on your machine, have you tried repairing or uninstall/reinstalling of VS? |
Beta Was this translation helpful? Give feedback.
-
@thomasmiko Could you please check that by any chance following AppContextSwitchOverride is set to true in your instance of
|
Beta Was this translation helpful? Give feedback.
-
After I set the switch in the devenv.exe.config, calling the .NET 6 Designer worked. Unfortunately, I have another problem because of this. I now have the code editor crashing when I write anything in it.
I have now removed the switch again and since then the code editor works again, but the designer unfortunately not. |
Beta Was this translation helpful? Give feedback.
-
My Issue was closed and converted in an discussion which cannot be opened (at least on my side), so i will open a new one :)
Issue: https://github.com/dotnet/winforms/issues/6810
Discussion (which i can't open) https://github.com/dotnet/winforms/discussions/6818
Problem:
I've have installed VS2022 (Latest Preview and latest stable) and in both versions when I edit a .NET 6 WinForms project and want to open the Designer for a UserControl / Form, the following exception appears
This is the output from Winforms Designer logging (Verbose)
[11:06:01.0283033] Creating VSCodeDomDesignerLoader
[11:06:01.0543468] Processed 'System.Design' in 00:00:00.0998389
[11:06:01.0638662] Added 'System.Design'
[11:06:01.0648675] Loaded System.Drawing.Design in 00:00:00.0000189 [thread 35]
[11:06:01.0648675] Processed 'System.Drawing.Design' in 00:00:00.0001717
[11:06:01.0648675] Added 'System.Drawing.Design'
[11:06:01.2783607] [Thread 1] Creating design-time ITypeResolutionService.
[11:06:01.3429998] Current VS Version = 17.0
[11:06:01.3439981] Start processing enqueued assemblies
[11:06:01.3449974] Loaded Microsoft.WinForms.DesignTools.Protocol in 00:00:00.0000081 [thread 31]
[11:06:01.3599982] Processed 'Microsoft.WinForms.DesignTools.Protocol' in 00:00:00.0149551
[11:06:01.3619986] Added 'Microsoft.WinForms.DesignTools.Protocol'
[11:06:01.3619986] Loaded Microsoft.WinForms.DesignTools.Client in 00:00:00.0000074 [thread 31]
[11:06:01.3849983] Processed 'Microsoft.WinForms.DesignTools.Client' in 00:00:00.0224528
[11:06:01.3859974] Added 'Microsoft.WinForms.DesignTools.Client'
[11:06:01.5205867] [Thread 68] Launching server...
[11:06:03.3003038] System.ArgumentException: Illegal characters in path.
at System.Security.Permissions.FileIOPermission.EmulateFileIOPermissionChecks(String fullPath)
at System.IO.Directory.InternalCreateDirectoryHelper(String path, Boolean checkHost)
at Microsoft.WinForms.Utilities.Shared.ShadowCacheFolder..ctor(Boolean isNetCoreProject)
at Microsoft.DotNet.DesignTools.Client.Host.ServerLayout.d__8.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.DotNet.DesignTools.Client.Host.ServerProcess.d__21.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.DotNet.DesignTools.Client.Host.ServerHostFactory.d__7.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.DotNet.DesignTools.Client.DesignToolsClientLoader.d__28.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at Microsoft.VisualStudio.Telemetry.WindowsErrorReporting.WatsonReport.GetClrWatsonExceptionInfo(Exception exceptionObject)
[11:06:04.1210052] Cannot update selection in server process as Session is not connected.
I've tried it with several .NET 6 Projects, allways the same error.
Any ideas on how to proceed further to troubleshoot or further isolate the problem?
Beta Was this translation helpful? Give feedback.
All reactions