【问题标题】:VS2015 WPF Designer Failed to load FileLoadException HRESULT: 0x80131040VS2015 WPF Designer 无法加载 FileLoadException HRESULT: 0x80131040
【发布时间】:2018-04-10 09:50:46
【问题描述】:

我正在VS2015中创建一个WPF项目,一切正常,甚至应用程序编译并成功运行,但我无法加载设计器。我收到以下异常:

System.IO.FileLoadException 无法加载文件或程序集“Microsoft.Windows.Design.Interaction,Version=4.3.0.0,PublicKeyToken=b03f5f7f11d50a3a”或其依赖项之一。找到的程序集的清单定义与程序集引用不匹配。 (来自 HRESULT 的异常:0x80131040) 在 System.Reflection.RuntimeAssembly._nLoad(AssemblyName 文件名,字符串代码库,证据 assemblySecurity,RuntimeAssembly locationHint,StackCrawlMark 和 stackMark,IntPtr pPrivHostBinder,布尔 throwOnFileNotFound,布尔 forIntrospection,布尔suppressSecurityChecks) 在 System.Reflection.RuntimeAssembly.nLoad(AssemblyName 文件名,字符串 codeBase,证据 assemblySecurity,RuntimeAssembly locationHint,StackCrawlMark 和 stackMark,IntPtr pPrivHostBinder,布尔 throwOnFileNotFound,布尔 forIntrospection,布尔suppressSecurityChecks) 在 System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef,证据 assemblySecurity,RuntimeAssembly reqAssembly,StackCrawlMark 和 stackMark,IntPtr pPrivHostBinder,布尔 throwOnFileNotFound,布尔 forIntrospection,布尔suppressSecurityChecks) 在 System.Reflection.Assembly.Load(AssemblyName assemblyRef) 在 Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.Primitives.AppDomainFactory.AddBindingRedirectForAssembly(字符串 assemblyName,字符串 publicKeyToken,字符串 oldVersion,字符串 newVersion) 在 Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.Primitives.AppDomainFactory.ConfigureMandatoryAssemblies() 在 Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.Primitives.AppDomainFactory.ConfigureAppDomain() 在 Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.Primitives.AppDomainFactory.CreateAppDomainInfo() 在 Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.Primitives.ProcessDomainFactory.CreateIsolationDomain(IIsolationBoundary 边界) 在 Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.Primitives.IsolationBoundary.Initialize() 在 Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.Primitives.IsolationBoundary.CreateInstance[T](类型类型) 在 Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.IsolatedObjectFactory.Initialize() 在 Microsoft.VisualStudio.DesignTools.DesignerHost.Services.VSIsolationService.CreateObjectFactory(IIsolationTargetisolationTarget,IObjectCatalog 目录) 在 Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.IsolationService.CreateLease(IIsolationTargetisolationTarget) 在 Microsoft.VisualStudio.DesignTools.DesignerContract.IsolatedDesignerService.CreateLease(IIsolationTargetisolationTarget,CancellationToken cancelToken,DesignerServiceEntry& 条目,IServiceProvider 服务覆盖) 在 Microsoft.VisualStudio.DesignTools.DesignerContract.IsolatedDesignerService.IsolatedDesignerView.CreateDesignerViewInfo(CancellationToken cancelToken) 在 Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.IsolatedTaskScheduler.InvokeWithCulture[T](CultureInfo 文化,Func2 func, CancellationToken cancelToken) at Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.IsolatedTaskScheduler.<>c__DisplayClass10_01.b__0() 在 System.Threading.Tasks.Task`1.InnerInvoke() 在 System.Threading.Tasks.Task.Execute()

其他一切正常,只是设计器没有加载。

【问题讨论】:

标签: c# wpf exception visual-studio-2015 designer


【解决方案1】:

好的,所以使用标准设置重新安装 VS2015 对我来说已经完成了这项工作。现在一切正常。

问题原因: 我之前安装了带有自定义选项的 VS,并且只选择了 Web 工具。这就是为什么很少有包裹丢失的原因。因此,使用标准设置重新安装就可以了。

【讨论】:

    猜你喜欢
    • 2016-08-03
    • 2014-07-03
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-02-26
    • 1970-01-01
    • 2016-12-14
    相关资源
    最近更新 更多