C
C#β€’9mo ago
sabertooth222

βœ… WPF app keeps launching Console Window

Hey all, new here, I believe this is the correct forum to ask this. Anyways, I am building a wpf app as an output of "wpf app", yet whenever I launch the self contained exe after publishing it through vs 22 (to local, you can see the attached screenshots), the app keeps launching the console window on startup (and if I close the console window manually, the app closes with it). I'm having troubles finding an answer to this on the ol' google. An even weirder confusing piece to me is while I normally work from my desktop/the screenshots are from my desktop, if I publish from my work laptop, the app doesn't launch a console window at all, just launches normally (and as far as I can tell, all of those settings are the same on the laptop as my desktop/screenshots). Thanks for any advice or help.
8 Replies
Pobiega
Pobiegaβ€’9mo ago
Is it the exact same code on both laptop and desktop? Have you tried publishing via dotnet publish instead of the VS wizard?
sabertooth222
sabertooth222β€’9mo ago
yes, it's the same. Using dotnet publish instead of vs wizard fixes it, which is odd. I'll have to try setting up a new but identical publish profile to see if the wizard is just bugged out Thanks!
Azrael
Azraelβ€’9mo ago
Check in here.
Azrael
Azraelβ€’9mo ago
Azrael
Azraelβ€’9mo ago
sabertooth222
sabertooth222β€’9mo ago
Found the problem with the wizard: including <OutputType>Exe</OutputType> in the publish profile xml caused the publish to launch the console with the exe for some reason removing that removes the console host launch
Azrael
Azraelβ€’9mo ago
πŸ‘
Accord
Accordβ€’9mo ago
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.
Want results from more Discord servers?
Add your server
More Posts
❔ Suggest a good ASP.NET Core MVC Tutorial that can help me get Started.Hello, I finished with the fundamental C# with FreeCodeCamp and Microsoft on September 9, 2023. I wo❔ Cant merge the same audio file twice or more using WaveFileWriter.CreateWaveFile16();Hello, Im trying to merge the audio files using **NAudio**, but if they repeat it doesnt cout it. βœ… What is the best way to store basic C#?Hi, I'm testing my C# code and learning from it. For example deserializing and serializing JSON usin❔ Question about Layered StructureGuys do you think it is bad to expose Entities Layer both DAL and Services layer? And where should I❔ βœ… Swagger not sending Guid string correctlyHello all, I have a controller set up exactly the same as some other controllers to get an item by aβœ… Web things minimal apiafter tons of codding i totally forgot what i wanted to do lmao, so problem is - product has click e❔ Cast is not valid when casting interface to comcrete implthis is my concrete imp: public class TempFile : IBrowserFile { public TempFile(string uβœ… finding dotnet 8.0.0-rc.1.23419.4 ?Hi. I'm trying to get dotnet-ef working with dotnet preview 8.0 It seems that it supports rc 1.23419❔ I need some help with my projectHello! My teacher said me to make a project to participate in a comeptition, so i decided to do an a❔ hi, I’m having some errors about DevExpress NuGet packages. they are installed but…hi, I’m having problems with some errors. it’s about DevExpress NuGet packages. i have them installe