The first thing I'd try is just passing a folder path to devenv and see what happens.
Looking at this page (https://msdn.microsoft.com/en-us/library/19sf6kk3.aspx) it looks like you can use the /Command switch when you launch devenv.exe. Then going into Visual Studio (Tools > Options > Keyboard) I see there's a File.OpenWebSite
command. I haven't tried this, but putting those things together I'm assuming you could do something like:
devenv.exe /command "File.OpenWebSite" [path]
The [path]
part is going to be the big question mark. The File.OpenWebSite
command might just open the dialog in Visual Studio.
You could also take a look at automating the IDE itself, as this post discusses. It's for VS2005 but might still work for newer versions.
https://social.msdn.microsoft.com/Forums/vstudio/en-US/3c8e5b16-b616-4de4-9744-6594be4f474c/automating-opening-of-a-website-in-vs2005?forum=vsx
System.Type type = Type.GetTypeFromProgID("VisualStudio.DTE.9.0", true);
DTE dte = (DTE)System.Activator.CreateInstance(type, true);
VsWebSite.VSWebPackage webPkg = (VsWebSite.VSWebPackage)dte.GetObject("WebPackage");
webPkg.OpenWebSite(path, VsWebSite.OpenWebsiteOptions.OpenWebsiteOption_None, false);