我刚刚安装了Visual Studio 2015更新1,我不能再使用WPF的设计器视图了。它表示发生了未处理的异常。这是堆栈跟踪。 :
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之前,它曾经工作得很好。 我该如何解决这个问题?
答案 0 :(得分:1)
我修复了Visual Studio 2015并且它有效。
我没想到它是诚实的,但确实如此。 这是“程序和功能”下的修复功能。大约需要45分钟,然后需要重新启动。
您可能需要关闭所有打开的窗口并重建解决方案。
修复后,
的文件戳 "C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\
PublicAssemblies\Microsoft.Windows.Design.Interaction.dll"
从7月到11月 - 所以它肯定是一个腐败的安装。