0

我已经部署了我WPF browser application的使用Prismwith MEFon IIS 7。但是在 IE 完成下载应用程序文件后,我遇到了以下错误。在我忘记之前,我应该提到它在调试模式下以及当我通过 IE 浏览 xbap 文件时也可以正常工作。我VS2010 sp1Windows 7 sp1机器上使用。

这是详细的错误:

System.Runtime.Serialization.SerializationException: Unable to find assembly 'Microsoft.Practices.ServiceLocation, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.

   at System.AppDomain.nCreateInstance(String friendlyName, AppDomainSetup setup, Evidence providedSecurityInfo, Evidence creatorsSecurityInfo, IntPtr parentSecurityDescriptor)
   at System.Runtime.Hosting.ApplicationActivator.CreateInstanceHelper(AppDomainSetup adSetup)
   at System.Runtime.Hosting.ApplicationActivator.CreateInstance(ActivationContext activationContext, String[] activationCustomData)
   at System.Windows.Interop.PresentationApplicationActivator.CreateInstance(ActivationContext actCtx)
   at System.Activator.CreateInstance(ActivationContext activationContext)
   at System.Deployment.Application.DeploymentManager.ExecuteNewDomain()
   at System.Deployment.Application.InPlaceHostingManager.Execute()
   at MS.Internal.AppModel.XappLauncherApp.ExecuteDownloadedApplication()
   at System.Windows.Interop.DocObjHost.RunApplication(ApplicationRunner runner)
   at MS.Internal.AppModel.XappLauncherApp.XappLauncherApp_Exit(Object sender, ExitEventArgs e)
   at System.Windows.Application.OnExit(ExitEventArgs e)
   at System.Windows.Application.DoShutdown()
   at System.Windows.Application.ShutdownImpl()
   at System.Windows.Application.ShutdownCallback(Object arg)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
   at System.Windows.Threading.DispatcherOperation.InvokeImpl()
   at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(Object state)
   at System.Threading.ExecutionContext.runTryCode(Object userData)
   at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Windows.Threading.DispatcherOperation.Invoke()
   at System.Windows.Threading.Dispatcher.ProcessQueue()
   at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
   at System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
   at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
   at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
   at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
   at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
   at System.Windows.Threading.Dispatcher.Run()
   at System.Windows.Application.RunDispatcher(Object ignore)
   at System.Windows.Application.StartDispatcherInBrowser(Object unused)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
   at System.Windows.Threading.DispatcherOperation.InvokeImpl()
   at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(Object state)
   at System.Threading.ExecutionContext.runTryCode(Object userData)
   at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Windows.Threading.DispatcherOperation.Invoke()
   at System.Windows.Threading.Dispatcher.ProcessQueue()
   at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
   at System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
   at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)

