Showing posts with label silverlight media element. Show all posts
Showing posts with label silverlight media element. Show all posts

Monday, April 11, 2011

The file is not part of the project or its Build Action property is not set to Resource

I wanted to play .wmv file in my website using the Silverlight Media Element. Here is the Syntax

<mediaelement name="media" source="Test.wmv" width="300" height="300">

But I was getting the error. "The file is not part of the project or its Build Action property is not set to 'Resource'.

I modified the Source attribute of the Media Element as shown below and it worked.

<mediaelement name="media" source="/[SolutionName];component/Test.wmv" width="300" height="300">