-
-
Notifications
You must be signed in to change notification settings - Fork 335
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Runtime exception on .NET 4.6.2 #58
Comments
If you are just using GeneticSharp from Nuget, you can use it on VS 2013, but if you are building the GeneticSharp's source code from scratch, then you need to follow our guide: Building the whole solution. What is your case? |
I'm installing via Nuget (i.e. not building from the source code). |
The Nuget package (https://www.nuget.org/packages/GeneticSharp/) seems to have the right dependencies. Could you please send, a minimum project sample with this problem happening? I don't have VS 2013 here, but maybe I can spot what is the problem. |
I've created a console project targeting 4.6.2 and I could not reproduce the error. Can you try the project attached and compare it with your project? |
Thank you very much for the exemplar project. I actually did still get the above-referenced error, but at compile time. Interestingly, if I commented out the TaskExecutor override in the GeneticAlgorithm object initializer block (i.e. TaskExecutor = new ParallelTaskExecutor()), this resolved the compilation error. but the same runtime exception was still thrown. Specifically, this is the compilation error:
|
Quick update on this: the infrastructure framework DLLs (i.e. GeneticSharp.Infrastructure.Framework.dll) for both the netstandard2.0 and net462 targets have the same hash. Perhaps Nuget has the .NET standard build for both targets. This isn't the case for the domain DLL (GeneticSharp.Domain.dll), which would explain why the above-referenced error only occurs when interface with properties or methods from the infrastructure project. It looks like the infrastructure DLL that's bundled with the domain project build will always be .NET standard regardless of target framework, so if the GeneticSharp Nuget package is using the infrastructure DLL from the domain build, then maybe that's what's causing the issue. |
Yes, you'are right. I opened the assemblies from GeneticSharp.Domain.dllGeneticSharp.Infrastructure.Framework.dllGeneticSharp.Infrastructure.Framework.dll from net462 folder is using .NETStandard instead of .NET Framework. I'll investigate what is wrong with project files or with the nuget generation. |
Fixed: Runtime exception on .NET 4.6.2 #58
I'm running Visual Studio 2013 targeting .NET 4.6.2 with GeneticSharp 2.4.0, and get the following runtime exception when attempting to instantiate a GeneticAlgorithm instance (specifically, when the task executor is set):
Could not load file or assembly 'netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies.
Is .NET Framework 4.6.2 still supported, or is .NET standard 2.0.0+ now required?
The text was updated successfully, but these errors were encountered: