Search code examples
silverlightexpression-blend

Why is Blend building an empty HTML file?


I have a Silverlight 4.0 project which runs fine in VS2010 but when I try to run (F5) it in Blend I get a blank screen.

After taking a look at the source I realised the page it generates doesn't contain the silverlight app.

Here's the HTML -

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head><title>

</title></head>
<body>
    <form method="post" action="Default.aspx" id="form1">
<div class="aspNetHidden">
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwULLTE2MTY2ODcyMjlkZHW8gHAJNeerDIZOYjsLt8tMV8JWZdRpv5m7zfMmE6aQ" />
</div>

    <div>
    
    </div>
    </form>
</body>
</html>

Anyone got a clue why this is?


Solution

  • Do a cleanup first. Remove your Silverlight link in your Web Project under the Silverlight Applications Tab on your Web Project property page. Re-add it back. Recompile your solution. Make your Web Project your start up project and set the TestSilverlight.html or aspx page as start up page. Hit F5 and see if you can load your page correctly.