Using the special version of the FSharp.Core.dll file

I already bought the source code for the fsharp compiler to try to build a version of FSharp.Core ( FSharp.Core for Windows Phone 7.1 and F # 3.0 ), and once I gave up and started trying to make a portable version using wp7. I added FX_NO_STRUCTURAL_EQUALITY define to the portable-net4+sl4+wp71+win8 target structure, which seems to cause it to not work at run time, and tried to replace the FSharp.Core.dll file in C:\Program Files (x86)\Reference Assemblies\Microsoft\FSharp\3.0\Runtime\.NETPortable my custom version. But I get these errors when compiling in Visual Studio:

 Warning 1 The primary reference "FSharp.Core" could not be resolved because it has an indirect dependency on the framework assembly "mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" which could not be resolved in the currently targeted framework. ".NETPortable,Version=v4.0,Profile=Profile47". To resolve this problem, either remove the reference "FSharp.Core" or retarget your application to a framework version which contains "mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089". C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets 1578 5 FSharp.Data.Portable Warning 3 The primary reference "FSharp.Core" could not be resolved because it has an indirect dependency on the framework assembly "System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" which could not be resolved in the currently targeted framework. ".NETPortable,Version=v4.0,Profile=Profile47". To resolve this problem, either remove the reference "FSharp.Core" or retarget your application to a framework version which contains "System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089". C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets 1578 5 FSharp.Data.Portable Warning 2 The primary reference "FSharp.Core" could not be resolved because it has an indirect dependency on the framework assembly "System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" which could not be resolved in the currently targeted framework. ".NETPortable,Version=v4.0,Profile=Profile47". To resolve this problem, either remove the reference "FSharp.Core" or retarget your application to a framework version which contains "System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089". C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets 1578 5 FSharp.Data.Portable 

The problem is that the portable FSharp.Core that comes with VS2012 depends on the portable versions 2.0.0.0 for mscorlib.dll, System.dll and System.Core.dllthose, but the one I compile from the source does not depend on portable version 4.0.0.0. Has anyone successfully built a portable version from source?

+3
source share
2 answers

I got a portable net4 + sl4 + wp71 + win8, which compiles to Profile88 from the F # source after several changes https://github.com/ovatsus/fsharp p>

Still need to be thoroughly tested at runtime though

+1
source

What you can do is add:

<OtherFlags>$(OtherFlags) --simpleresolution -r:"pathToTheCorrectmscorlib/mscorlib-runtime.dll" </OtherFlags>

to the file FSharp.Source.Targets . Make this right file after the <DefineConstants> elements. This should lead to the fact that at the compilation stage the version of mscorlib that you specify will be used, and not the default version specified by the target msbuild. (Obviously, replace pathToTheCorrectmscorlib/mscorlib-runtime.dll with the correct one :) :)

+1
source

All Articles