Link to home
Create AccountLog in
Avatar of Jonathan D.
Jonathan D.Flag for Israel

asked on

Published .NET 6 Program for OSX x64 won't Run on Big Sur

Hey everyone, I have compiled (using Publish method) a framework-dependant program for macOS (osx-x64) as "Single File" which produced three files


.env (file holds settings for program)
AppName
AppName.pdb

Open in new window


These are the only files, my client has installed .NET 6 runtime on his MacBook and can't run the program.


The command he runs is "dotnet AppName" on the target folder. But instead, the tool produces an error:


Could not execute because the specified command or file was not found. Possible reasons for this include: 

* You misspelled a built-in dotnet command. 

* You intended to execute a .NET program, but dotnet-/Users/stephan/Downloads/osx-x64/TicketBot does not exist. 

* You intended to run a global tool, but a dotnet-prefixed executable with this name could not be found on the PATH. 

ASKER CERTIFIED SOLUTION
Avatar of Peter Hutchison
Peter Hutchison
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Avatar of Jonathan D.

ASKER

Haha yeah Peter, I've come to that conclusion after reading my question. If that is the problem I'll mark your response as the solution. Thanks!

I have to wait for my client to get back to me and see if this resolved his issue, so I'll update you here asap.

Edit: Tell me something Peter, the fact that the compiled file has no extension such as .dll is something that should worry me? I mean, would it still execute with the dotnet command on macOS without an extension? Have I compiled it wrong using publish method or is it normal to be extensionless? Thanks.
Sorry to jump in but it is the default behaviour, if you target MacOS, you will get an extension-less build file.
@Chinmay Thank you for confirming this, I will be back with an update next week.