Search
Get Started
C
C#
•
3y ago
tab
❔ Why does this not show a console? It outputs in the debug below but a console does not appear
C#
Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,010
Members
View on Discord
Was this page helpful?
Yes
No
B
Buddy
•
1/26/23, 11:01 PM
You seem to have created a windows form application
(winforms
)
, please choose console application
.
B
Buddy
•
1/26/23, 11:02 PM
$newproject
B
Buddy
$newproject
M
MODiX
•
1/26/23, 11:02 PM
When creating a new project
, prefer using
.NET over
.NET Framework
, unless you have a very specific reason to be using
.NET Framework
.
.NET Framework is now legacy code and only get security fix updates
, it no longer gets new features and is not recommended
.
https://cdn.discordapp.com/attachments/569261465463160900/899381236617855016/unknown.png
B
Buddy
You seem to have created a windows form application (winforms), please choose co...
T
tab
OP
•
1/26/23, 11:02 PM
I always chose Win Forms console or not
T
tab
OP
•
1/26/23, 11:02 PM
it always worked
B
Buddy
•
1/26/23, 11:02 PM
If you are going to be using a console
. Create a console application
B
Buddy
•
1/26/23, 11:03 PM
If you want to use Winforms
, but no console
. Create a winforms project
.
B
Buddy
If you want to use Winforms, but no console. Create a winforms project.
T
tab
OP
•
1/26/23, 11:03 PM
Why is this here
T
tab
OP
•
1/26/23, 11:03 PM
Attach
B
Buddy
•
1/26/23, 11:04 PM
Usually means attach to a debugger
B
Buddy
•
1/26/23, 11:04 PM
It should say start
.
T
tab
OP
•
1/26/23, 11:04 PM
\
B
Buddy
•
1/26/23, 11:05 PM
Yeah
, you don
't need that
.
T
tab
OP
•
1/26/23, 11:05 PM
This is what i created
T
tab
OP
•
1/26/23, 11:05 PM
Oh
T
tab
OP
•
1/26/23, 11:05 PM
i see
T
tab
OP
•
1/26/23, 11:05 PM
Wrong one
T
tab
OP
•
1/26/23, 11:05 PM
Thanks
B
Buddy
•
1/26/23, 11:05 PM
What workloads have you installed
?
B
Buddy
•
1/26/23, 11:06 PM
You can check that by searching for the program
'Visual Studio Installer
'
B
Buddy
•
1/26/23, 11:06 PM
Then press modify on your VS version
, and then show that
.
A
arion
•
1/27/23, 6:59 PM
If you want both
, a console and winforms stuff
(for some reason
)
u can use PInvoke to either create a console or to attach it to the parent process
https://learn.microsoft.com/en-us/windows/console/attachconsole
https://learn.microsoft.com/en-us/windows/console/allocconsole
https://learn.microsoft.com/en-us/windows/console/freeconsole
(To Remove it
)
A
arion
•
1/27/23, 7:00 PM
The parent process ID for attachconsole is
-1 or uint
.MaxValue
(depending on how u use PInvoke
)
T
tab
This is what i created
T
TeBeCo
•
1/27/23, 7:37 PM
open your file with the extension
and show us
A
Accord
•
1/28/23, 7:45 PM
Was this issue resolved
? If so
, run
/close
/close
otherwise I will mark this as stale and this post will be archived until there is new activity
.
csproj
csproj