This project has moved and is read-only. For the latest updates, please go here.

exception trying to create type

Sep 7, 2011 at 7:34 AM

Hi,

 

I get the following exception:

{"Could not load type 'System.Runtime.Versioning.TargetFrameworkAttribute' from assembly 'mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.":"System.Runtime.Versioning.TargetFrameworkAttribute"}

   at System.ModuleHandle.ResolveMethod(Int32 methodToken, RuntimeTypeHandle* typeInstArgs, Int32 typeInstCount, RuntimeTypeHandle* methodInstArgs, Int32 methodInstCount)
   at System.ModuleHandle.ResolveMethodHandle(Int32 methodToken, RuntimeTypeHandle[] typeInstantiationContext, RuntimeTypeHandle[] methodInstantiationContext)
   at System.Reflection.CustomAttributeData..ctor(Module scope, CustomAttributeRecord caRecord)
   at System.Reflection.CustomAttributeData.GetCustomAttributes(Module module, Int32 tkTarget)
   at System.Reflection.CustomAttributeData.GetCustomAttributes(Assembly target)
   at System.Resources.ResourceManager.GetNeutralResourcesLanguage(Assembly a, UltimateResourceFallbackLocation& fallbackLocation)
   at System.Resources.ResourceManager.InternalGetResourceSet(CultureInfo culture, Boolean createIfNotExists, Boolean tryParents)
   at System.Resources.ResourceManager.GetString(String name, CultureInfo culture)
   at MathNet.Numerics.Properties.Resources.get_InvalidDistributionParameters()
   at MathNet.Numerics.Distributions.Normal.SetParameters(Double mean, Double stddev)
   at MathNet.Numerics.Distributions.Normal..ctor(Double mean, Double stddev)
   at ModelHelper.Quants.MyNormalDistribution..ctor(Double mean, Double stddev) in C:\Projects\RiskMetrix\NinjaPortfolio\trunk\ModelHelper\Quants\MyNormalDistribution.cs:line 15

The project is targetting .net framework 3.5. Any ideas why this would create an issue? Any ideas how to solve it?

 

Thanks

Paul

Sep 7, 2011 at 12:12 PM

>The project is targetting .net framework 3.5. 

Numerics only supports .NET 4.0.