Setup Mono 3.0.1 in MonoDevelop 2.8 on Windows - monodevelop

I have installed MonoDevelop 2.8.2 using the windows .Net runtimes for now. I would like to use the latest Mono binaries (3.0.1) instead. To achieve that I´ve installed Mono 3.0.1 for windows from here
I´ve added the runtime in MonoDevelop via Tools->Options->Preferences->.NET Runtimes so that it shows up correctly in the list and set it as default. I made sure that my project uses this runtime (Project->Active Runtime->Mono 3.0.1). When I build a simple console project now I get the following error:
Build failed.The specified executable is not a valid application for
this OS platform.
Can anybody shed some light whats going wrong here?

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.

I'm getting build errors when using MvxEventToCommand within a WP8 project

I'm using the MvvmCross framework to create a windows phone 8 project.
In my WP8 project within the xaml I have the following:
<i:Interaction.Triggers >
<i:EventTrigger EventName="Tap">
<Commands:MvxEventToCommand Command="{Binding OnItemTappedCommand}" />
</i:EventTrigger >
</i:Interaction.Triggers>
My namespaces are as follows:
xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
and
xmlns:Commands="clr-namespace:Cirrious.MvvmCross.WindowsPhone.Commands;assembly=Cirrious.MvvmCross.WindowsPhone"
When I attempt to build I get the error:
Cannot resolve dependency to assembly 'System.Windows.Interactivity, Version=3.8.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' because it has not been preloaded. When using the ReflectionOnly APIs, dependent assemblies must be pre-loaded or loaded on demand through the ReflectionOnlyAssemblyResolve event.
Looking in ILSpy I can see that Cirrious.MvvmCross.WindowsPhone.dll references this dll but I only have version 3.9.5.0 available in my assembly references list within my project.
I've tried adding an assembly redirect in my app.config but I think that's more for runtime resolution then for build errors.
What's the best way to resolve this issue?
Thanks
-- EDIT --
I've managed to resolve this issue by finding a WP7.1 version of the System.WindowsInteractive.dll which is version 3.8.5.0. My project is definitely targeting the Windows 8.0 phone OS.
Could this be a problem with the Nuget packaging of MVVMCross?
Just to answer this question since I came across this problem today...
I had a fresh install of Windows 8.1 and the Windows Phone 8 SDK. My sln would build but when MvvmCross resolved the plugins on start-up it would crash with a ReflectionLoadTypeException - the LoaderExceptions property contained a single entry - it was unable to find System.Windows.Interactivity, despite being referenced from the extensions list in the reference manager for the project.
The solution was to install the Windows Phone 7 SDK and grab the Windows Phone 7 version from C:\Program Files (x86)\Microsoft SDKs\Expression\Blend\Windows Phone\v7.1\Libraries\System.Windows.Interactivity.dll.

NUnit GUI Runner for Windows Phone 8 class library - problems with some System libraries

I'm working on library projects for Windows Phone 8, and using NUnit for unit-testing. My IDE is Visual Studio 2012 Express edition for WP8. It'd been so far so good until a day when it happened to some tests failing saying that it's unable to load some system packages (in particular, System.Xml and System.Net version 2.0.5.0). So I tried:
Looked for the System.Xml and System.Net version 2.0.5.0 so that I could GAC them somehow , but found them nowhere. The closest version I have is 2.0.50272. I indeed tried to use this, it didn't complain anymore but the XmlSerializer.CreateReader and CreateWriter returned null... So the tests failed eventually after that.
Checked out the NUnit and upgraded the projects there to base on .NET 4.0, re-deployed to used this newly built NUnit framework and runner... It didn't work, the same error occurred.
When debugging, I saw it looked like the NUnit GUI loads the dependencies of my libraries using .NET framework run-time 2.0. Although all my libraries are Windows Phone 8 based. Would be very appreciative if someone could shed me some light on this.

Error When Creating a View or Controller in Monodevelop

I get the following error when I attempt to add a View or Controller to my monodevelop project: Invalid SDK Version Name
I am using Monodevelop 4.0, which I got from the following PPA: Launchpad.net/~keks9n/+archive/monodevelop-latest
And I installed mono using sudo-apt get install mono-complete
mono -V in terminal tells me that the version is 2.10.8.1
Monodevelop can use another runtime than default. Check your Project > Active Runtime setting and try to choose another option than already selected.
This has been resolved. Apparently, Monodevelop 4.0 is not stabe and 3.1 should be used for mvc development

Does protobuf-net support Windows RT?

Is it possible to use the protobuf-net library in an application that targets Windows RT? I tried adding it via NuGet to my project but I receive this error:
Successfully installed 'protobuf-net 2.0.0.480'.
Successfully uninstalled 'protobuf-net 2.0.0.480'.
Install failed. Rolling back...
Could not install package 'protobuf-net 2.0.0.480'. You are trying to install this package into a project that targets '.NETCore,Version=v4.5', but the package does not contain any assembly references that are compatible with that framework. For more information, contact the package author.
You need a newer version. Version 594 has support for 4.5.
In the package manager console (Tools->Library Package Manager->Package Manager Console) run:
PM> Install-Package protobuf-net -Version 2.0.0.594
Or download it from the project web site.
Yes, the more recent builds have full support for .NETCore (aka "WinRT", "Windows Store Applications", or "Metro", or "Modern UI", or whatever they want to call it today). As Eli notes, you can obtain it by specific version, or you can get it from the google-code download.
Note that for the best performance it is recommended to use "precompile", the new precompiler, because .NETCore has no support for meta-programming: without this, it will be using reflection at runtime, and will not be anywhere near as fast as it can be. This is included in the google-code download.