0

The .csproj file contains the OutputType Exe for console apps or WinExe for Windows apps. Is it possible to query this value within an app?

I want to create a class that behaves according to the app type. But I don't want to inform the class about its type, I want it to determine this itself.

For this I would need a method in about the following form:

public string AppType()
{
    // Query the app type
    ...
    return result
}

Alternatively I would be lucky if I knew if this app is a console application or not.

  • 1
    Did you check https://stackoverflow.com/questions/12915135/how-to-read-the-output-type-in-code? – itectori Nov 23 '20 at 19:34
  • @itectori: Thank you. No, I did not know that. It's helpful, but don't suffer a real answer to my question. –  Nov 23 '20 at 19:56

0 Answers0