FullTrustProcessLauncher.LaunchFullTrustProcessForCurrentAppAsync always opening console window, it is possible to prevent this?
Asked
Active
Viewed 58 times
1
-
2Don't create a console mode app. – Hans Passant Apr 02 '23 at 20:57
-
Yep, i have to change from Console App to Windows App, BIG THANKS! – Pete Apr 02 '23 at 21:10
1 Answers
1
I think that you can prevent the console opening windows creating a manifest file.
- In Visual Studio, right-click on your full-trust process project and select "Add" -> "New Item".
- In the "Add New Item" dialog box, select "Application Manifest File" and give it a name.
- Open the manifest file and find the element.
- Inside the
<windowsSettings>
element, add the following XML code:
<consoleSettings>
<windowsConsole xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">
<showWindow>false</showWindow>
</windowsConsole>
</consoleSettings>
With this manifest file in place, the console window will no longer appear when the FullTrustProcessLauncher.LaunchFullTrustProcessForCurrentAppAsync
method is called.

Diego Bascans
- 1,083
- 1
- 6
- 14