Set default browser when debugging WPF? Set default browser when debugging WPF? wpf wpf

Set default browser when debugging WPF?


Setup the external program as Internet explorer path and the command line arguments as your path to xbap file within quotes, like shown below:

enter image description here


A simple and easy way to do this is to associate *.htm or *.html (don't remember exactly, try both) files with IE, and it will work for XBAP.

UPDATE:

Solution described above works for "Start external program option".

For "Start browser with URL" option you actually can set default browser in Visual Studio. I don't find how to set it through Tools -> Options, but you can achieve it by following steps:

  1. In your solution explorer find a file which meant to be viewed in browser (e.g. *.htm, *.svc)
  2. Right click on this item and choose "Browse With..."
  3. In the opened window you'll see a list box with installed browser and one of them will be marked as default.
  4. In the list box Choose "Internet Explorer" and click "Set as Default" (if there is no IE browser in the list just add it).


Set Default browser to IE for WPF:

Project preporties -> Debug tab properties...

  1. Remove "-debug" only, if there in Command line arguments:(under Start Options)
  2. Choose Start external program ( under Start Action) and give the path of "iexplore.exe"(EX: C:\Program Files\Internet Explorer\iexplore.exe )