I have a basic WebView2 browser where I'm trying to open URLs in the same instance via the Run command. This would be similar to opening a webpage on Chrome via the Run command (e.g. chrome https://www.google.com) however each run command will need to open the URL in the same WebView2 browser instance.
I have tried running the following command on my WebView2 browser:
"C:\Project\WebView\bin\Release\WebView2Browser.exe" https://www.google.com
However, I've run into the following issues:
What am I missing?
By the sounds of it, you need to get to grips with the application mutex concept. So:
(note: the above terms are based on Visual C++, and may be different for C#, but the principles should be the same).
I do something similar in my Visual C++ MFC application where a user double clicks a MWB or SRR data file. It tries to start my app, and since it is running, passes the file info over to the running instance to process and brings it to the foreground.
I would show you some code but it is for Visual C++ MFC and not C#, but you should be able to find a lot of documentation about this process.
These discussions are tagged C#: