我开始了一个新的解决方案,并将模板WPF App项目添加到该解决方案中。由于我不断收到错误System.ArgumentException
,因此我无法进入XAML设计器。这是所有解决方案中都存在的问题。
似乎对其他人有用的东西:
Program
中的一个名为C:\
的文件,我没有该文件,也从未拥有过,当我的系统使用德语时,我还有一些剩菜,但我认为那不重要)>我的系统和安装:
Stacktrace:
System.ArgumentException An item with the same key has already been added. at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource) at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add) at System.Collections.Generic.Dictionary`2.Add(TKey key, TValue value) at Microsoft.VisualStudio.DesignTools.Utility.Telemetry.VsTelemetryService.RegisterDesignerProcessSession(Int32 pid) at Microsoft.VisualStudio.DesignTools.Utility.DesignerSessionTracker.RecordDesignerStart(Int32 processID, String isolationTargetIdentifier, String buildConfiguration) at Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.Primitives.ProcessDomainFactory.ProcessIsolationDomain..ctor(ProcessDomainFactory factory, IIsolationBoundary boundary, AppDomainSetup appDomainInfo, IIsolationTarget isolationTarget, String baseDirectory) at Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.Primitives.ProcessDomainFactory.CreateIsolationDomain(IIsolationBoundary boundary) at Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.Primitives.IsolationBoundary.Initialize() at Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.Primitives.IsolationBoundary.CreateInstance[T](Type type) at Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.IsolatedObjectFactory.Initialize() at Microsoft.VisualStudio.DesignTools.DesignerHost.Services.VSIsolationService.CreateObjectFactory(IIsolationDomainFactory isolationDomainFactory, IObjectCatalog catalog) at Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.IsolationService.CreateLease(IIsolationDomainFactory domainFactory) at Microsoft.VisualStudio.DesignTools.DesignerContract.IsolatedDesignerService.CreateLease(IIsolationDomainFactory domainFactory, CancellationToken cancelToken, DesignerServiceEntry& entry, IServiceProvider serviceOverrides) at Microsoft.VisualStudio.DesignTools.DesignerContract.IsolatedDesignerService.IsolatedDesignerView.CreateDesignerViewInfo(CancellationToken cancelToken) at Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.IsolatedTaskScheduler.InvokeWithCulture[T](CultureInfo culture, Func`2 func, CancellationToken cancelToken) at Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.IsolatedTaskScheduler.<>c__DisplayClass9_0`1.<StartTask>b__0() at System.Threading.Tasks.Task`1.InnerInvoke() at System.Threading.Tasks.Task.Execute()
更新:
我注意到第一次启动设计器会导致另一个错误:
System.Runtime.Remoting.RemotingException
[] Designer process terminated unexpectedly!
at Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.Primitives.ProcessDomainFactory.ProcessIsolationDomain.Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.IIsolationDomain.CreateInstance(String assemblyName, String assemblyCodeBase, String typeName)
at Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.Primitives.IsolationBoundary.Initialize()
at Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.Primitives.IsolationBoundary.CreateInstance[T](Type type)
at Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.IsolatedObjectFactory.Initialize()
at Microsoft.VisualStudio.DesignTools.DesignerHost.Services.VSIsolationService.CreateObjectFactory(IIsolationDomainFactory isolationDomainFactory, IObjectCatalog catalog)
at Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.IsolationService.CreateLease(IIsolationDomainFactory domainFactory)
at Microsoft.VisualStudio.DesignTools.DesignerContract.IsolatedDesignerService.CreateLease(IIsolationDomainFactory domainFactory, CancellationToken cancelToken, DesignerServiceEntry& entry, IServiceProvider serviceOverrides)
at Microsoft.VisualStudio.DesignTools.DesignerContract.IsolatedDesignerService.IsolatedDesignerView.CreateDesignerViewInfo(CancellationToken cancelToken)
at Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.IsolatedTaskScheduler.InvokeWithCulture[T](CultureInfo culture, Func`2 func, CancellationToken cancelToken)
at Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.IsolatedTaskScheduler.<>c__DisplayClass9_0`1.<StartTask>b__0()
at System.Threading.Tasks.Task`1.InnerInvoke()
at System.Threading.Tasks.Task.Execute()
我开始了一个新的解决方案,并将模板WPF App项目添加到该解决方案中。由于我不断收到错误System.ArgumentException,因此我无法进入XAML设计器。问题是...
将VS19更新到最新版本(16.3.2)修复了该问题。我的猜测是this解决了该问题。