* Fix crossgen for FreeBSD by adding FreeBSD RID.
Fix implemented as described by @Thefrank in this thread:
https://github.com/dotnet/runtime/issues/14537#issuecomment-
922546527
* Add FreeBSD platform-support to crossgen2.
os = TargetOS.Linux;
else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
os = TargetOS.OSX;
+ else if (RuntimeInformation.IsOSPlatform(OSPlatform.FreeBSD))
+ os = TargetOS.FreeBSD;
else
throw new NotImplementedException();
_targetOS = TargetOS.Linux;
else if (_commandLineOptions.TargetOS.Equals("osx", StringComparison.OrdinalIgnoreCase))
_targetOS = TargetOS.OSX;
+ else if (_commandLineOptions.TargetOS.Equals("freebsd", StringComparison.OrdinalIgnoreCase))
+ _targetOS = TargetOS.FreeBSD;
else
throw new CommandLineException(SR.TargetOSUnsupported);
}
<ArchiveName>dotnet-crossgen2</ArchiveName>
<SharedFrameworkHostFileNameOverride>crossgen2</SharedFrameworkHostFileNameOverride>
<!-- Build this pack for any RID if building from source. Otherwise, only build select RIDs. -->
- <RuntimeIdentifiers Condition="'$(DotNetBuildFromSource)' != 'true'">linux-x64;linux-musl-x64;linux-arm;linux-musl-arm;linux-arm64;linux-musl-arm64;osx-x64;osx-arm64;win-x64;win-x86;win-arm64;win-arm</RuntimeIdentifiers>
+ <RuntimeIdentifiers Condition="'$(DotNetBuildFromSource)' != 'true'">linux-x64;linux-musl-x64;linux-arm;linux-musl-arm;linux-arm64;linux-musl-arm64;freebsd-x64;osx-x64;osx-arm64;win-x64;win-x86;win-arm64;win-arm</RuntimeIdentifiers>
<GenerateInstallers>false</GenerateInstallers>
<GetSharedFrameworkFilesForReadyToRunDependsOn>
AddRuntimeFilesToPackage;