Skip to main content

Microsoft Silverlight

Unanswered Question Media not foundRSS Feed

(0)

agnomonus
agnomonus

Member

Member

4 points

4 Posts

Media not found

I am using Expression Blend 2 August Preview.  In my project I have a folder called media where I have wmv and jpg files.  When I try to open a wmv file it says Media Not Opened -  the media file cannot be found.  When I try to open a jpg file it says the path is wrong and the media file path shown is as though the media file was not [myProject]/media but ../media, as though the media folder was in the parent directory of my project rather than a subdirectory of my project directory.

This is what I have in the vbproj:


    <Resource Include="media\AnOrangePopsicle.jpg" />
    <Resource Include="media\AnOrangePopsicle.wmv" />

This format is identical to wht is in other projects that work just fine.

Can anyone tell me how I can get the Expression Blend 2 project to recognize the subdirectory. In the project window in Blend it shows the subdirectory and all the files but when I try to load a resource in the design window it gives me the error.

rzelt
rzelt

Member

Member

4 points

2 Posts

Re: Media not found

Try using a forward slash "/" instead in your files.

    <Resource Include="media/AnOrangePopsicle.jpg" />
    <Resource Include="media/AnOrangePopsicle.wmv" />

 

Rob

agnomonus
agnomonus

Member

Member

4 points

4 Posts

Re: Media not found

That's a good suggestion but not the answer.  That's how it was initially and it didn't work.  I changed it to a back slash because Expression writes file paths that way as the default in the project file.  On the chance that it might do some good, I took your suggestion and went in and changed them all back to forward slashes but to no avail.  I fnished the project.  Just had to manually write the xaml for the media element and change the path in the image elements.  I still can't insert media and get a good path on images and the wmv won't insert at all, but manually it works.

currierm
currierm

Member

Member

86 points

38 Posts

Microsoft

Re: Media not found

I'm not sure I follow exactly how to reproduce the problem.  But here are a few technical details that will hopefully get you on the right track.  The vbproj and csproj files should have something like: <Resource Include="Media\Autumn Leaves.jpg" />.

 Then the XAML file should use Source="Media/Autumn Leaves.jpg" for compatibility with the Silverlight plugin.  The August preview will sometimes insert a backslash (in the case where you edit the source property in the property inspector).  This should be fixed in the September preview.

http://www.microsoft.com/expression/products/features.aspx?key=blend2preview

Currier

Software Architect - Microsoft Expression Blend
  • Unanswered Question
  • Answered Question
  • Announcement
Microsoft Communities