我刚刚安装了 Visual Studio 2015 update 1,无法再使用 WPF 的设计器 View 。它说发生了未处理的异常。这是堆栈跟踪。 :
System.IO.FileLoadException
Could not load file or assembly 'Microsoft.Windows.Design.Interaction, Version=4.3.0.0, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.Assembly.Load(AssemblyName assemblyRef)
at Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.Primitives.AppDomainFactory.AddBindingRedirectForAssembly(String assemblyName, String publicKeyToken, String oldVersion, String newVersion)
at Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.Primitives.AppDomainFactory.ConfigureMandatoryAssemblies()
at Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.Primitives.AppDomainFactory.ConfigureAppDomain()
at Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.Primitives.AppDomainFactory.CreateAppDomainInfo()
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(IIsolationTarget isolationTarget, IObjectCatalog catalog)
at Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.IsolationService.CreateLease(IIsolationTarget isolationTarget)
at Microsoft.VisualStudio.DesignTools.DesignerContract.IsolatedDesignerService.CreateLease(IIsolationTarget isolationTarget, 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__DisplayClass10_0`1.<StartTask>b__0()
at System.Threading.Tasks.Task`1.InnerInvoke()
at System.Threading.Tasks.Task.Execute()
在更新 VS2015 之前它曾经工作得很好。
我怎样才能解决这个问题?
最佳答案
我对 Visual Studio 2015 进行了修复,并且成功了。
我没想到它是诚实的,但确实如此。
这是“程序和功能”下的修复功能。大约需要 45 分钟,然后需要重新启动。
您可能需要关闭所有打开的窗口并重新构建解决方案。
修复后,文件戳
"C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\
PublicAssemblies\Microsoft.Windows.Design.Interaction.dll"
从 7 月到 11 月 - 所以它绝对是一个损坏的安装。
关于wpf - 无法加载文件或程序集 'Microsoft.Windows.Design.Interaction, Version=4.3.0.0, PublicKeyToken=b03f5f7f11d50a3a',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34533030/