2015-12-30 81 views
9

我刚刚安装了Visual Studio 2015更新1,我无法再使用WPF的设计器视图。它表示发生了未处理的异常。这是堆栈跟踪。 :无法加载文件或程序集'Microsoft.Windows.Design.Interaction,版本= 4.3.0.0,PublicKeyToken = b03f5f7f11d50a3a'

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

你解决了吗? –

+0

@Simon_Weaver,我不能。尝试卸载和安装2次。所以我放弃并卸载了更新1. –

回答

1

我做了Visual Studio 2015的修复工作。

我并不期待它是诚实的,但它确实如此。 这是“程序和功能”下的修复功能。花了大约45分钟,然后需要重新启动。

您可能需要关闭所有打开的窗口并重新构建解决方案。

修复后,

"C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\ 
    PublicAssemblies\Microsoft.Windows.Design.Interaction.dll" 

的filestamp从七月赴日 - 所以它肯定是一个腐败的安装。

+0

谢谢。我明天会试试看看它是否有效。 –

+0

最有可能的是,如果你看看这个目录,你会在DLL上看到7月份的日期。我在初始更新时确实有一些错误,但当然这些错误在你遇到问题之前从来没有任何意义 –

+0

我安装了Update 1,但在这里得到一个错误:http://prntscr.com/9nh1jq 你是否得到了错误? '错误代码:0x80091007' –

相关问题