Reputation: 89
Im trying to build this simple windows form app using devenv
but it gives "Use:
devenv [solutionfile | projectfile | anyfile.ext] [switches]
The first argument for devenv is usually a solution file or project file. You can also use any other file as the first argument if you want to have the file open automatically in an editor. When you enter a project file, the IDE looks for an .sln file with the same base name as the project file in the parent directory for the project file. If no such .sln file exists, then the IDE looks for a single .sln file that references the project. If no such single .sln file exists, then the IDE creates an unsaved solution with a default .sln file name that has the same base name as the project file. ......"
anyone got an idea what went wrong in this?
path I gave for the devenv --> var devEnvPath = @"C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\devenv.exe";
string autoIVUProjFile = @"C:\Users\yash\Documents\Visual Studio 2017\Projects\WindowsFormsApp1\WindowsFormsApp1\WindowsFormsApp1.csproj";
var command = $"\"{autoIVUProjFile}\" /build \"Debug | x64\"";
var cmdsi = new ProcessStartInfo
{
WindowStyle = ProcessWindowStyle.Normal,
FileName = devEnvPath,
RedirectStandardInput = true,
UseShellExecute = false,
Arguments = command
};
Process cmd = Process.Start(cmdsi);
cmd.WaitForExit();
Please help me out with this issue, Thanks
Upvotes: 2
Views: 568
Reputation: 1685
Try this command:
var command = $"\"{autoIVUProjFile}\" /build Debug";
Upvotes: 2