当两个控制台应用程序在同一解决方案中时,如何从VB.NET中的另一个控制台应用程序调用控制台应用 [英] How can I call console application from another console application in VB.NET when both console applications are in same solution

查看:95
本文介绍了当两个控制台应用程序在同一解决方案中时,如何从VB.NET中的另一个控制台应用程序调用控制台应用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,



我需要从另一个控制台应用程序调用/执行vb.net控制台应用程序,两个控制台应用程序都在同一个解决方案中



我尝试了什么:



我没有想法,如何调用控制台来自另一个控制台应用程序的应用程序

Hello,

I have a requirement to call/execute a vb.net console application from another console application, both console applications are in same solution

What I have tried:

I have no Idea, how to call console application from another console application

推荐答案

控制台应用程序只是一个可执行文件(.exe),您可以使用进程启动 class。

流程类 [ ^ ]

可执行文件必须位于调用可执行文件实际可以看到的位置;如果您尝试运行的可执行文件与调用可执行文件不在同一目录中,并且它不在 PATH 环境变量中指定的其中一个路径中,则您必须提供您尝试启动的可执行文件的相对路径或绝对路径。
A console application is just an executable (.exe) which you can launch using the Process class.
Process Class[^]
The executable has to be at a location which the calling executable can actually see; if the executable you are trying to run is not in the same directory as the calling executable, and if it is not in one of the paths specified in the PATH environment variable, then ou have to provide a relative or absolute path to the executable you are trying to launch.


这篇关于当两个控制台应用程序在同一解决方案中时,如何从VB.NET中的另一个控制台应用程序调用控制台应用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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