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">

1 comment:

  1. could you please tell me little descriptive? or put a screen shot of it?

    ReplyDelete