System.Threading.Tasks MathNet.Numerics和Parse中的冲突

时间:2021-07-20 16:51:19

I am developing a Unity project where i need to use both MathNet.Numerics and Parse. The problem is that they both need to access System.Threading, but since Unity only allows 3.5, they both ship their own. Parse have, however, embedded the part they need into the Parse-dll, but the missing some parts (System.Collections.Concurrent) that MathNet.Numerics needs. This means it cannot be used by MathNet. I can not add both to the Unity project since the System.Threading needed by MathNet.Numerics conflicts with the namespace embedded into the Parse.Unity.dll.

我正在开发一个Unity项目,我需要使用MathNet.Numerics和Parse。问题是他们都需要访问System.Threading,但由于Unity只允许3.5,他们都自己发货。然而,Parse将他们需要的部分嵌入到Parse-dll中,但缺少MathNet.Numerics需要的一些部分(System.Collections.Concurrent)。这意味着它不能被MathNet使用。我无法将这两者都添加到Unity项目,因为MathNet.Numerics所需的System.Threading与嵌入到Parse.Unity.dll中的命名空间冲突。

I have no idea how to solve this. Anyone tried something similair?

我不知道如何解决这个问题。有人试过similair吗?

1 个解决方案

#1


MathNet requires .NET 4.0 or newer and Parse only supports .NET 4.5 or newer, Unity only supports .NET 3.5.

MathNet需要.NET 4.0或更高版本,而Parse仅支持.NET 4.5或更高版本,Unity仅支持.NET 3.5。

For the math portion you will need to find a library that targets 3.5 if you want to use it in a Unity project, the only way to make MathNet work for 3.5 is if you re-wrote the source code to not use any 4.0 or newer features (not a easy task).

对于数学部分,如果要在Unity项目中使用它,则需要找到一个目标为3.5的库,使MathNet适用于3.5的唯一方法是,如果您重新编写源代码而不使用任何4.0或更新版本功能(不是一件容易的事)。

For Parse, you will need to find a different library that provides the same features. There source for Parse is not available so you would not be able to re-write it.

对于Parse,您需要找到提供相同功能的不同库。 Parse的源代码不可用,因此您无法重新编写它。

#1


MathNet requires .NET 4.0 or newer and Parse only supports .NET 4.5 or newer, Unity only supports .NET 3.5.

MathNet需要.NET 4.0或更高版本,而Parse仅支持.NET 4.5或更高版本,Unity仅支持.NET 3.5。

For the math portion you will need to find a library that targets 3.5 if you want to use it in a Unity project, the only way to make MathNet work for 3.5 is if you re-wrote the source code to not use any 4.0 or newer features (not a easy task).

对于数学部分,如果要在Unity项目中使用它,则需要找到一个目标为3.5的库,使MathNet适用于3.5的唯一方法是,如果您重新编写源代码而不使用任何4.0或更新版本功能(不是一件容易的事)。

For Parse, you will need to find a different library that provides the same features. There source for Parse is not available so you would not be able to re-write it.

对于Parse,您需要找到提供相同功能的不同库。 Parse的源代码不可用,因此您无法重新编写它。