Closed DorelPislan closed 1 year ago
Yes, sadly UWP and C# projects differ in the way they store the command line arguments.
For C# projects there are stored under <StartArguments>
in the "*.csproj.user" file, but for UWP apps they are stored under <CommandLineArguments>
. This means that we need to distinguish between those two.
As of now I couldn't find a way to do that via the VisualStudio API, because IVsHierarchy.GetProperty
with VSHPROPID_TypeGuid
only returns the GUID for a normal C# project. The only way I can currently think of, is to read the content of the "*.csproj" file directly and check if the <ProjectTypeGuids>
contain A5A43C5B-DE2A-4C0C-9213-0A381AF9435A
.
If someone has a better idea I am open for it.
If I set them in Visual Studio (Project Properties->Configuration Properties->Debugging -> Command Line Arguments) they are accessible in argument of
Application::OnLaunched()
entry point.