Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Question
Tuesday, August 19, 2014 7:42 PM
Hi guys
I'm putting together a custom solution template. The template will call my assembly via the <WizardExtension> option. Once my assembly is called it should:
- Create an NTFS folder called MAIN under the root project folder
- Move all child files and folders to MAIN
- Reopen the solution in VS
Obviously I can't move the files around while the solution is open in VS so I'd like to close VS using something like the Developer Command Prompt. I don't see a command switch that allows me to easily do this. The nearest thing I've been able to find looks something like:
devenv /RunExit c:\PathToSolution.SLN
This should apparently build the solution and then close. Currently all it does is build the solution, though. It's not exiting the IDE. My other option is to kill the process, but that gets trickier due to permission restrictions.
So, my question is, is there a way to accomplish what I want with the developer command prompt? If not, is there another way/better way to do this?
Tks
Steven
All replies (1)
Wednesday, August 20, 2014 5:33 AM âś…Answered
Hi Steven,
Probably, best option for you apart from Kill the process is using PowerShell.
Instead of stopping a process you can try a more graceful way to close the application which acts as if someone closed the program window.
Get-Process devenv | Foreach-Object { $_.CloseMainWindow() | Out-Null }
Please note: If the solution/projects/contents have not been saved, will prompt a dialog and asks for a choice to save or cancel.