对于Fedora,我们要为Mono 4构建Newtonsoft.Json。运行测试也可能会很好。但是在构建Newtonsoft.Json.Tests.Net40.csproj时,会出现如下错误:
Utilities/DateTimeUtilsTests.cs(56,24): error CS0122: `Newtonsoft.Json.Utilities.StringReference' is inaccessible due to its protection level
因此检查源代码:https : //github.com/JamesNK/Newtonsoft.Json/blob/master/Src/Newtonsoft.Json.Tests/Utilities/DateTimeUtilsTests.cs#L56 https://github.com/JamesNK/Newtonsoft .Json / blob / master / Src / Newtonsoft.Json / Utilities / StringReference.cs#L30
StringReference定义为internal struct
。
根据https://msdn.microsoft.com/library/7c5ka91b.aspx,“内部类型或成员只能在同一程序集中的文件中访问”
那么,这将如何工作?我想念什么?这在MS.NET上有效,但在Mono上无效吗?
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句