r/visualbasic • • Apr 22 '21

Windows Forms Application without console windows

I am currently creating a Windows Forms application for work.

Whenever I execute the app it not only opens the form itself but also a console window.

I've found out the apparently switching the type of the application from "console application" to "Windows Application" should result in the desired behaviour. But unfortunately it still persists.

Is there anything else that I might have to set to disable the console?

Thank you all in advance.

5 Upvotes

4 comments sorted by

View all comments

1

u/free_spam Apr 23 '21

I was not able to get it to work through the built-in publishing in visual studio, but using

dotnet publish -c Release -r win10-x64 --self-contained true -p:PublishSingleFile=true

worked immediately (which is weird, since I am using the same parameters in the .pubxml.

Creating a new project also did not fix the problem.

Thanks to all for your help.