'DEVENV' is not recognized as an internal or external command,

使用命令行 DEVENV 编译c# 工程,

C:MyProject>DEVENV "MyProject.sln" /build Release /useenv
'DEVENV' is not recognized as an internal or external command,
operable program or batch file.

在命令行使用 DEVENV,需要首先将 DEVENV 所在的路径加入环境变量中。

@REM Win7 Operating System

C:MyProject>set PATH=C:Program Files (x86)Microsoft Visual Studio 10.0Common7IDE

C:MyProject>DEVENV "MyProject.sln" /build Release /useenv


Microsoft (R) Visual Studio Version 10.0.30319.1.
Copyright (C) Microsoft Corp. All rights reserved.

...............

原文地址:https://www.cnblogs.com/cindy-hu-23/p/3560963.html