Run devenv from commandline

浪子不回头ぞ 提交于 2019-12-11 11:29:27

问题


Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

    Dim lRet&
    lRet = Shell("cmd /k devenv m:\myproject.sln /build Release", 1)

End Sub

This fails with the command line saying "devenv" is misspelt or not found.

Does anybody know why?


回答1:


I ran all "bat" files that I could find in the VC programs directory. First I started them not as as admin, and it did not work. When I started the bats as an admin, the command would finally work. Also I had to move to the VS path using CD.



来源:https://stackoverflow.com/questions/15704230/run-devenv-from-commandline

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!