Where is dotnet runtime 7.0 for freebsd ?

I will admit that the lack of a runtime executable kit for tcl/tk on FreeBSD really soured me.
I wanted a freestanding application.
I always seem to find an excuse not to learn something I really want to learn.
 
I have no experience on FreeBSD but cant you build it from source ?
 
Read https://wiki.freebsd.org/.NET (and btw, you will find dotnet 7 there).

Summary:
  • FreeBSD platform support is not fully merged upstream (still Microsoft has FreeBSD builds that are kept private by them)
  • As .NET is mostly written in C# itself, you need some "bootstrap binaries" to build it
  • Projects linked in the wiki successfully build it using a Linux version (executed with Linuxulator) for bootstrap, doing a cross-build
So, this looks like "official" FreeBSD dotnet isn't too far, at least from the purely technical perspective.
 
Everything works fine under Ubuntu & under WSL(Windows).
Both are really good environments for dotnet/mono/C#/F# development

For FreeBSD i could only get the "most basic stuff" working correctly.
E.g. creation of an F# console project & running it with "dotnet new console -lang F#" & "dotnet run".
The alternative for "apt install dot-net-sdk-6.0" for freebsd is at least "painfull".
 
No. I find linux jails not that interesting. Than i can as good use linux-or-wsl.
But i could try to make a cross-build from wsl to freebsd.
 
I had to spin up a linux instance because I was just last week learning some C# and just assumed .NET Core was a port because it was open source 🤦‍♂️
 
I have collected all the various VS compiler versions for Windows... have yet to use any of them.
I just don't like the feel of the environment.
My son loves it... does all his ACH software development in .Net.
I don't have a dog running in the FBSD events... just like the OS for what it is, and what it does.
 
I'm trying to install the .NET SDK on FreeBSD using the provided github repository from the wiki, hosted by sec - https://github.com/sec/dotnet-core-freebsd-source-build

With the greatest of respect, I can't really understand the instructions under the 'Usage' area. There are 'releases' which are tar.gz files, but also cloning that repository provides the scripts that the README refers to, which I can run, problematically, but now I'm doubting myself that i only need to run the scripts if I want to *build* the .NET package.

I just want it to install on my environment and work.

Alain De Vos do you know anything about this process? Is it right that I execute the scripts to install the dotnet sdk?
 
#8 Looks like your artifacts are a tgz, which means this repo generates/compiles a package, which you then install.
 
Got this when running the scripts

./build_runtime.sh

Code:
Build FAILED.

/tmp/dotnet/dotnet-core-freebsd-source-build/runtime/src/coreclr/tools/aot/ILCompiler/ILCompiler.csproj : error NU1101: Unable to find package runtime.freebsd-x64.Microsoft.NETCore.Runtime.ObjWriter. No packages exist with this id in source(s): darc-pub-dotnet-emsdk-2406616, dotnet-eng, dotnet-libraries, dotnet-libraries-transport, dotnet-public, dotnet-tools, dotnet8, dotnet8-transport, ghsec [/tmp/dotnet/dotnet-core-freebsd-source-build/runtime/Build.proj]
    0 Warning(s)
    1 Error(s)
 
OK I got it working

The scripts are for building the packages and therefore not required for someone who just wants to use dotnet.

I downloaded dotnet-sdk-7.0.403-freebsd-x64.tar.gz from the Releases page on the Github page - https://github.com/sec/dotnet-core-freebsd-source-build/releases

I then executed these commands as my user (not root)

mv ~/Downloads/dotnet-sdk-7.0.403-freebsd-x64.tar.gz ~/
DOTNET_FILE=dotnet-sdk-7.0.403-freebsd-x64.tar.gz
export DOTNET_ROOT=$(pwd)/.dotnet
mkdir -p "$DOTNET_ROOT" && tar zxf "$DOTNET_FILE" -C "$DOTNET_ROOT"
export PATH=$PATH:$DOTNET_ROOT:$DOTNET_ROOT/tools

This then allows the command dotnet to work. I haven't tested further. Edit: my test MVC project builds, so I must have done something right...

I have no idea how to make the above variables persist. I was expecting a .bashrc or something, but my environment doesn't have one. If anyone can assist or direct with that, would be appreciated.
 
Back
Top