Where is System.Json in MonoDevelop on OSX? - json

I've got MonoDevelop 3.1.1 running on OSX. I want to use System.Json but I can't find it anywhere. When Editing References I can't see anything that looks like System.Json. How do I make it available in my project?

According to MSDN, it should be in System.Runtime.Serialization assembly. And you should be targetting the 4.5 profile.
BTW upgrading to Xamarin Studio (MonoDevelop 4.0) is highly recommended.

Related

Autofac.Mef and WinRT

I'm having troubles while trying to add the Metadata of Autofac. I have to install the package "Autofac Extras: Metadata Attribute Support" which need Autofac.Mef. When installing this package, I get a message saying that I try to install Autofac.Mef 4.0.0 in a project targeting «portable-net45+win+wpa81» and that the package doesn't contain any file supporting this. (Same message with Autofac.Mef 3.0.3).
I could probably find a way to make my project work without Autofac's Metadata but I don't understand why this package isn't compatible with Windows Phone 8.1. Is there a solution to this issue?
Thanks in advance
Thomas
If you download the Autofac.Mef package manually and then open it up in NuGet Package Explorer you'll see that the Autofac.Mef package only targets .NET 4.5 apps - you can't use it in Windows Phone.
The reason for this is that the original framework MEF is only compatible with the full .NET framework. There's a "lighter weight" MEF 2 framework that is compatible with Windows Phone 8.1 but that's not the one Autofac.Mef works with.
There's no way to fix it. There's also no current plan to switch Autofac.Mef to using the Microsoft.Composition package.

Trouble installing the haxe language binding in monodevelop

Good morning.
I am trying to setup haxe development tools in monodevelop as shown in this tutorial.
My problem is i can't find the haxe language binding the in add-in manager.
Does anyone know the solution to this issue?
Best regards
Guilherme Silva
Even the haxe binding dated 14/3/2013 only works for Monodevelop 3.0. I was able to download Monodevelop 3.0.6 from sourceforge. If it still doesn't work through the add-in manager, you can manually download it (link below) and install by file.
resources:
http://addins.monodevelop.com/Project/Index/41
http://sourceforge.net/projects/monodevelop.mirror/files/?source=navbar
I ran into this problem too. I believe it's because the Haxe language binding doesn't currently support (MonoDevelop/Xamarin Studio) version 4. And they don't currently seem to offer trunk builds, so we might be out of luck!
http://monodevelop.com/download/trunk_builds

Nuget, Castle Windsor Client Profile vs Full Profile

I'm trying to use Castle Windsor with Log4Net facility. I've installed the packages through Nuget.
The requirement for this to work is to use Full profile Castle.LoggingFacility. Nuget referenced the Client Profile version.
How can I force Nuget to install the Full profile version?
I might be wrong but it sounds like the issue with the target framework setting on your project:
for Castle.Windsor to work it has to be set to .NET Framework 4 rather than to .NET Framework 4 Client Profile.
You can configure it by opening project properties, tab Application (in Visual studio) or just editing the project file.
If that's about the version of the package after all, then usually using NuGet you can append a flag install-package Castle.Windsor -version 2.5.3 to specify which one to install, but I couldn't find any options there when it comes to Castle.LoggingFacility.
I had the same problem earlier and I think you should check your packages.config file. There could be targetFramework="net40-client",
which points NUGet to the packages\Castle.LoggingFacility.3.2.0\lib\net40-client directory.
Simply change it to net40 and all's done.

Windows Phone 8 JSON

I am starting the development on windows phone 8, the famous JSON.NET does not support windows phone 8 yet, is there any other library which can be used for this purpose?
The JSON.NET codeplex site says that WP8 is supported.
Update: The JSON.NET NuGet package should just work with a Windows Phone 8.0 project. Adding it in VS2012 NuGet manager pulls in the WP7 version of JSON.NET. (packages\Newtonsoft.Json.4.5.10\lib\sl3-wp\Newtonsoft.Json.dll)
JSON.NET is now also available as a Portable Class Library which you can consume from WP8 (available in NuGet or in source form).
Had the exact same problem - turns out I didn't have the newest version of NuGet.
To upgrade, click tools -> extensions and updates and then click the Updates-tab. Update everything, restart the program and try again. :-)
I was having this issue. I was able to compile the source for Windows Phone 8 instead of Windows 7.1 and it worked. NuGet would not work for me.
Here is how I did it:
Open up solution JsonXXrXX.zip\Source\Src\Newtonsoft.JSON.WindowsPhone.sln
Go to properties for Newtonsoft.Json.WindowsPhone Project(Right click on the project then properties)
For the dropdown of "Target Windows Phone OS Version" select Windows 8.X
Compile.
Grab the DLL, PDB, and XML from the output directory
Add Reference to the DLL file in your Windows Phone 8 Project
Thats it. I can't vouch that it works 100% or that you'll be able to submit your app. But it should hold you over until there is official support.
For complex json you might find this website helpful: http://json2csharp.com/#.
If you don't wanna make too fancy stuff (or need dictionary) suppport, you can also just use the built-in DataContractJsonSerializer (http://msdn.microsoft.com/en-us/library/system.runtime.serialization.json.datacontractjsonserializer.aspx)
Btw: At least in https://json.codeplex.com/discussions/401305 some people report that the WP7.1 dll works for them, using this file: "Newtonsoft.Json.4.5.7\lib\sl4-windowsphone71\Newtonsoft.Json.dll".

Mono.Data.SQLite reference missing in MonoDevelop "Edit References"

On Windows, I installed MonoDevlop and tried compiling the SQLite example which requires the Mono.Data.SQLiteClient reference. I opened up "Edit References" within MonoDevelop and I have absolutely no Mono references available with the exception of Mono.Cairo and Mono.Posix.
I thought perhaps I'd made a mistake by no installing the Mono framework first, so I installed Mono, then did a repair installation on MonoDevelop but the references are still not there?
Can somebody help me please?
Cheers
Sparky
Firstly, I believe Mono.Data.SqliteClient has been deprecated in favour of Mono.Data.Sqlite.
By default, MonoDevelop on Windows targets the .NET runtime for building/running/etc. The libraries available in the "Edit References" dialog are those installed into the target runtime, i.e. .NET.
If you have Mono installed, you also have the choice of targeting Mono. You can change the default target runtime using the Preferences->.NET Runtimes options panel, or change it for only the current solution using the Project->Active Runtime Menu.
Regardless which runtime you build with, you should be able to run/debug with another runtime using the Run->Run With... menu.
You could also install Mono.Data.SQLite into the .NET AssemblyFolders.