tags:

views:

581

answers:

5

My Silverlight website hangs at 100% loaded. There is no code for it, so far it is just the design in XAML, and it shows up fine in Expression Blend 3. It is the standard "Silverlight Website" project from Blend 3, without any modifications.

When I press F5 to run it, it shows as a 100% loading circle in firefox and never actually shows my app. The loading circle continues to animate as if its doing something.

Note: It worked yesterday, and I havent made very many changes to it since then.

A: 

I figured out the problem after looking at the XAML. On the height property of one of my buttons, there was a line break right before the ending quote. Expression blend didn't mark it as an error, and everything showed up fine in design mode.

When I removed the line break, the loading problem was fixed.

Kyle
A: 

Another thing I learnt was that if you specify a height/width in pixel, then also it hangs. Once you remove the px just leaving the integer part, it works fine.

Mrchief
+1  A: 

I had this problem in browser, out of browser - even when debugging. Using Silverlight 4 beta.

I hit F5 to start debugging and it never even hit a breakpoint for the constructor of App.xaml.cs.

I knew I'd uninstalled an out of browser app and changed some out of browser settings recently but nothing would tell me the actual problem.

I found in the end if I ran in IE (normally I use Chrome) - then an error icon would be shown in the bottom left - as if it were a javascript error.

Webpage error details

Message: Unhandled Error in Silverlight Application 
Code: 2020    
Category: ParserError       
Message: Invalid Property: OutOfBrowserSettings.     
File:      
Line: 47     
Position: 27     

Line: 54
Char: 13
Code: 0
URI: file:///R:/Project/Projece/Bin/Debug/TestPage.html

Well this didn't get me any further - except to tell me something was messed up with OutOfBrowserSettings.

What I ended up doing was creating a new AppManifest.xml. As of Silverlight 4 this is the default AppManifest.xml.

<Deployment xmlns="http://schemas.microsoft.com/client/2007/deployment"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
>
    <Deployment.Parts>
    </Deployment.Parts>
</Deployment>

I disabled 'create app manifest' and reenabled it. After toggling some of the settings back and forth - and even creating AppManifest2.xml I managed to get it working again.

I switched back to my original AppManifest.xml and it worked.

The point being check any message the browser gives you - and then change things that you don't think will make a difference.

Good luck!

Simon_Weaver
A: 

My other answer looks quite convoluted compared to this. This may or may not help in this situation but its worth a try:

In Visual Studio :

  • Click Debug > Exceptions
  • Click 'Find' and search for XAML
  • Click the 'Thrown' button next to System.Windows.Markup.XamlParseException

Start your project in debug mode. Any Xaml exceptions will be shown immediately. Check the inner exception sometimes for further information.

I wasted soooo much time before I finally figured this one out!

Simon_Weaver
A: 

Non of the above solution worked for me. Still searching the web for the answer.

matman