VS 2022 .NET 6.0 "Always start when Debugging" - visual-studio

I have an netstandard2.1 Project in my Solution that always starts even when I start debugging another project. I can enable this in Properties in the Solution explorer.
Now I added a .NET 6.0 project to the solution and I want the same behaviour. But I don't know where to enable this feature.
How can I activate the feature?

If I understand correctly you are looking for VS feature multiple startup projects.
To select multiple projects as startup you can right-click on the solution item in the solution explorer, select "Properties" and then under "Common Properties" -> "Startup Project" click on "Multiple startup projects" and select needed ones:

Related

How to select which solution to "run" in multi-solution project

I am an electronic engineer with limited experience in Visual Studio. I have created a project with 2 solutions. The idea is that the 2nd project will allow to me do some tests more easily.
Now when I click on "build" or "start debuging" or "start without debugging", how do I choose which project should be is targetted by the tool?
Right click the project in the Solution Explorer pane, and select Set as Startup Project.

How do you have multiple startup projects in VS2010?

Looking through the achievement list for Visual Studio 2010, it says that there is an achievement for having 3 startup projects.
How do you have multiple startup projects at once? Whenever I right click a project and select "Set as StartUp Project" it switches my current startup project to the new one. I wasn't aware multiple startup projects was even a possibility.
How to: Set Multiple Startup Projects:
Visual Studio allows you to specify how more than one project is run when you start the debugger.
To set multiple startup projects
In Solution Explorer, select the solution.
On the Project menu, click Properties. The Solution Property Pages Dialog Box opens.
Expand the Common Properties node, and click Startup Project.
Click Multiple Startup Projects and set the project actions. For more information, see Startup Project, Common Properties, Solution Property Pages Dialog Box.

Change target CPU settings in Visual Studio 2010 Express

I wish to change the target CPU settings from "Any CPU" to "x86" in Visual Studio 2010.
I read on another website that I need to do the following:
Go to the startup project of your program.
Open the properties window.
Click the compile tab.
Click advanced compile options.
Change the target CPU options to x86.
But I don't see the "compile" tab anywhere in the properties.
Please help me at the earliest.
Update: I do see a platform dropdown, but that contains nothing apart from "Any CPU",
.
I believe the reason you don't see the Compile tab in the project properties is because you're using the Express edition. Optimization for a specific CPU type is not offically supported in this edition. However, you should be able to change the active solution platform in the following way:
From the "Tools" menu, select the "Options" item, and then select the "Projects and Solutions" option in the listbox on the left-hand side of the Options dialog. (You might have to check "Show all settings" first.) Check the box that says "Show advanced build configurations":
Then, on the "Build" menu, see if you have an item called "Configuration Manager". If not, you need to add the item to the menu (right-click on any area in the toolbar and choose "Customize" at the bottom of the list).
Once you've opened the Configuration Manager dialog, go to the "Active solution platform" drop-down box and choose "New". From the "New Solution Platform" dialog that appears, you should be able to choose "x86" from the first drop-down box.
Alternatively, it looks like you can manually edit the project file to specify the CPU type. See Changing the target CPU in VB Express 2008. It looks like it amounts to simply changing the <PlatformTarget> under the first <PropertyGroup> section to "x86".
To make the Build menu bar appear on your Visual Studio 2010, go to menu Tools -> Settings -> check Expert Settings. So later on you can use Configuration Manager.
I don't have Visual Studio 2010 right now, but in Visual Studio 2008, you have to first add a configuration through Build -> Configuration Manager.
After you have added the configuration, you can simply select the Active Configuration through the drop down menu.
I don't have Visual Studio 2010 right now, but in Visual Studio 2008, you have to first add a configuration through Build -> Configuration Manager.
After you have added the configuration, you can simply select the Active Configuration through the drop down menu.

Why doesn't F5 rebuild project before execution in Visual Studio?

If I press F5, my project runs but it doesn't "see" any of the changes that I made. I need to manually (re)build before pressing F5 for it to work.
It worked well previously. Any idea what I need to change?
Also :
Right Click on the solution in the solution explorer.
Click on "Properties".
Navigate to configuration Properties -> Configuration on the left side of the window.
Make sur the "Build" checkbox is checked on the line of your project.
Is it possible that you've reconfigured your "Build and Run" settings to "Never build"?
To check, follow these steps:
From the Visual Studio IDE, open the "Tools" menu, and click "Options".
Expand the "Projects and Solutions" header on the left.
Click the "Build and Run" item.
In the combo box labeled "On Run, when projects are out of date", ensure that you have the "Always build" option selected.
Another reason (which I had) could be dependencies.
In Solution Explorer, right click the Startup Project - Build Dependencies - Project Dependencies.
If the project you are working on is not set as a dependency of the Startup project then it won't get Built when you F5 / run.
Ok, for some reason all of the above solutions do not work for me, so I made a Pre-Build event (Right click project -> Properties -> Build Events) where I delete the bin and obj folder before building.
I am new to C# and Visual Studio but i found that going to Build -> Clean Project also worked for me, if you have already tried to select "Always build" option and it didn't work.

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