How to build .Net Core Framework-dependent application


(Philip Munts) #1

Is there a way to configure an Oxygene project to produce a cross platform (“Framework-dependent application”) that can be run with “dotnet run”?

No matter what I try, I keep getting .exe that only runs on Windows.


(marc hoffman) #2

You’ll always get an .exe, bu tyou shoud still be able to run it with `dotnet run, if its build as a .NET Core app. As an example, do “File|New Project|.NET Core Console app” in Fire, and choose “Run w/o debugging”. you should see the app launch in Terminal, and you will see the commandline used to run it…


(Philip Munts) #3

Thank you for the quick response. I wasn’t entirely clear about what I am trying to do. I am doing some research with cross-platform .Net applications for embedded systems like the BeagleBone and Raspberry Pi. I am currently evaluating Elements for that purpose.

My first experiment was to write a small application that uses an existing .Net Framework 4.7.1 library assembly and run it on a Raspberry Pi with Mono. Elements worked splendidly for that. But .Net Core will certainly soon eclipse Mono for such embedded environments (the Mono runtime is considerable larger, and is also an enormous pain to cross-compile). So after my success with Elements and Mono I am now trying to do the same thing with .Net Core.

Using the terminology from https://docs.microsoft.com/en-us/dotnet/core/deploying/ I am trying to use Elements to create a portable “framework-dependent deployment” that I can run on Windows, MacOS, and Linux (including ARM e.g. Raspberry Pi). With Microsoft tools, the framework-dependent deployment produces one or more .dll files and some .json files. I can successfully run it on Windows, MacOS, and Linux with “dotnet appname.dll”.

But I haven’t yet figured out how to configure Elements to produce a framework-dependent deployment. So far, all I seem to get is a “framework-dependent executable” that only runs on Windows.


(Philip Munts) #4

Never mind the above. By starting over fresh, targeting .Net Core 2.1, and using “dotnet appname.exe” I was able run an Elements console app on a Raspberry Pi. I have other problems that I will post separately.


(marc hoffman) #5

Glad to hear this now works for you!