从命令行运行devenv [英] Run devenv from commandline

查看:605
本文介绍了从命令行运行devenv的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

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

End Sub
pre>

这会失败,命令行显示devenv是拼写错误或找不到。



为什么?

解决方案

我跑了所有的bat文件,我可以在VC程序目录中找到。
首先我开始他们不像管理员,它没有工作。
当我作为一个管理员启动蝙蝠时,命令终将工作。
此外,我不得不使用CD移动到VS路径。


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?

解决方案

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.

这篇关于从命令行运行devenv的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