PresentationHost.exe v3.0.6920.4902 built by: NetFXw7 - C:\Windows\System32\PresentationHost.exe
ntdll.dll v6.1.7600.16385 (win7_rtm.090713-1255) - C:\Windows\SYSTEM32\ntdll.dll
kernel32.dll v6.1.7600.16385 (win7_rtm.090713-1255) - C:\Windows\system32\kernel32.dll
KERNELBASE.dll v6.1.7600.16385 (win7_rtm.090713-1255) - C:\Windows\system32\KERNELBASE.dll
ADVAPI32.dll v6.1.7600.16385 (win7_rtm.090713-1255) - C:\Windows\system32\ADVAPI32.dll
msvcrt.dll v7.0.7600.16385 (win7_rtm.090713-1255) - C:\Windows\system32\msvcrt.dll
sechost.dll v6.1.7600.16385 (win7_rtm.090713-1255) - C:\Windows\SYSTEM32\sechost.dll
RPCRT4.dll v6.1.7600.16385 (win7_rtm.090713-1255) - C:\Windows\system32\RPCRT4.dll
USER32.dll v6.1.7600.16385 (win7_rtm.090713-1255) - C:\Windows\system32\USER32.dll
GDI32.dll v6.1.7600.16385 (win7_rtm.090713-1255) - C:\Windows\system32\GDI32.dll
LPK.dll v6.1.7600.16385 (win7_rtm.090713-1255) - C:\Windows\system32\LPK.dll
USP10.dll v1.0626.7600.16385 (win7_rtm.090713-1255) - C:\Windows\system32\USP10.dll
ole32.dll v6.1.7600.16385 (win7_rtm.090713-1255) - C:\Windows\system32\ole32.dll
OLEAUT32.dll v6.1.7600.16385 - C:\Windows\system32\OLEAUT32.dll
mscoree.dll v4.0.31106.0 (Main.031106-0000) - C:\Windows\System32\mscoree.dll
SHLWAPI.dll v6.1.7600.16385 (win7_rtm.090713-1255) - C:\Windows\system32\SHLWAPI.dll
WININET.dll v8.00.7600.16385 (win7_rtm.090713-1255) - C:\Windows\system32\WININET.dll
Normaliz.dll v6.1.7600.16385 (win7_rtm.090713-1255) - C:\Windows\system32\Normaliz.dll
urlmon.dll v8.00.7600.16385 (win7_rtm.090713-1255) - C:\Windows\system32\urlmon.dll
CRYPT32.dll v6.1.7600.16385 (win7_rtm.090713-1255) - C:\Windows\system32\CRYPT32.dll
MSASN1.dll v6.1.7600.16385 (win7_rtm.090713-1255) - C:\Windows\system32\MSASN1.dll
iertutil.dll v8.00.7600.16385 (win7_rtm.090713-1255) - C:\Windows\system32\iertutil.dll
SHELL32.dll v6.1.7600.16385 (win7_rtm.090713-1255) - C:\Windows\system32\SHELL32.dll
IMM32.DLL v6.1.7600.16385 (win7_rtm.090713-1255) - C:\Windows\system32\IMM32.DLL
MSCTF.dll v6.1.7600.16385 (win7_rtm.090713-1255) - C:\Windows\system32\MSCTF.dll
PresentationHost_v0400.dll v4.0.30319.1 built by: RTMRel -C:\Windows\Microsoft.NET\Framework\v4.0.30319\WPF\PresentationHost_v0400.dll
MSVCR100_CLR0400.dll v10.00.30319.1 - C:\Windows\System32\MSVCR100_CLR0400.dll
VERSION.dll v6.1.7600.16385 (win7_rtm.090713-1255) - C:\Windows\System32\VERSION.dll
PSAPI.DLL v6.1.7600.16385 (win7_rtm.090713-1255) - C:\Windows\system32\PSAPI.DLL
CRYPTBASE.dll v6.1.7600.16385 (win7_rtm.090713-1255) - C:\Windows\System32\CRYPTBASE.dll
uxtheme.dll v6.1.7600.16385 (win7_rtm.090713-1255) - C:\Windows\system32\uxtheme.dll
CBTLaunch.dll v3.7.0.32 - C:\Program Files\Red Gate\SQL Prompt 4\CBTLaunch.dll
CLBCatQ.DLL v2001.12.8530.16385 (win7_rtm.090713-1255) - C:\Windows\system32\CLBCatQ.DLL
CRYPTSP.dll v6.1.7600.16385 (win7_rtm.090713-1255) - C:\Windows\System32\CRYPTSP.dll
rsaenh.dll v6.1.7600.16385 (win7_rtm.090713-1255) - C:\Windows\system32\rsaenh.dll
RpcRtRemote.dll v6.1.7600.16385 (win7_rtm.090713-1255) - C:\Windows\System32\RpcRtRemote.dll
dwmapi.dll v6.1.7600.16385 (win7_rtm.090713-1255) - C:\Windows\System32\dwmapi.dll
comctl32.dll v6.10 (win7_rtm.090713-1255) - C:\Windows\WinSxS\x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.7600.16385_none_421189da2b7fabfc\comctl32.dll
SspiCli.dll v6.1.7600.16385 (win7_rtm.090713-1255) - C:\Windows\System32\SspiCli.dll
profapi.dll v6.1.7600.16385 (win7_rtm.090713-1255) - C:\Windows\System32\profapi.dll
ws2_32.DLL v6.1.7600.16385 (win7_rtm.090713-1255) - C:\Windows\system32\ws2_32.DLL
NSI.dll v6.1.7600.16385 (win7_rtm.090713-1255) - C:\Windows\system32\NSI.dll
dnsapi.DLL v6.1.7600.16385 (win7_rtm.090713-1255) - C:\Windows\System32\dnsapi.DLL
iphlpapi.DLL v6.1.7600.16385 (win7_rtm.090713-1255) - C:\Windows\System32\iphlpapi.DLL
WINNSI.DLL v6.1.7600.16385 (win7_rtm.090713-1255) - C:\Windows\System32\WINNSI.DLL
RASAPI32.dll v6.1.7600.16385 (win7_rtm.090713-1255) - C:\Windows\System32\RASAPI32.dll
rasman.dll v6.1.7600.16385 (win7_rtm.090713-1255) - C:\Windows\System32\rasman.dll
rtutils.dll v6.1.7600.16385 (win7_rtm.090713-1255) - C:\Windows\System32\rtutils.dll
sensapi.dll v6.1.7600.16385 (win7_rtm.090713-1255) - C:\Windows\System32\sensapi.dll
peerdist.dll v6.1.7600.16385 (win7_rtm.090713-1255) - C:\Windows\System32\peerdist.dll
USERENV.dll v6.1.7600.16385 (win7_rtm.090713-1255) - C:\Windows\System32\USERENV.dll
AUTHZ.dll v6.1.7600.16385 (win7_rtm.090713-1255) - C:\Windows\System32\AUTHZ.dll


