So I’m working with Silverlight these days.  It’s an excellent technology but it’s got a fairly steep learning curve.  For the past several years I’ve been working predominantly with ASP.Net.  As a matter of fact, I’ve really gotten pretty good at it!  In addition to all of the in’s and out’s of ASP.Net, including the page lifecycle, custom controls, etc, I had gotten really comfortable with CSS and I’ve even stopped saying “I hate JavaScript” and started liking it.  Of course, with JQuery, it is really pretty good to work with.  But I digress.


Anyway, all of that stuff I have learned is out the window now.  Silverlight is completely different.  The easy part is that all of my C# code goes right to the client, as well as running on the server.  So much for JavaScript.  But there is no HTML, no ASP.Net controls.  None of it (at least in the apps I am writing).  This is not an ASP.Net application with a little Silverlight mixed in.  The entire UI for this business application is Silverlight.  The only html/asp.net is the page that hosts it.  So all of the UI is written in XAML.  XAML is cool and very powerful but takes getting used to and when you start with it, you are starting from scratch.  It’s not like writing a web app or a windows forms app at all.  But don’t get me wrong, I like it.


Anyway, the purpose for this first Silverlight post…


So I’m working along and things are going good.  My app is coming along and working as well as it should in the very rough state it is in.  After making a bunch of changes I fire up the debugger and run my Silverlight application in Internet Explorer.  “Hmmm, that’s weird, it shouldn’t do that” I think to myself.  I checked the code, and sure enough, it should not do “that”.  So I run it again. Same result.  My code is running without the recent changes I made.  Ok, I try a bunch of stuff, not necessarily in this order: Build my Solution, “Rebuild” my solution, “Clean” my solution, put obvious changes in my UI and re run it, restart Internet Explorer, Ctl-F5 to clear IE, try Firefox, close/reopen my solution, close/reopen VS2008, reboot my machine.  I probably tried a few more things but no matter what I did, the application continued to show the UI before my changes.  At some point in all of this, it became clear that my XAP file was not getting updated in my web project.  I tried deleting it, figuring that would signal Visual Studio to replace it when it builds again.  No luck.  I manually placed a current XAP file (from the Silverlight app) into my web project.  Now when I run my application is perfectly up to date!  So I am positive on the problem but unsure how to fix it. I figured that in my Property Pages of my Silverlight Application I’d find something telling me where/when/what to do with the XAP file.  But I couldn’t find it.  Next I searched the Property Pages of my Web Application.  Presto, there it is!  From a web application, select the “Silverlight Application” tab.  When I did the list of projects was empty!  I have no idea how it got to be that way.  But I clicked “Add” and the rest was self explanatory.  I picked my Silverlight project and selected where I wanted the XAP file to go. 


 


image


Technorati Tags: , ,

Leave a reply

required

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>