Windows Phone 8 system.io.filenotfound exception

481 Views Asked by At

So I get the following exception-

An exception of type 'System.IO.FileLoadException' occurred in mscorlib.ni.dll and wasn't handled before a managed/native boundary
Unhandled Exception - App Crash : Could not load file or assembly 'Microsoft.Web.Media.SmoothStreaming, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
Unhandled Exception - App Crash : at Microsoft.PlayerFramework.Adaptive.AdaptivePlugin.get_MediaElement() 
at Microsoft.PlayerFramework.MediaPlayer.GetTemplateChildren()
at Microsoft.PlayerFramework.MediaPlayer.<OnApplyTemplate>d__1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.<ThrowAsync>b__3(Object state)Microsoft.PlayerFramework.Adaptive

So, i searched around. It seems that the "Version=2.0.0.0" is causing the problems. Before this I actually had an older version of the file - that was also causing some exceptions - so I updated it - and now it doesnt work at all.

All help is greatly appreciated! Thank You!

2

There are 2 best solutions below

1
kshitijgandhi On BEST ANSWER

So, the problem was that I updated the PlayerFramework dlls but didn't update the smoothstreaming dlls.

I needed to update Microsoft.Web.Media.SmoothStreaming to version 2.5

Found it in the Additional Downloads Section of PlayerFramework on Codeplex

http://www.microsoft.com/en-us/download/details.aspx?id=42080

@Domi - I wasn't able to get DependencyWalker to work. :/

Just hope it might help someone

2
DominikAngerer On

I'm really sure you are missing some DLLs which are dependency of mscorlib.ni.dl have a look at http://www.dependencywalker.com/. Dependencywalker will tell you if you miss any dependency.

These are usually the easiest ways to debug library load issues, as they make the problem extremely evident.

Same issue - other .dll also dependency - hope this also helps you:

Could not load file or assembly '***.dll' or one of its dependencies

Edit:
Using Smooth Streaming Media Elements: http://blogs.msdn.com/b/giuseppeguerrasio/archive/2010/12/06/using-smooth-streaming-media-element-for-windows-phone-7.aspx