SharpDevelop icon indicating copy to clipboard operation
SharpDevelop copied to clipboard

Can't use Newtonsoft.Json

Open Bizarrus opened this issue 6 years ago • 2 comments

How i can use Newtonsoft.Json in SharpDevelop on my WPF-Application?

Informations

SharpDevelop Version : 5.1.0.5216-0e58df71
.NET Version         : 4.7.03056
OS Version           : Microsoft Windows NT 6.3.9600.0
Current culture      : German (Germany) (de-DE)
Running under WOW6432, processor architecture: x86-64
Working Set Memory   : 329788kb
GC Heap Memory       : 97095kb

When i try to add the package over Project > Manage Packages... following error appears:

'Newtonsoft.Json' already has a dependency defined for 'Microsoft.CSharp`.

By using using Newtonsoft.Json;, SharpDevelop says:

Using directive is unnecessary. The type or namespace name 'Newtonsoft' could not be found (are you missing a using directive or an assembly reference?)

Update

When i try to install the "depencie"/"higher package", it will shown following errors:

Json.NET
    > Microsoft.CSharp
        > NETStandard.Library
            > Microsoft.NETCore.Platforms
                > The 'Microsoft.NETCore.Platforms 2.1.0' package requires NuGet client version '2.12' or above, but the current NuGet Version is '2.8.60723.765'.

Bizarrus avatar Jun 13 '18 11:06 Bizarrus

Hace you try javascriptserializer

https://msdn.microsoft.com/en-us/library/system.web.script.serialization.javascriptserializer(v=vs.110).aspx

Ronny Fretel Farfán

El mié., 13 de jun. de 2018 06:11, Adrian Preuß [email protected] escribió:

How i can use Newtonsoft.Json in SharpDevelop on my WPF-Application?

Informations

SharpDevelop Version : 5.1.0.5216-0e58df71 .NET Version : 4.7.03056 OS Version : Microsoft Windows NT 6.3.9600.0 Current culture : German (Germany) (de-DE) Running under WOW6432, processor architecture: x86-64 Working Set Memory : 329788kb GC Heap Memory : 97095kb

When i try to add the package over Project > Manage Packages... following error appears:

'Newtonsoft.Json' already has a dependency defined for 'Microsoft.CSharp`.

By using using Newtonsoft.Json;, SharpDevelop says:

Using directive is unnecessary. The type or namespace name 'Newtonsoft' could not be found (are you missing a using directive or an assembly reference?)

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/icsharpcode/SharpDevelop/issues/817, or mute the thread https://github.com/notifications/unsubscribe-auth/AEI9kEqTqoa3M2e0dsUjaeCYnG06wZbpks5t8PN9gaJpZM4Ul_yF .

fretelweb avatar Jun 13 '18 13:06 fretelweb

Your dll is for .net core, not .net framework. why did you use SharpDevelop for .net core?

linquize avatar Jun 14 '18 01:06 linquize