c# - MacOS App getting different behavior once packaged - Stack Overflow

I have this C# console application that I have built a GUI around using Avalonia. When debugging using

I have this C# console application that I have built a GUI around using Avalonia. When debugging using JetBrains Rider, I get my expected behavior from the app where it calls a Python script using zsh. However, once I package the app to distribute internally to other Macs, I get an error that the command does not exist. It does not work on the development Mac as well. Am I running into Apple security issues? Is there a problem with my property list?How can I get around this?

The error I get when running is zsh:1: command not found:

This is my Property Info List

<PropertyGroup>
    <CFBundleName>Name</CFBundleName> <!-- Also defines .app file name -->
    <CFBundleDisplayName>Name</CFBundleDisplayName>
    <CFBundleIdentifier>company.name</CFBundleIdentifier>
    <CFBundleVersion>1.0.0</CFBundleVersion>
    <CFBundlePackageType>APPL</CFBundlePackageType>
    <CFBundleSignature>????</CFBundleSignature>
    <CFBundleExecutable>executable</CFBundleExecutable>
    <CFBundleIconFile>avalonia-logo.ico</CFBundleIconFile>
    <NSPrincipalClass>NSApplication</NSPrincipalClass>
    <NSHighResolutionCapable>true</NSHighResolutionCapable>
    <CFBundleShortVersionString>1.0</CFBundleShortVersionString>
</PropertyGroup>

EDIT 1: Here is the code that it is trying to run. I am excluding the arguments as it exposes IP information. But keep in mind, that when debugging the code in JetBrains Rider, the program runs as expected.

string cmd = @"/bin/zsh";
string args = @$""

Process.StartInfo = new ProcessStartInfo(cmd, args ?? "")
{
    RedirectStandardOutput = true,
    RedirectStandardError = true,
    UseShellExecute = false,
    CreateNoWindow = false
}; 

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744827481a4595882.html

相关推荐

  • c# - MacOS App getting different behavior once packaged - Stack Overflow

    I have this C# console application that I have built a GUI around using Avalonia. When debugging using

    2天前
    40

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信