fsc and fsi target net5.0 and have output type Exe, so when building with/for a 6.0 SDK, they download Microsoft.NETCore.App.Host.linux-x64/5.0.9 as a prebuilt dependency in order to generate the framework-dependent executable (FDE):
|
<PropertyGroup> |
|
<OutputType>Exe</OutputType> |
|
<TargetFrameworks Condition="'$(ProtoTargetFramework)' != ''">$(ProtoTargetFramework)</TargetFrameworks> |
|
<TargetFrameworks Condition="'$(ProtoTargetFramework)' == ''">net472;net5.0</TargetFrameworks> |
|
<TargetFrameworks Condition="'$(OS)' == 'Unix'">net5.0</TargetFrameworks> |
|
<NoWarn>$(NoWarn);44</NoWarn> <!-- Obsolete --> |
|
<NoWarn>$(NoWarn);75</NoWarn> <!-- InternalCommandLineOption --> |
|
<AllowCrossTargeting>true</AllowCrossTargeting> |
|
<NGenBinary>true</NGenBinary> |
|
<UseAppHost>true</UseAppHost> |
|
</PropertyGroup> |
In a Microsoft-built SDK, the FDEs don't seem to be shipped, just the framework dependent assemblies:
$ find . -iname fsi*
./sdk/6.0.100-rc.2.21505.57/FSharp/fsi.deps.json
./sdk/6.0.100-rc.2.21505.57/FSharp/fsi.dll
./sdk/6.0.100-rc.2.21505.57/FSharp/fsi.runtimeconfig.json
$ find . -iname fsc*
./sdk/6.0.100-rc.2.21505.57/FSharp/fsc.runtimeconfig.json
./sdk/6.0.100-rc.2.21505.57/FSharp/fsc.dll
./sdk/6.0.100-rc.2.21505.57/FSharp/fsc.deps.json
- Is it safe to add to
<UseAppHost>false</UseAppHost> to these projects during source-builds, to remove the FDE and the prebuilt?
- Can this change be made even when source-build isn't involved? Or are these FDEs used in some other scenario that's specific to the Microsoft-built output?
@brettfo
In the past, source-build would have upgraded F# to net6.0 to get around this prebuilt, but this is no longer the preferred way to go about this. (We'd rather keep TFM parity with the Microsoft build.)
fscandfsitargetnet5.0and have output type Exe, so when building with/for a 6.0 SDK, they downloadMicrosoft.NETCore.App.Host.linux-x64/5.0.9as a prebuilt dependency in order to generate the framework-dependent executable (FDE):fsharp/src/fsharp/fsc/fsc.fsproj
Lines 5 to 15 in bb7c799
In a Microsoft-built SDK, the FDEs don't seem to be shipped, just the framework dependent assemblies:
<UseAppHost>false</UseAppHost>to these projects during source-builds, to remove the FDE and the prebuilt?@brettfo
In the past, source-build would have upgraded F# to
net6.0to get around this prebuilt, but this is no longer the preferred way to go about this. (We'd rather keep TFM parity with the Microsoft build.)csihere: Remove apphost fromcsifor source-build to avoid prebuilt dependency on a 3.1 apphost pack roslyn#57233. (cscalready has no FDE.)