Trouble with user generated test pages
Last post 05-09-2008 3:29 PM by TNTownsend. 6 replies.
Sort Posts:
05-08-2008 11:16 AM
Trouble with user generated test pages

I have a 1.1 project that I am trying to get working under 2.0.  As long as I use the dynamically generated test page, I can get the managed code to initialize - including my retrofitted routines (C# here).  However once I tell him to use my own page - an EXACT copy of the dynamic page I fished out of ClientBin - the managed code is silent.  I thought at first it was only breakpoints - but a little popup debugging reveals that the app does not even initialize. 

 I then created a new project.  Here, the dynamically generated page produces the breakpoint - but copying said page to the project under another name and using it specifically produces nothing.

I did not put this under bugs because I assume I am doing something stupid.  Enlightenment?

TNTownsend

Joined on 06-12-2007
Posts 7
05-08-2008 12:12 PM
Re: Trouble with user generated test pages

Have you updated your code to 2.0?  The new version is not compatible with 1.1 and requires some changes.

---------
If this post has solved your problem, please select 'Mark as answer'

SDET, Microsoft Web Developer team

jamlew

Joined on 09-21-2007
Bellevue, WA
Posts 116
05-08-2008 12:43 PM
Re: Trouble with user generated test pages

Been through the "breaking" changes.  Code works - at least initializes - with the dynamically generated test page.  However, when I create a new project - silverlight application - I get the same behavior.  Works with the generated page, but fails with a user specified page.  The kicker is that my user page is a copy of the dynamically generated page and it still fails.  Since I have a real page - previously working just fine with 1.1 - I need to be able to debug with my own html.  However, this issue can be reproduced by simply creating a brand new silverlight app.

TNTownsend

Joined on 06-12-2007
Posts 7
05-08-2008 1:40 PM
Marked as Answer
Re: Trouble with user generated test pages

Let me make sure I'm working through this correctly.  Here's what I tried to reproduce your problem:

  1. I created a new Silverlight app with a genarated HTML page
  2. I build the project and copied the TestPage.html to the parent directory (so it doesn't get overwritten next build).
  3. I edited the <param name="source" .../> tag to point at the .xap file again (basically prepending "ClientBin/" to the value)
  4. I viewed the HTML file in the browser.

This process worked for me.  Are you following different steps?  Also, have you tried it with a new project created with the hosted website option?

---------
If this post has solved your problem, please select 'Mark as answer'

SDET, Microsoft Web Developer team

jamlew

Joined on 09-21-2007
Bellevue, WA
Posts 116
05-08-2008 2:24 PM
Re: Trouble with user generated test pages

Aha!  I knew this was something stupid.  This has been quite a trip.  I retrofitted my original project to 2.0 directly, but it does not run.  I could not get Silverlight to initialize - after much screwing around based on various articles on this site.  I then created this new project and moved the stuff over and attempted to adapt the generated page.  I NEVER CHANGED THE SOURCE!  Arrrgghhh.  Of course 'content.basic' is still null or undefined - the very problem I was getting when the source did not include clientbin.  But such is life.

 I am disappointed in the size of this thing.  My old dll was 14k.  This new app is 150k - and I am assuming that all these assemblies he is stuffing into clientbin are not something I must package and download.  As I tried to get the original project working, I found that silverlight.js simply will not work.  Lot's of errors at character position 6254 and 3456, etc.  The connection to silverlight and the managed code seems quite mysterious.  Which might explain my blindness to  "source".  Thanks for your help and sorry for taking your time.

 I also appreciate your quick reponse.  2.0 has turned me back into a newbie.

 Cheers

TNTownsend

Joined on 06-12-2007
Posts 7
05-09-2008 3:12 PM
Re: Trouble with user generated test pages

TNTownsend:

 I am disappointed in the size of this thing.  My old dll was 14k.  This new app is 150k - and I am assuming that all these assemblies he is stuffing into clientbin are not something I must package and download. 

In Beta 1 we package in the assemblies containing the user controls.  The files in ClientBin do go into the XAP, which does include those assemblies.  If you don't use any of the controls, you can probably remove the reference (note: I haven't tried this) but otherwise the size will be like that.  The issue should be better during Beta 2, as we're moving a lot of the controls straight into the runtime so users don't have to download them every time. Smile

---------
If this post has solved your problem, please select 'Mark as answer'

SDET, Microsoft Web Developer team

jamlew

Joined on 09-21-2007
Bellevue, WA
Posts 116
05-09-2008 3:29 PM
Re: Trouble with user generated test pages

That will certainly help.  I have the the app running - many thanks.  I will try removing references - although Beta 2 will probably arrive before I need to worry too much about download speed.  Cheers.

TNTownsend

Joined on 06-12-2007
Posts 7