Why does Visual Studio launch multiple WebDevs when I debug? - visual-studio

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. ;)

Related

Prevent unnecessary apps from running in visual studio 2017

I have 4 runnable projects(specifically web apps) in a single solution. The problem is when i try to run visual studio all the above mentioned apps getting run in background, but not in browser. However the setup is such that only one app is meant to run. Startup Project is set as Single startup project only
Right click on Solution.
Select Properties.
Select a single Startup Project
I fixed this by doing the below steps in Visual Studio
Select the project you want to stop running in background
press F4 (this will open properties of the project, but not the property page opens by right click > property)
Set Always Start When Debugging to false
But remember this is a user to user configuration. You cannot set it for all your team members

"Add Existing Item" feature disabled - how to enable / why does it happen?

I didn't use MSVS since v2008 (but I never was good at it). The version I'm talking about is 2012. I work mostly in Emacs, but for the team I must create MSVS projects and maintain them in a workable state. Now once I create a file, MSVS would not let me add it to the solution (click on "Project" in "Solution Explorer" -> context menu -> select "Add" -> "Add Existing Item" is grayed out.)
This used to work two days ago. Since then I've installed a plugin through NuGet that allows adding custom mime-types to IIS used in MSVS for ASP.NET projects. That was all the changes I've made.
How do I troubleshoot this? Why can this possibly happen? What could possibly be the reason for disabling this functionality?
EDIT
Sorry, it looks like it isn't possible to do it while "debugging" the project - somehow I must have fatfingered a debug session w/o noticing it. When I restarted the Studio, it prompted me about the open debugging session. After restarting the Studio the functionality was back. Still, it's strange you can't add files during debugging... or maybe I'm missing something.
I had the same problem today. The solution is to leave the debug mode in visual studio. Then the before grayed out menu point "Add New Item" project is available.
btw: you leave the debug mode in visual studio (2013) with Shift+F5 or click the red square in the gui.
Add Existing option is disable when you are in debug mode please stop debugging then try to add existing item.

Can I create a website project type in VS2010

We're upgrading to VS2010 and when I look in my "new project" window I can only see web application, not website. Has this gone? Is there an alternative?
I need this project type because we need to be able to edit code files on the fly on the live server - or has this now become an option embedded somewhere in the application project.
Cheers.
Use File>New>New Web Site, and you can find the web site templates.
But it does look like a very bad idea to edit on the fly files on a live server... Unless your customers are very understanding.
I doubt this is the answer since I ran into a similar thing with Visual Studio 2008, but I thought maybe it's still a quirk in Visual Studio 2010. I posted this on the "Community Content" section in the MSDN pages.
Creating multi-project solutions
This workflow to create a multi-project solution seems simple (and is), but it is very confusing if doing it for the first time, because this workflow wasn't QA'ed very well for intuativeness.
File > New > Project > New Project
... both the menu option and the dialog are misleading.. they should both say Project/Solution.. just like the Open menu does
Expand "Other Project Types", choose "Visual Studio Solutions" > Blank Solution
Right click your solution in Solution Explorer > Add New Project >
... I chose Visual C# > Web > ASP.NET Web Application (for an example)
OH NO! The solution dissapeared!
No problem, go to Tools (menu) > Options > Projects and Solutions > choose "Always show solution"
... sadly, this is unchecked by default for Visual Studio 2008

View more than one project/solution in Visual Studio

