Visual studio 2008 在Visual Studio 2008上编译Json.NET
我试图在VisualStudio2008上编译Json.Net,目标是.NET2.0或.NET3.5。对于任何一个目标,我都会遇到类似的错误: 以.NET 2.0为目标:Visual studio 2008 在Visual Studio 2008上编译Json.NET,visual-studio-2008,json.net,Visual Studio 2008,Json.net,我试图在VisualStudio2008上编译Json.Net,目标是.NET2.0或.NET3.5。对于任何一个目标,我都会遇到类似的错误: 以.NET 2.0为目标: Error 1 The type arguments for method 'Newtonsoft.Json.Utilities.LinqBridge.Enumerable.Select<TSource,TResult> (System.Collections.Generic.IEnumerable&l
Error 1
The type arguments for method 'Newtonsoft.Json.Utilities.LinqBridge.Enumerable.Select<TSource,TResult>
(System.Collections.Generic.IEnumerable<TSource>,
Newtonsoft.Json.Serialization.Func<TSource,TResult>)'
cannot be inferred from the usage. Try specifying the type arguments explicitly.
C:\Json70r1\Source\Src\Newtonsoft.Json\Converters\XmlNodeConverter.cs 260 35 Newtonsoft.Json.Net20
错误1
方法“Newtonsoft.Json.Utilities.LinqBridge.Enumerable.Select”的类型参数
(System.Collections.Generic.IEnumerable,
Newtonsoft.Json.Serialization.Func)'
无法从用法推断。尝试显式指定类型参数。
C:\Json70r1\Source\Src\Newtonsoft.Json\Converters\XmlNodeConverter.cs 260 35 Newtonsoft.Json.Net20
在.NET 3.5上:
Error 1 The type arguments for method
'System.Linq.Enumerable.Select<TSource,TResult>
(System.Collections.Generic.IEnumerable<TSource>,
System.Func<TSource,TResult>)' cannot be
inferred from the usage. Try specifying
the type arguments explicitly.
C:\Json70r1\Source\Src\Newtonsoft.Json\Converters\XmlNodeConverter.cs
260 35 Newtonsoft.Json.Net35
错误1方法的类型参数
'System.Linq.Enumerable.Select
(System.Collections.Generic.IEnumerable,
System.Func“”不能为空
从用法推断。尝试指定
类型参数被显式删除。
C:\Json70r1\Source\Src\Newtonsoft.Json\Converters\XmlNodeConverter.cs
260 35 Newtonsoft.Json.Net35
注意:我正在使用名为Newtonsoft.Json.Net20.sln和Newtonsoft.Json.Net35.sln的现有项目文件
我想说的是,我读到了一些关于这个问题与VS2008有关的文章(然而,Json.NET与此无关)
是否可以在VS2008中编译Json.NET,或者我是否需要更新的编译器来生成针对2.0的.dll
包含的用于2.0的.dll对我们来说很好,但我需要修改一些功能,所以我需要源代码。您有JSON.net的Witch版本吗?您是否直接下载了nuget?如果是,什么时候?如果您下载了zip,它应该像JsonXYrZ.zip X主版本Y次版本和Z a修订版,因此版本应该是X.Y.Z,在您的内部应该有一个带有zip名称的文件夹,但没有.zip版本Json70r1。我直接从json.net下载了.zip。更新了上述问题,以反映.NET3.5和.NET2.0在错误方面的细微差别(Linq当然存在于.NET3.5中)