mswsock.dll v6.1.7600.16385 (win7_rtm.090713-1255) - C:\Windows\system32\mswsock.dll
wshtcpip.dll v6.1.7600.16385 (win7_rtm.090713-1255) - C:\Windows\System32\wshtcpip.dll
NLAapi.dll v6.1.7600.16385 (win7_rtm.090713-1255) - C:\Windows\system32\NLAapi.dll
rasadhlp.dll v6.1.7600.16385 (win7_rtm.090713-1255) - C:\Windows\System32\rasadhlp.dll
dfshim.dll v4.0.31106.0 (Main.031106-0000) - C:\Windows\System32\dfshim.dll
mscoreei.dll v4.0.30319.1 (RTMRel.030319-0100) - C:\Windows\Microsoft.NET\Framework\v4.0.30319\mscoreei.dll
clr.dll v4.0.30319.225 (RTMGDR.030319-2200) - C:\Windows\Microsoft.NET\Framework\v4.0.30319\clr.dll
wship6.dll v6.1.7600.16385 (win7_rtm.090713-1255) - C:\Windows\System32\wship6.dll
fwpuclnt.dll v6.1.7600.16385 (win7_rtm.090713-1255) - C:\Windows\System32\fwpuclnt.dll
msxml3.dll v8.110.7600.16385 - C:\Windows\System32\msxml3.dll
ieproxy.dll v8.00.7600.16385 (win7_rtm.090713-1255) - C:\Program Files\InternetExplorer\ieproxy.dll
SXS.DLL v6.1.7600.16385 (win7_rtm.090713-1255) - C:\Windows\System32\SXS.DLL
PresentationHostProxy.dll v4.0.31106.0 built by: Main - C:\Windows\System32\PresentationHostProxy.dll
mshtml.dll v8.00.7600.16385 (win7_rtm.090713-1255) - C:\Windows\System32\mshtml.dll
msls31.dll v3.10.349.0 - C:\Windows\System32\msls31.dll
mlang.dll v6.1.7600.16385 (win7_rtm.090713-1255) - C:\Windows\system32\mlang.dll
msimtf.dll v6.1.7600.16385 (win7_rtm.090713-1255) - C:\Windows\system32\msimtf.dll
IEFRAME.dll v8.00.7600.16385 (win7_rtm.090713-1255) - C:\Windows\System32\IEFRAME.dll
OLEACC.dll v7.0.0.0 (win7_rtm.090713-1255) - C:\Windows\System32\OLEACC.dll
jscript.dll v5.8.7600.16385 - C:\Windows\System32\jscript.dll
ImgUtil.dll v8.00.7600.16385 (win7_rtm.090713-1255) - C:\Windows\System32\ImgUtil.dll
pngfilt.dll v8.00.7600.16385 (win7_rtm.090713-1255) - C:\Windows\System32\pngfilt.dll
mscorlib.ni.dll v4.0.30319.225 (RTMGDR.030319-2200) - C:\Windows\assembly\NativeImages_v4.0.30319_32\mscorlib\eb4e1e70734f6efb9c7de7ec5f452c9e\mscorlib.ni.dll
nlssorting.dll v4.0.30319.225 (RTMGDR.030319-2200) - C:\Windows\Microsoft.NET\Framework\v4.0.30319\nlssorting.dll
System.ni.dll v4.0.30319.225 built by: RTMGDR - C:\Windows\assembly\NativeImages_v4.0.30319_32\System\4d67e7b436c61b8141d19f99f7d2c75e\System.ni.dll
WindowsBase.ni.dll v4.0.30319.225 built by: RTMGDR - C:\Windows\assembly\NativeImages_v4.0.30319_32\WindowsBase\bde920dbf9e20e926b60106042e16d64\WindowsBase.ni.dll
PresentationCore.ni.dll v4.0.30319.225 built by: RTMGDR - C:\Windows\assembly\NativeImages_v4.0.30319_32\PresentationCore\887688af9665ecb951b418d5982a3c5d\PresentationCore.ni.dll
PresentationFramework.ni.dll v4.0.30319.225 - C:\Windows\assembly\NativeImages_v4.0.30319_32\PresentationFramewo#\5f8ab715f37b56cc76c8a130dbc6e74b\PresentationFramework.ni.dll
dwrite.dll v6.1.7600.16385 (win7_rtm.090713-1255) - C:\Windows\System32\dwrite.dll
wpfgfx_v0400.dll v4.0.30319.225 built by: RTMGDR - C:\Windows\Microsoft.NET\Framework\v4.0.30319\WPF\wpfgfx_v0400.dll
PresentationNative_v0400.dll v4.0.30319.1 built by: RTMRel - C:\Windows\Microsoft.NET\Framework\v4.0.30319\WPF\PresentationNative_v0400.dll
msimg32.dll v6.1.7600.16385 (win7_rtm.090713-1255) - C:\Windows\system32\msimg32.dll
System.Xaml.ni.dll v4.0.30319.1 built by: RTMRel - C:\Windows\assembly\NativeImages_v4.0.30319_32\System.Xaml\0c8167f224c2ac6fdba796bd53cdd338\System.Xaml.ni.dll
System.Deployment.ni.dll v4.0.30319.1 (RTMRel.030319-0100) - C:\Windows\assembly\NativeImages_v4.0.30319_32\System.Deployment\f2aa6fd240cb912568c2b6811b101726\System.Deployment.ni.dll
shfolder.dll v6.1.7600.16385 (win7_rtm.090713-1255) - C:\Windows\System32\shfolder.dll
System.Configuration.ni.dll v4.0.30319.1 (RTMRel.030319-0100) - C:\Windows\assembly\NativeImages_v4.0.30319_32\System.Configuration\9ea5f775ad6b7af3e326a08e26ff06a3\System.Configuration.ni.dll
System.Xml.ni.dll v4.0.30319.225 built by: RTMGDR - C:\Windows\assembly\NativeImages_v4.0.30319_32\System.Xml\c27f2137e0e6185d243251544f9ec0c9\System.Xml.ni.dll
winhttp.dll v6.1.7600.16385 (win7_rtm.090713-1255) - C:\Windows\System32\winhttp.dll
webio.dll v6.1.7600.16385 (win7_rtm.090713-1255) - C:\Windows\System32\webio.dll
credssp.dll v6.1.7600.16385 (win7_rtm.090713-1255) - C:\Windows\System32\credssp.dll
dhcpcsvc6.DLL v6.1.7600.16385 (win7_rtm.090713-1255) - C:\Windows\System32\dhcpcsvc6.DLL
dhcpcsvc.DLL v6.1.7600.16385 (win7_rtm.090713-1255) - C:\Windows\System32\dhcpcsvc.DLL
System.Security.ni.dll v4.0.30319.1 (RTMRel.030319-0100) - C:\Windows\assembly\NativeImages_v4.0.30319_32\System.Security\31b164d1230fb8b86e10858ba96e6cd5\System.Security.ni.dll
cryptnet.dll v6.1.7600.16385 (win7_rtm.090713-1255) - C:\Windows\System32\cryptnet.dll
WLDAP32.dll v6.1.7600.16385 (win7_rtm.090713-1255) - C:\Windows\system32\WLDAP32.dll
dsrole.dll v6.1.7600.16385 (win7_rtm.090713-1255) - C:\Windows\system32\dsrole.dll
clrjit.dll v4.0.30319.225 (RTMGDR.030319-2200) - C:\Windows\Microsoft.NET\Framework\v4.0.30319\clrjit.dll
System.Drawing.ni.dll v4.0.30319.1 built by: RTMRel - C:\Windows\assembly\NativeImages_v4.0.30319_32\System.Drawing\c751ad524dc3ec593de1883b9f0ad0ae\System.Drawing.ni.dll
System.Windows.Forms.ni.dll v4.0.30319.1 built by: RTMRel - C:\Windows\assembly\NativeImages_v4.0.30319_32\System.Windows.Forms\d43f6750bf5e42fd2183991957147df1\System.Windows.Forms.ni.dll
GPAPI.dll v6.1.7600.16385 (win7_rtm.090713-1255) - C:\Windows\System32\GPAPI.dll
Cabinet.dll v6.1.7600.16385 (win7_rtm.090713-1255) - C:\Windows\System32\Cabinet.dll
DEVRTL.dll v6.1.7600.16385 (win7_rtm.090713-1255) - C:\Windows\System32\DEVRTL.dll
ncrypt.dll v6.1.7600.16385 (win7_rtm.090713-1255) - C:\Windows\System32\ncrypt.dll
bcrypt.dll v6.1.7600.16385 (win7_rtm.090713-1255) - C:\Windows\System32\bcrypt.dll
bcryptprimitives.dll v6.1.7600.16385 (win7_rtm.090713-1255) - C:\Windows\system32\bcryptprimitives.dll
gdiplus.dll v6.1.7600.16385 (win7_rtm.090713-1255) - C:\Windows\WinSxS\x86_microsoft.windows.gdiplus_6595b64144ccf1df_1.1.7600.16385_none_72fc7cbf861225ca\gdiplus.dll
WindowsCodecs.dll v6.1.7600.16385 (win7_rtm.090713-1255) - C:\Windows\System32\WindowsCodecs.dll
System.Core.ni.dll v4.0.30319.225 built by: RTMGDR - C:\Windows\assembly\NativeImages_v4.0.30319_32\System.Core\58cbae39cc6370050c776b0ffeffcab3\System.Core.ni.dll
diasymreader.dll v10.0.30319.1 built by: RTMRel - C:\Windows\Microsoft.NET\Framework\v4.0.30319\diasymreader.dll
4

2 回答 2

0

您可以从https://servicelocation.codeplex.com/下载 Microsoft.Practices.ServiceLocation.dll 文件

于 2014-09-05T21:26:36.107 回答
0

也许您应该将此接口的程序集添加到已部署的程序集中?Prism 不是 .NET 框架的一部分,因此需要与您的应用程序一起安装/部署。

于 2013-01-05T11:37:53.590 回答