I am new to visual studio and I am experimenting around with some Windows Services. I have created two solutions and I would like to view both of them at once. Without having to click file->recent projects to switch back and forth.
Ideally this could take place in the solution explorer and just nest the projects, but I am only able to view one solution/project at a time there.
Is there anyway to view multiple solutions/projects in Visual Studio?
This is the way Visual Studio is designed: One solution, one Visual Studio (VS) instance.
Besides switching between solutions in one VS instance, you can also open another VS instance and open your other solution with that one. Next to solutions there are as you said "projects". You can have multiple projects within one solution and therefore view many projects at the same time.
There's a much easier (but not so obvious) way; right click on the Visual Studio icon in the taskbar, then right click on the application name in the popup menu, then click "Open". Windows will then open another instance where you can open another solution in.
If you have two separate solutions, then you cannot view them simultaneously in the same VS instance. However, you can open multiple instances of VS and tab between them.
An alternative would be to import the projects from one solution into the other, thus putting all of your projects into one solution. You can do this by following these steps:
In the Solution Explorer, select the Solution into which you want to import a project. Right-click, and select Add->Existing Project from the context menu.
In the file chooser, find the project file that you want to import (it will end in .XXproj where XX is the language you're using).
Click Open and voila! Your project is imported.
There is a way to store multiple solutions in one instance of VS.
Attempt the following steps:
File > Open > Project/Solution
This will bring up the open project window, notice at the bottom where it says options, select add to solution
Then select the file you want to add and click open
This will then add the solution to your project. You still won't be able to run the same project in a single instance of VS, but you can have all your code organized in one place.
NOTE:
This worked for Visual Studio 2013 Professional
Just right click on the Visual Studio icon and then select "New Window" from the contextual toolbar that appears on the bottom in Windows 8. A new instance of Visual Studio will launch and then you can open your second project.
You can create a new blank solution and add your different projects to it.
You can have multiple projects in one instance of Visual Studio. The point of a VS solution is to bring together all the projects you want to work with in one place, so you can't have multiple solutions in one instance. You'd have to open each solution separately.
Don't know whether this is useful but if you want to work with multiple projects without navigating through projects tree {like multi window} you can try opening VS in another virtual desktop (at least it's possible for Windows 10) by holding Ctrl+win+D. Then open another VS studio and open your other project there. You can switch between projects by Ctrl+win+arrow key {left/right}.
Two ways come to mind...
Open another visual studio window and open the second solution in it.
It would be preferable to add your existing projects to one solution, just right click and add existing project and navigate to the project file(csproj). .... e.g. C:\Users\User\Documents\Visual Studio 2012\Projects\MySqlWindowsFormsApplication1\MySql Windows Forms Project1\MySql Windows Forms Project1.csproj ....In this second way you might want to setup multiple start up projects i.e. for people with client-server apps or apps with dependencies. ....To do this Select the solution then GoTo: Project>>Properties>>Startup Project>> Select Multiple Startup projects and set actions to Start. When you debug, the selected as start will run.
For interest sake you could open another multiple solution windows to view different projects at the same time. http://www.schwammysays.net/visual-studio-2012-tip-multiple-solution-explorers/
After a long research and different experiments the easiest way "FOR MAC USERS" is to create a script:
open -a "Visual Studio" \
"path to first sln" \
"path to second sln" \
...
:D
File -> New Window. Select the other project in that window. Each project lives in a separate window. You can tab between them.
MAC users - this issue was winding me up, as its not possible to open two different Visual Studio instances at the same time. Ive found a solution that works fine, though its a little unorthodox : get the latest beta testing version, which will install alongside your normal VS install in a separate sandbox (it does this automatically). You can then run both versions side by side, which is enough for what I needed - to be able to examine one project for structure, code etc., while doing the actual coding I need to do in the 'current' VS install instance.

In Visual Studio (2008), can I start up a website debug session as the web root?

I have a website in my solution, let's assume it is in a folder called /Solution/Website1.
When I debug it in Visual Studio, it will come up as http://localhost:someport/Website1.
I want it to start as http://localhost:someport. Is this possible?
If you click on the Website1 Project then go to the Properties Window(F4) you should see a property here for Virtual path try setting that to "/"
(source: bendewey.com)
If you are using Visual Studio 2008:
R-Click on the project heading in the Solution Explorer. Click Properties. Go to the Web tab, there will be a Servers section which will alow you to specify the port.

Resources