How to change the default debug Profile when launching multiple asp .NET core projects? - visual-studio

I have a solution that launches multiple projects, and I set the launch profile for both to the console app instead of launching in IIS via the Project Properties page.
When I launched the projects individually they launched successfully in the console windows. But when I set multiple startup projects they went back to launching in IIS.
How can I get multiple projects to launch using the correct debug profile?

To set the default launch profile you can re-arrange the debug profiles listed in Properties > launchSettings.json. The first profile in the list will be the one used when launching multiple projects.

As mentioned in the comment of the other answer, it doesn't seems to be true for VS2022. It does not automatically use the first entry in the launchSettings.json list.
You can change the starting project to a single one and switch the debug profile with the small arrow next to the play button in the toolbar one by one. But if you need to do a mass switch, I suggest doing a "search in all files", it's stored in the .csproj.user files:
<ActiveDebugProfile>Docker</ActiveDebugProfile>
Change them all, then reload your solution.

Related

VS2015 Multiple startup projects - prevent page showing

I have recently had to reinstall my development machine so I'm unsure how I did this before.
A solution which I have currently has 3 projects that are needed for startup for debugging, this works fine, when I run the solution I get 3 pages open up in the browser which makes logical sense, however on my previous installation of my machine I only had one page open up, the API and MVC projects didn't show in the browser, but they were running so the entire application worked.
Is there a way to suppress the unneeded pages from opening up in the browser?
I found the option after a while, it was in the project properties, not the solution properties!
Here are the details if anyone is interested:
Right-click on the Project
Choose Properties
Go to the Web tab
In the Start Action section select the 'Don't open a page.
Wait for a request from an external application.' option.

How can I disable default tabs on project page in Teamcity?

I want to configure project home page in Teamcity (I'm using TeamCity Professional 9.1.3 (build 37176)).
There are several default tabs there which we are don't use with current project - Investigations, Muted Problems and so on. I want to completely disable them.
I am able to add new tabs via Administration - Project Settings - Report Tabs, but I cannot find any options to configure default tabs there. Checked also settings for root project, but there are no options there as well.
Is there any way to remove these tabs?
It is impossible to hide these tabs now. You are welcome to add a feature request in our tracker

Debug 2 projects in monodevelop

i have a simple question and maybe the solution is in front of my eyes but i cant see it:
How do i debug more than one project (eg.: server and client project) in monodevelop?
It now debugs just one project (breakpoints,..). after i close the first project monodevelop says: "Connot execute "path to .exe". A debugger session is already started."
So is it possible to have more than one debugger session?
thanks in advance
You can only run or debug a single application at a time (which is no different in Visual Studio, btw.), but you can run more than one instance of MonoDevelop.
If you only want to run the second application without debugging it, then you don't need to start another instance of MonoDevelop. You can either run the other project on the command line or simply define a custom command for it.
To add a custom command, right-click the project that you want to debug in MonoDevelop, select "Options", then goto "Run" / "Custom Commands", add a "Before Execute" command there. Click on the drop-down box on the right to see some variables that you can use for the command, such as ${SolutionDir}.

Can't switch from release to debug configuration in Visual Studio 2010

I downloaded an ASP.NET open source solution and opened it in Visual Studio 2010. VS is running as admin.
Everytime I switch the solution or a project from Active (Release) to Debug and uncheck 'Optimize code' and save, these changes don't stick. The solution or project reverts back to Active (Release).
Why is this happening?
You also have to change it in Configuration-Manager (see pictures).
I just had this exact issue. The solution ended up being:
Go to Tools ⇒ Options ⇒ Make sure "Show All Settings" in the lower left is checked.
Then, in that same window, go to Projects and Solutions ⇒ General ⇒ check "Show advanced build configurations".
I have no idea why this checkbox was suddenly unchecked for me this morning, but this worked.
This is guessing a little, but anyways:
Most likely, you are using build configurations that don't include your start up project for Debug build.
Look for the 'Manage Build Configurations' (I think, no Windows machine nearby) menu item. It will show you a list of projects with tickboxes on the right to show whether it is to be built in the build configuration.
Switch to 'Debug' in that dialog and make sure your startup project - or the project that your starting the build for - is actually included in the build.
PS It is even entirely possible that the 'misbehaving' project is actually lacking a Debug build (it might have a deviant name, like DebugConsole or something else entirely). In that case, use the Project menu to add a build configuration of the proper name for that single project. Afterwards, check (again) that said build configurations are checked in the 'solution wide' build configuration dialog.
HTH
Changing the properties of a configuration doesn't change the current build configuration. If you open project properties, change from Release to Debug and make some changes, after exiting the dialog, you will build on the same platform as before. To change the platform you're building on, there is a combo-box right above the code - use that. You should have all available configurations in the list. When you open the project preferences dialog, the current configuration will be the default one in the dialog.
I opened the csproj file in a text editor. Noticed there were two PropertyGroup sections which look like duplicates, one was Debug|AnyCPU and the second was Release|AnyCPU. I deleted the second one and the debug one showed up.
Luchian Grigore's answer explains correctly one simple misconception that could lead to this problem and aaaaaaa's answer gives another way of correcting it: there is a dialog that looks like you are selecting the configuration to build but you are actually just selecting the configuration to configure.
However neither of their ways of opening the 'Configuration Manager' actually worked for me -- I had to click on the button configuration manager at the top right of the solution Properties.
(Note that the place where you choose the configuration is called Configuration Manager, whereas the place where you manage the configurations is Properties.)

VS2008: Launching the executable for a project that isn't the active project in a solution

In VS2008, Is it possible to launch the executable for a project that is not the active project in the solution? (i.e. its name is not in bold).
Not debugging it - just launching it. As far as I can see, you just have to drop in to Windows Explorer and double click the .exe! Am I missing a menu item or shortcut?
You can right-click a project to debug it. Right-click project -> Debug -> Start New Instance.
EDIT: I'm not sure of a way to do this outside of debug mode. That is essentially what the facility of the 'Active Project' is for. I typically set the active project and then use Shift+F5 to launch the application.
Right-click your solution and choose Properties.
Select Common Properties > Startup Project.
Select Multiple startup projects.
Next to the one you want to run, where it says None, change it to Start without debugging.
Does that do what you want?

Resources