Debugging Silverlight Tip

by Donn Felker 21. November 2008 03:09

If you're doing any kind of Silverlight work you're bound to get "Error on page" in Internet Explorer. Here's what I'm talking about.

You fire up your app in the browser window and BLAM. Screen is empty and you get the "Error in page" error. Double click the error and you get an Internet Explorer JS Error Window. Here it is in all its glory:

 image

 

How Do I Catch The Exception in Code?

The exception IS happening in code you're just not catching un-handled exceptions.

To turn them on, go to Debug --> Exceptions:

image

You'll get the window below. Check the "Common Language Runtime Exceptions" checkbox and click OK.

image

 

You will not get exceptions bubbled up to the Dev Environment. Here's what it looks like in action  (with the same error as the "blank screen" above).

image

 

Click "Break" and break into the area where the code barfed on you, and then clean up the mess you've created (on accident of course - who creates un-handled exceptions for fun anyway). :)

 

Enjoy.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

Silverlight | Visual Studio

Visual Studio Project MSBuild Import Error Fix

by Donn Felker 20. October 2008 05:54

If you get this error:

Unable to read the project File <path.to.project>.csproj.

C:\<path>\<to>\<projecct>\Project.csproj 77, 11): The imported project “C:\Microsoft.CSharp.targets’ was not Found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.

As shown in this screen shot ...

image

 

Take a look at your project file. Open it in a text editor (such as NotePad++) and look for the import statement.

Mine looked like this:

clip_image001

 

How to fix

Change the MSBuild Property $(MSBuildToolsPath) to $(MSBuildBinPath) and the project should load.

Like so:

clip_image001[7]

Currently rated 4.0 by 1 people

  • Currently 4/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

Visual Studio | MSBuild

My Visual Studio Settings - My Altered Vibrant Ink Settings Setup

by Donn Felker 7. October 2008 02:57

I've been asked for my Visual Studio Settings many times from clients, friends, colleagues and readers. I tend towards a dark scheme to help my eyes so I'm not squinting all day.

 

On the left, you'll see a preview of what it looks like (minus the red marks - of course).

 

You can download the settings here: DonnFelker.vssettings

Note: You will need the Consolas Font for these settings.











Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

Visual Studio

Knock Knock. Who's There? Me. Too Bad. Go Away.

by Donn Felker 3. March 2008 08:07

Yup, that's right. Team Foundation Sever told me TOO BAD, SO SAD, GO AWAY, TRY AGAIN ANOTHER DAY. What a great way to start a Monday. Oh, any by the way, we have an emergency release that might have to get pushed out. We're waiting on upper management to make the final decision... fun-fun it is.

YaleLock
Photo By: Auntie P

This weekend I rebuilt my machine. I have a Dell Inspiron 6400 Laptop and it came loaded with Vista Business (and TONS of junk-ware I don't need/nor care about). The one thing I love is that to restore back to factory settings only took about 10 minutes. Yes, 10 minutes - that's craziness. Most rebuilds take hours (unless you're using Ghost or something like that). There is a little partition on the drive that has the factory restore files on it. Just boot into the boot menu during start up (F8) and then choose restore to factory default and you'll have a factory machine within 10 minutes, total awesome-ness.

After I spend the next 6-8 hours installing VS2005, VS2008 (yes, I need both, some clients will only have VS2005 and the solution files in VS2005 and VS2008 are different, by a line), Office 2007, and my list of tools that are close to Hanselmans tools list I finally was ready to get back to work on Monday. I came in today and tried to connect to TFS (2005). Nope. Not going to happen. Here's the error:

 

TF31002: Unable to connect to this Team Foundation Server (...) Please contact your TFS Administrator.

 

Me: *Expletive*

Great, I am the TFS administrator. I have FULL access rights to TFS, I AM THE ADMINISTRATOR!! I have no idea why this would happen. I was able to connect last Friday, on Saturday before the re-install and team members are working against TFS as I speak. Then I rebooted, tried a few other things. Checked Windows firewall and a few other places. Nope. Still didn't work.

Me: *Expletive*

 

The Fix

I had a hunch this was caused by some type of interception of a call to TFS. I then decided to uninstall Macfee Anti-Virus because, well, because I can't stand anti-virus software that bloats my system. After the always-required-reboot, I started up VS2005 and tried to connect to TFS.

It worked.

I wanted to know if anyone else had this problem so I did a little poking around and I found this thread on the MSDN forums. It looks like this is the EXACT problem that I had.

Oh what a joy AV software is. Actually, I can't stand it - not one bit.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

TFS | Visual Studio

VS2008 HotFix Posted Yesterday

by Donn Felker 9. February 2008 21:22

vslogo Phoenix, we have had a problem... not anymore though... :) The web dev tools team posted a note about the release here.

The fix includes Html Source View Performance fixes, Design View Fixes, Html Editing Fixes, Javascript Editing Fixes, Web Site Build Performance improvements. Read the full post here.

Download the fix here.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

Visual Studio

Powered by BlogEngine.NET 1.4.5.0
Theme by Mads Kristensen

About the author

Donn Felker

Senior Consultant
MCTS
ScrumMaster
Agile Practitioner

About Me | Books I Recommend

Gotta Pay The Bills


Tag cloud

    Popular Posts

    RecentComments

    Comment RSS

    Calendar

    <<  January 2009  >>
    MoTuWeThFrSaSu
    2930311234
    567891011
    12131415161718
    19202122232425
    2627282930311
    2345678

    View posts in large calendar