如何通过commuments从命令行运行winui3应用
我构建了一个这样的应用程序:
protected override void OnLaunched(Microsoft.UI.Xaml.LaunchActivatedEventArgs args)
{
string[] cmdargs = Environment.GetCommandLineArgs();
... Map arguments to variables ...
... Do stuff ...
}
我正在使用框架依赖性限制发布而无需单击。
我用一个包含两个CMD ARG的调试配置文件测试了该应用程序,并且可以很好地工作。但是,如果我试图使用myApp.exe arg1 arg2执行它,则该应用程序开始在CMD内部,但看起来像什么都没做。
也许我错过了什么?
I build an app like that one:
protected override void OnLaunched(Microsoft.UI.Xaml.LaunchActivatedEventArgs args)
{
string[] cmdargs = Environment.GetCommandLineArgs();
... Map arguments to variables ...
... Do stuff ...
}
I'm using the framework dependend publishing without Click-Once.
I tested that app with a debug profile that contains two cmd args and it works perfectly. But if i'm trying to execute it with MyApp.exe arg1 arg2, the app starts inside the cmd but it looks, like it doesn't do anything.
Maybe i missed anything?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论