Can't debug dynamically loaded silverlight applications (xap file) - visual-studio

I have a solution which contains multiple applications. In the 'root' application I read a config file, download the xap files and load them using some class System.ComponentModel.Composition.Hosting.DeploymentCatalog .
The problem is that I can't debug these dynamically loaded applications (the web project, I can debug the Silverlight client). Visual Studio says the breakpoint will not be hit, displaying the exclamation mark inside the yellow triangle. If I copy the dll+pdb files to root application's output folder than the breakopints become colored in full red but they still aren't being hit.
Any solutions? Thanks!

Answering my own question:
I was able to debug my web project in Visual Studio 2010 by following the steps:
Web project -> Properties -> Web section -> Select Don't open a page. Wait for a ....
Start 'root' application in normal mode.
Right-click on web project -> Debug -> Start new instance.
That was it!

Go to Properties inside the Website project, click on Web tab at the left side, you will find Debuggers section at the bottom. Try checking ASP.NET radio button and uncheck Silverlight radio button and see whether you are able to debug the Web project or not.

If still this doesn't help, try unchecking Disable script debugging option in IE > Tools > Internet Options > Advanced

Related

visual studio 2010 security tab missing

I want ti change the Security Settings in visual studio 2010 .
but in my project-> properties -> security tab missing.
I answered this here:
Why am i not seeing the security tab in my Office Solution properties?
and here is my answer re-posted:
I had the same issue and the solution was super annoying to figure
out. Someone on another website mentioned that the Security tab is
only relevant for certain types of ClickOnce applications so I started
playing around with various options and figured it out.
In the Application tab, for Application Type, select Windows Forms Application from the drop-down menu (other drop-down options might also work but haven't tried them)
Save everything: In the main menu bar of Visual Studio, click File > Save All.
Close your project Properties window (i.e. the one with the Application tab that we were just modifying)
Open your project Properties window again: in your Solution Explorer, select your project, go to the main menu bar, click
Project, click Properties.
Voila! It should be there. :)

How do I set something in Visual Studio 2013 Express for Web so that running it in debug mode opens home page?

Running Razor, MVC5, .Net 4.5.1. I have no idea what constitutes a "start page" in MVC within the visual studio development environment. How do I set it so that every time I run F5 my home page opens?
Setting a startup page for MVC5 when debugging
This can be done in the Project Properties.
Open Solution Explorer and find the relevant project.
Right-click on the project and choose Properties (or press Alt+Enter).
Navigate to Web -> Start Action.
Explanation
By default an MVC application has the Specific Page radio button selected and the input box is blank. This means that the application will open a browser to the server with no page specified and MVC will use the default route of /Home/Index.
http://localhost:12345/
You can specifiy a different route. For example you could use Home/About (see image).
This would open
http://localhost:123456/Home/About

MS VS 2010 - Web one click publish toolbar is disabled when code file is viewed

I use VS 2010 and the deploy function and to get quick access to the functionality I showed Web One Click Publish toolbar. But the toolbar is only activated when I open Web.config files or when I open Properties of a web project. When I open C# code file that toolbar is disabled. I think the functionality should be enabled independently like for example functionality Build project.
Is it something wrong in my VS installation or configuration?
I've just found that it is disabled when code file being viewed (active) does not belong to Web project (but to other one instead that cannot be published).

How to change the default browser to debug with in Visual Studio 2008?

When you hit F5, the browser windows pops up, how do you set which browser the debugger users in Visual Studio 2008?
Update 1
I have looked for the 'Browse with' option and not found it.
Visual Studio opens the default browser instead of Internet Explorer
Update 2
If you are already debugging you dont have the 'Browse with' option.
Stop debugging and then its there!
Update 3
The accepted answer below is also relevant to changing the default browser to debug with in Visual Studio 2010.
(In the Project Solution window) Right click a page (.aspx, or on a folder)
Select Browse With...
Choose your browser
Click Set as Default
Click Browse
ASP.NET projects:
Right click a webpage (.aspx, or on a folder)
Select Browse With...
Choose your browser
Click Set as Default
Click Browse
ASP.NET MVC 1 projects:
Right click Default.aspx, then follow steps above.
ASP.NET MVC 2 projects:
As there is no Default.aspx, you need to create a Web Form (right-click project > Add > New Item) and follow the steps above.
If you use ASP-NET MVC, you need to right-click on Default.ASPX which will have a Browse With menu.
To permanently make Visual Studio open a project in IE without changing the default browser you can do the following:
Project Properties -> Web -> Start Action
Start external program: C:\Program Files\Internet Explorer\iexplore.exe
Command line arguments: Enter the url of the path to your start page ie http:\localhost\myproject\default.aspx
This won't allow you to debug client side script in Visual Studio though.
If you are using MVC 2 you do not need to create another project, just add component -> webform to the project then:
* Right click the webform
* Select Browse With...
* Choose your browser
* Click Set as Default
* Delete the webform
If you use MVC, you don't have this menu (no "Browse With..." menu)
Create first a normal ASP.NET web site.
I have passed this problem in VS2012. When I can't find "Browse with.." on the right-click of the project, I found it on File Menu -> Browse with. If it doesn't appear, first you have to click on menu bar, then try open file menu again. If it still doesn't appear, you can just go to Quick Launch on the top right of menu bar then type it "Browse with".
In VS 2010 just make the browser as your default broswer in which you want to run your application and there is no need to set anything in visual studio. I did it for google chrome and its working for me. I just made google chrome as my default browser and its working fine. I am almost sure that this should work in VS 2008 also.
First click show all files. Then in the bin folder choose any xml file and then right click and by selecting 'browse with' select your desired browser.
I find that the Browse With.. menu item only appears in Visual Studio 2010 when I Run as administrator. And in that case it is available even while in debug mode.
An easier way to do this is simply by selecting the arrow next to the Start Debugging:
Then in the Drop Down goto Web Browser and select the browser you would like to debug the site with, you can also select Browse with... to set the default as explained in other answers.
ie ---> Tools ----> Internet options -----> Programe ------> Make Defualt

Why does Visual Studio launch multiple WebDevs when I debug?

I have a Visual Studio 2008 solution with several projects in it - some of which are web applications / sites.
Whenever I go "Debug > Start new instance" for a specific web application and VS launches the ASP.net Development Server (WebDev.WebServer.EXE) for that application, VS also launches 3 additional such processes - one for each of 3 other web applications I have in the solution.
How can I tell Visual Studio to only launch WebDev for the one project I'm debugging? I've looked both in the project configurations and in the solution configuration and could not find the relevant setting...
I think it runs one for each Port -- you can try turning setting them to have the same port - click on the project and look at the properties pane (you have to turn off the the automatic port generation and then set the port#)
I tried the above solution but it did not worked. My solution was a vs2005, what I found to solve the project was to make the property window of VS 2008 visible. Then click on the web projects and then set the "Always start when debugging" property to false and this should take care of it :(
In Visual Studio 2008, there is an entry on the Properties page for the project called "Always Start When Debugging".
Note you have to get to this by selecting the project and going to the Properties pane (or right-clicking Properties). This option is not present when you double-click the project and open it in the main editing pane.
VS by default sets this value to on for all your web projects. Turning it off will solve this problem.
[editorial]This is fairly annoying and I wish the default were false![/editorial]
Suggestion - don't use the internal WebDev, use IIS instead. Also reduces the clutter in the systray. ;)

Resources