This project is read-only.

Strange Exception occuring for me

Oct 25, 2013 at 9:10 AM
Please look into the following code.

In Page.xaml,

xmlns:videoPlayer="clr-namespace:MyToolkit.Controls;assembly=MyToolkit.Extended"

<Grid x:Name="LayoutRoot" Background="Transparent">
    <Grid.RowDefinitions>
        <RowDefinition Height="Auto"/>
        <RowDefinition Height="*"/>
    </Grid.RowDefinitions>
    <videoPlayer:YouTubeButton x:Name="youtube" ShowPlayIcon="False" YouTubeID="n__1Y-N5tQk" ></videoPlayer:YouTubeButton>
</Grid>
When i try to run the app, i am getting the following error,
The invocation of the constructor on type 'MyToolkit.Controls.UnstyledButton' that matches the specified binding constraints threw an exception.

What is this error?..
Oct 26, 2013 at 7:56 PM
Could you upload your Project somewhere??? because looking at your code i can't see anything wrong.
Oct 28, 2013 at 5:57 AM
Hello Johnwrnd,

I have uploaded the project in the following link.

http://temp-share.com/show/f3Y6AOWdn

Now am getting different error. I have doubt like am i referencing the right version of Mytoolkit.Extended??

Please make it work and upload in the same site and send me the link. THANKS IN ADVANCE.
Oct 28, 2013 at 9:53 AM
Please update to the newest version of MyToolkit (2.0.10) using NuGet. There were dependency problems which now are fixed.. Maybe this was your problem too...
Oct 28, 2013 at 10:13 AM
Hi rsuter,

When i was trying to install via Nuget, i am getting the following error.

Successfully installed 'MyToolkit 2.0.10.0'.
Successfully uninstalled 'MyToolkit 2.0.10.0'.
Install failed. Rolling back...
Could not install package 'MyToolkit 2.0.10.0'. You are trying to install this package into a project that targets 'Silverlight,Version=v4.0,Profile=WindowsPhone71', but the package does not contain any assembly references that are compatible with that framework. For more information, contact the package author.

When i tried adding the .dll manually, i am getting the following error

The invocation of the constructor on type 'MyToolkit.Controls.UnstyledButton' that matches the specified binding constraints threw an exception.

Please help me from this soon.

Can you do a sample app playing the youtube video of youtube id "n__1Y-N5tQk" and upload in any file hosting website. I could download from there.


THANKS IN ADVANCE
Oct 28, 2013 at 10:14 AM
rsuter wrote:
Please update to the newest version of MyToolkit (2.0.10) using NuGet. There were dependency problems which now are fixed.. Maybe this was your problem too...
Hi rsuter,

When i was trying to install via Nuget, i am getting the following error.

Successfully installed 'MyToolkit 2.0.10.0'.
Successfully uninstalled 'MyToolkit 2.0.10.0'.
Install failed. Rolling back...
Could not install package 'MyToolkit 2.0.10.0'. You are trying to install this package into a project that targets 'Silverlight,Version=v4.0,Profile=WindowsPhone71', but the package does not contain any assembly references that are compatible with that framework. For more information, contact the package author.

When i tried adding the .dll manually, i am getting the following error

The invocation of the constructor on type 'MyToolkit.Controls.UnstyledButton' that matches the specified binding constraints threw an exception.

Please help me from this soon.

Can you do a sample app playing the youtube video of youtube id "n__1Y-N5tQk" and upload in any file hosting website. I could download from there.


THANKS IN ADVANCE
Oct 28, 2013 at 10:54 AM
Which version of Visual Studio are you using?
Oct 28, 2013 at 11:10 AM
MyToolkit is a Portable Class Library and needs VS 2010 with SP1 and the PCL extension:

see http://msdn.microsoft.com/en-us/library/vstudio/gg597391(v=vs.100).aspx
Oct 28, 2013 at 11:29 AM
VS 2012 ruster. What is PCL extension?
Oct 28, 2013 at 11:31 AM
OK. Tell me the steps to achieve this. Where am i going wrong?
Oct 28, 2013 at 5:39 PM
I had no problems creating a new WP7 app and adding the NuGet package:

https://skydrive.live.com/redir?resid=1D9901AE8CF7D12F!17862&authkey=!AKIJgqLgSmcA5Tw
Oct 30, 2013 at 8:16 PM
Edited Oct 30, 2013 at 8:20 PM
Sometimes updating nuget on visual Studio helps to solve the Problem.

Update:
Downloaded the Project and it compiles just fine here.
Nov 10, 2013 at 6:27 AM
Hi Johnwrnd,

I tried your sample. It compiles fine here too. But video is not playing. I can able to see just the trailer image. But video is not playing.

Where am i going wrong?
Nov 10, 2013 at 9:47 AM
Have u tried it on a real device? The emulator has sometimes problems to play videos...
Nov 10, 2013 at 9:53 AM
Yes rsuter. I tried in Windows Phone 7 device. Not emulator.