Today I was testing something with third party assemblies in our web site and saw a familiar error:
Could not load file or assembly ‘XXXX.DLL’ 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 or use the command-line sxstrace.exe tool for more detail. (Exception from HRESULT: 0x800736B1)
So, I decided to follow this suggestion and use sxstrace,exe for the first time.
Here are the steps I followed.
I switched to the bin folder of my web application using Visual Studio command prompt.
I started sxstrace using the following command line
sxstrace trace -logfile:sxstrace.etl
Then I hit my web site to get the error
Then I ran the utility again to convert the log to plain text
sxstrace Parse -logfile:sxstrace.etl -outfile:sxstrace.txt
Finally I opened sxstrace.txt in text editor. I immeditely saw what assembly was missing
ERROR: Cannot resolve reference X.Y.Z,processorArchitecture=”amd64″,publicKeyToken=”wwwwwww”,type=”win32″,version=”188.8.131.52″.
Thanks and enjoy.