❔ external window pls
im trying to make it so when i run it, it runs on an external window
sadly for me it only runs on VS code internal console :(
119 Replies
Launch the
gettingUserInput.exe
from your bin/Debug
folder
all you gotta do is build the project and it'll make thathow do i make it do that when i run the script like in VS
im not sure how to explain it but this
what about maybe why i cant type on "OUTPUT"?
it's output, not a terminal
if you want to type go to 'Terminal' tab at the bottom
but it runs on output not on terminal
VS code is confusing w
you can also do
dotnet run
in Terminal and that'll run your app and then you can typewell the new one
Tbf
You should be doing dotnet run
In the terminal
https://youtu.be/GhQdlIFylQ8?t=3911 im following this guy
freeCodeCamp.org
YouTube
C# Tutorial - Full Course for Beginners
This course will give you a full introduction into all of the core concepts in C# (aka C Sharp). Follow along with the course and you'll be a C# programmer in no time!
⭐️ Contents ⭐️
⌨️ (0:00:00) Introduction
⌨️ (0:01:18) Installation & Setup
⌨️ (0:05:03) Drawing a Shape
⌨️ (0:17:23) Variables
⌨️ (0:30:06) Data Types
⌨️ (0:37:17) Working With S...
he's using Visual Studio
yes
so am i
that's why it auto-launches the .exe on build with debugger
you're using Visual Studio Code
That is not VS
they are very very different
theres a difference?
yea
Yeah
Visual Studio is an IDE for .NET
w
and VSC is just a text editor
that explains all the problems i have so dar
You typed it twice
thanks alot!
typed what twice
All the best
Dw they edited it
that was to me
But yeah VS is a full-blown IDE
if you're a beginner i recommend using Visual Studio over Visual Studio Code
thanks
ill download it
it'll let you explore with IntelliSense and suggestions, and that's how you'll learn more
fwiw there's a setting in the .vscode settings.json where you can specify that your program should run in an external console
VS is a hell lot larger than VS code
thats prob why it took longer to download that one time
Yeah….
yh
guess ill wait it out
no run?
@ℍ
there's this little arrow
next to the button
click that and select the first thing, should be something like "gettingUserInput" with a green play button
like this
this little arrow
click it
then?
it only shows "current file"
Did you open a solution?
or just the files?
whats a solution
When you were opening it , did you click on either of these 2?
i opened a folder
ah
that explains it
in that folder, do you maybe have a file that's called
gettingUserInput.sln
?
if you do, double click that oneno
i think
wait
how do you get that window thing on the right
cause i closed it
oh nvm
/@ℍ
ah i see
you need to make a new a solution
freeCodeCamp.org
YouTube
C# Tutorial - Full Course for Beginners
This course will give you a full introduction into all of the core concepts in C# (aka C Sharp). Follow along with the course and you'll be a C# programmer in no time!
⭐️ Contents ⭐️
⌨️ (0:00:00) Introduction
⌨️ (0:01:18) Installation & Setup
⌨️ (0:05:03) Drawing a Shape
⌨️ (0:17:23) Variables
⌨️ (0:30:06) Data Types
⌨️ (0:37:17) Working With S...
follow from here
thanks
after you make the solution, in the folder where your project is located you can drop your other files
that way u won't have to repeat everything
oh thanks
i was worried about htat
oh i changed it and it works now
thanks again!
np
@ℍ do i have to like do make a new project everytime i make a new file
no no
cause somehow when i tried to change the thing it executes a different file
you right click this
and then Add > Class
?
keep the little arrow up top to be your
Program.cs
file, or the file where you have your Main
, as that'll launch your whole app. you just add new files by clicking on your project and then addthis
you should open the
.sln
file, instead of having the folder openso close out of visual studio, go to that folder and then double click this file
yep
now in your folder
drag these
into this one
'CS4HOURCOUSE' folder
that way they're in your project
still doing the wrong file
that's still your folder view instead of your actual solution file
open the
CS4HOURCOUSE.sln
its not supposed to do hello world btw
that's the default
go to
Program.cs
that's where it'll say Console.WriteLine("Hello, World!");
so i modify that instead?
yeah ur
Program.cs
filebut what if i want to modify another file and run it
instead of Program.cs
i copy pasted the code from
gettingUserInput.cs
to Program.cs
but its still printing hello world
@ℍYou need a
Program.cs
file with a static void Main
to launch
can you share screenshotshere are your errors:
1. lowercase
program
2. Program
is already definedcopy paste everything from here into your
Program.cs
filei did
you didn't
smh this is Program.cs
im clearly looking at something else
it isn't tho
smh wait
screenshot was before i pasted it lol my bad
still does the same thing whatsoever
Program2
-> Program
rename that Class
and if you have another Program
class, change that name to something elsefrom the other files?
go in here
and rename
program
to something elsechange it to like
randomClass
or somethinnext?
it still does the same thing
you also have multiple
Main
methods
like the one in here
change it to something elsedeleted those files this time
fk
now its working!
thanks once again
np
but then again what if i want to like do another file
do i have to create another "solution"
no
you would right click
the little rectangle
with the green "C#" in it
then Add > New Item
oh thanks
Could you please share, why you have chosen to use VSCode instead of Visual Studio Community 2022?
Just wondering
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.