Reputation: 43
I am new to Visual Studio and I am trying to work on two projects at a time, So what I did is add another project and the new project came up next to the old project but when I printed something on new project and pressed ctrl+f5, the old one's code kept on running not the new one. HELP!
For Ex: (PROJECT 1)
int a=1;
int b=2;
Console.WriteLine(a+b);
//Pressed Ctrl+F5
//Output comes: 3
NOW ADDING ANOTHER PROJECT(File->Add->Add Project) (PROJECT 2 APPEARS NEXT TO THE PROJECT 1 TAB)
//Started Coding in Project 2
string a="10";
string b="50";
Console.WriteLine(a+b);
//Pressed Ctrl+F5
//Still Output comes: 3 And NOT 1050
Summing all things up, how can I run project which I want to?
Upvotes: 0
Views: 57
Reputation: 39956
You need to Set your new project (PROJECT 2) as startup project:
1.In Solution Explorer, select the desired startup project within your solution (PROJECT 2
for example).
2.On the Project
menu (or right-click on the selected project and), choose Set as StartUp Project
.
Upvotes: 1