0

so recently I have created a program in dart and compiled that program to exe file on my windows10 machine. Using dart compile exe main.dart and then main.exe is generated, but the problem is when I try to run this script on different version of windows like windows 11, windows server 2016 or windows server 2012. It didn't seem to run the program.

program error on Windows server 2012

Note that actually there is no folder missing, still it is giving FileSystemException but only for windows server 2012, windows 11, and windows server 2016 not for windows 10.

I am only saying is that why is this error not occurred in windows 10 my guess is because I created the binary in windows 10.

I have searched about this but couldn't find a way is there is any way I can compile this binary, so it works in all version of windows? Or like dart compile exe --windows11 for windows 11.

Does dart only compile for Windows version specific binary, not for general win32 APIs?

Visrut
  • 360
  • 4
  • 14
  • 1
    I suspect you're running into a permissions issue, rather than a compilation issue - Are you sure the other accounts have administrative access (to access C:\Users\Administrator)? What happens if you [run as administrator](https://stackoverflow.com/questions/8249705/how-to-run-an-application-as-run-as-administrator-from-the-command-prompt) on the other systems? – Michael Horn Nov 10 '22 at 18:22
  • Also, what happens if you run the script without AOT compilation on the other systems? – Michael Horn Nov 10 '22 at 18:25
  • @MichaelHorn yes it could be thanks for your comment, Yes I have run AOT compilation on Linux it runs perfectly. – Visrut Nov 10 '22 at 18:45
  • @MichaelHorn It is not issue of permissions since I tried running using Administrator access as well but got the same error. – Visrut Nov 11 '22 at 15:50

0 Answers0