Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
541 views
in Technique[技术] by (71.8m points)

c# - The application has failed to start because its side-by-side configuration is incorrect

Unhandled Exception: System.IO.FileLoadException: Could not load file or assembl y 'TheLibrary, Version=1.2.3905.36284, Culture=neutral, PublicKeyToken=14 04827c3a8f2601' or one of its dependencies. The application has failed to start because its side-by-side configuration is incorrect. Please see the application event log for more detail. (Exception from HRESULT: 0x800736B1) File name: 'TheLibrary, Version=1.2.3905.36284, Culture=neutral, PublicKe yToken=1404827c3a8f2601' ---> System.Runtime.InteropServices.COMException (0x800 736B1): The application has failed to start because its side-by-side configurati on is incorrect. Please see the application event log for more detail. (Exceptio n from HRESULT: 0x800736B1)

When I look at the event log, I get this error.

Activation context generation failed for "C:projectDebugMyLibrary.dll". Dependent Assembly Microsoft.VC90.DebugCRT,processorArchitecture="x86",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="9.0.21022.8" could not be found. Please use sxstrace.exe for detailed diagnosis.

I used sxstrace to log the error and here is the result:

================= Begin Activation Context Generation. Input Parameter: Flags = 0 ProcessorArchitecture = x86 CultureFallBacks = en-US;en ManifestPath = C:Windowssystem32cmd.exe AssemblyDirectory = C:Windowssystem32 Application Config File = ----------------- INFO: Parsing Manifest File C:Windowssystem32cmd.exe. INFO: Manifest Definition Identity is Microsoft.Windows.FileSystem.CMD,processorArchitecture="x86",type="win32",version="5.1.0.0". INFO: Activation Context generation succeeded. End Activation Context Generation.

================= Begin Activation Context Generation. Input Parameter: Flags = 0 ProcessorArchitecture = x86 CultureFallBacks = en-US;en ManifestPath = C:DebugTheLibrary.dll AssemblyDirectory = C:Debug Application Config File = ----------------- INFO: Parsing Manifest File C:DebugTheLibrary.dll. INFO: Manifest Definition Identity is (null). INFO: Reference: Microsoft.VC90.DebugCRT,processorArchitecture="x86",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="9.0.21022.8" INFO: Resolving reference Microsoft.VC90.DebugCRT,processorArchitecture="x86",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="9.0.21022.8". INFO: Resolving reference for ProcessorArchitecture x86. INFO: Resolving reference for culture Neutral. INFO: Applying Binding Policy. INFO: No publisher policy found. INFO: No binding policy redirect found. INFO: Begin assembly probing. INFO: Did not find the assembly in WinSxS. INFO: Attempt to probe manifest at C:WindowsassemblyGAC_32Microsoft.VC90.DebugCRT9.0.21022.8__1fc8b3b9a1e18e3bMicrosoft.VC90.DebugCRT.DLL. INFO: Attempt to probe manifest at C:DebugMicrosoft.VC90.DebugCRT.DLL. INFO: Attempt to probe manifest at C:DebugMicrosoft.VC90.DebugCRT.MANIFEST. INFO: Attempt to probe manifest at C:DebugMicrosoft.VC90.DebugCRTMicrosoft.VC90.DebugCRT.DLL. INFO: Attempt to probe manifest at C:DebugMicrosoft.VC90.DebugCRTMicrosoft.VC90.DebugCRT.MANIFEST. INFO: Did not find manifest for culture Neutral. INFO: End assembly probing. ERROR: Cannot resolve reference Microsoft.VC90.DebugCRT,processorArchitecture="x86",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="9.0.21022.8". ERROR: Activation Context generation failed. End Activation Context Generation.

Cannot resolve reference Microsoft.VC90.DebugCRT,processorArchitecture=...

Any ideas?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

We've just had this exact same error but the cause was so misleading compared to the error it's hopefully worth adding here as it comes top on google...

The "The application has failed to start because its side-by-side configuration is incorrect" error was occurring when starting a windows service. In our instance this was caused by the services application.config xml file not being valid - someone had edited it manually and pasted in an extra closing tag. Amending this resolved the "not related in any way whatsoever" error message.

The quickest way to check this would be to paste the xml file into one of the many on-line xml validators free on the web.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...