Alea GPU tutorial does not compile in VS 2015 Update 2 with FSharp.Core 4.4.0.0

I get an error while compiling the Alea GPU tutorial: https://github.com/quantalea/AleaGPUTutorial in updating the Visual Studio 2015 2 community from FSharp.Core version 4.4.0.0 to .Net 4.5.

Fody: an unhandled exception occurred: Exception: Failed to load file or assembly "FSharp.Core, Version = 4.3.1.0, Culture = neutral, PublicKeyToken = b03f5f7f11d50a3a" or one of its dependencies. The system cannot find the specified file.

Stacktrace:

at Alea.CUDA.AOTCompileLogger..ctor(List`1 logs, Int32 warningCount, Int32 errorCount) at Alea.CUDA.AOTCompileLogger..ctor() at Alea.CUDA.AOTCompiler..ctor() at Alea.CUDA.Fody.ModuleWeaver.Execute() at lambda_method(Closure , Object ) at InnerWeaver.ExecuteWeavers() in c:\Code\Fody\FodyIsolated\InnerWeaver.cs:line 164 at InnerWeaver.Execute() in c:\Code\Fody\FodyIsolated\InnerWeaver.cs:line 82 Source: Alea.CUDA TargetSite: Void .ctor(System.Collections.Generic.List`1[Alea.CUDA.AOTCompileLogEntry], Int32, Int32) 

This happens both in the Tutorial.Cs project and in Tutorial.Fs, regardless of how I configured the bindingRedirect parameter in all possible .config files. It seems that these redirects are ignored by the Fody link loading mechanism.

However, even installing a training solution for FSharp.Core 4.3.1.0 does not allow me to compile it. The error is the same.

Do you have any ideas on how to fix it?

+7
c # f # aleagpu
source share
3 answers

I built it successfully several times, but they were completely random, and I could not understand what led to the disappearance of the error.

Perhaps this was some combination of restarting Visual Studio as an administrator many times.

Also I tried FSharp.Core.dll from various sources with random results:

Official

The AleaGPUTutorial says:

Before creating in Visual Studio, it is recommended to restore packages before opening the solution. This is due to the well-known issue of using Fody with F # projects. You can find more detailed information about this problem in the installation guide (especially in the Notes section) .

From the manual:

Alea GPU is implemented using F #, so it uses the F # runtime. If you are using Alea GPU with C # or VB, you also need version 3.1 or higher of the FSharp.Core.dll assembly. If you are using Visual Studio, you can find this assembly by going to Add Reference -> Assemblies -> Extensions -> FSharp.Core 4.3.1.0. . Alternatively, you can add the FSharp.Core NuGet package for your project.

I did exactly what was written, but got only an occasional build success.

last hope

How to use FSharp.Core 4.3.0 when all you have is 4.3.1

I lived with the naive assumption that when installing F # 3.1, it automatically adds redirects from FSharp.Core 4.3.0.0 to 4.3.1.0 or, possibly, it will also be available for FSharp.Core 4.3.0.0. Apparently I'm too used to the semantic version, which is definitely not the version control scheme used for F #

+8
source share

Ok, that worked for me. All you have to do is add Fsharp.core 4.3.1.0 to gac.

An explanation of how to do this can be found here:

http://forum.codio.com/t/solved-could-not-load-file-or-assembly-fsharp-core-version-4-3-0-0-error/1774

0
source share

I also had a similar problem when I first tried downloading one of the Alea 3.0.3 samples. It took me a few minutes to figure out, but it worked for me and it was pretty easy to run the sample files.

1) Using the package management console, Visual Studio is launched. / paket _setup.bat with sample.zip file 2) Added file FSharp.Core.dll from the folder with the sample project. /packages/FSharp.Core/lib/net40/FSharp.Core.dll

After that, the project started without any problems.

I did not need to install anything in the GAC

0
source share

All Articles