The F# 4.1 compiler on my build machine has slightly different --targetProfile
options than the F# 4.1 compiler on my dev machine.
On my dev machine, when I type fsc.exe -?
the output includes the following:
Microsoft (R) F# Compiler version 4.1
:
--targetprofile:<string>
Specify target framework profile of this assembly.
Valid values are mscorlib, netcore or netstandard.
:
On my build server, the same command outputs the following:
Microsoft (R) F# Compiler version 4.1
:
--targetprofile:<string>
Specify target framework profile of this assembly.
Valid values are mscorlib or netcore.
:
Notice that the dev machine includes netstandard
as a valid value, but the build server does not.
Consequently, when I try to build my project on the build server, I get a compile time error of "error FS1052: Invalid value 'netstandard' for '--targetprofile'
"
What is going on? Is there a way to display the real version number of an F# 4.1 compiler? fsc.exe --version
does not work.
I don't think this is to do with the F# compiler version but rather the .NET SDK(s) installed. Check the target framework TFMs.
I have mscorlib, netcore or netstandard
and I will take a stab at where they come from:
mscorlib
from full framework...comes with Windowsnetcore
installed with VS 2017 when selecting ".NET desktop development"netstandard
installed with NET Core SDKIf this is the case I would imagine installing .NET Core SDK on the build server would sort it out since you seem to be targeting netstandard.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With