How to get MvvmCross vNext to compile on Mac using MonoDevelop - xamarin.ios

I am trying to compile the vNext branch of MvvmCross on a Mac to try & start doing some iOS development using PCL's & MvvMCross.
I have spent a couple of days on this now but appear to be going in circles... being somewhat new to both C# & the Mac.
I have installed MonoDevelop 3.1.1 as recently referred to on #slodge's blog.
I have updated the targets file as per this reference https://files.xamarin.com/~jeff/Microsoft.Portable.CSharp.targets
I have downloaded the vNext branch from GitHub.
I have loaded the mvvmcross_all.sln in MonoDevelop however building it using the Debug|iPhone Simulator profile gives me 3 errors.
I have not been able to work out how to fix the references errors as for example appear in CrossUI.Core, ie references to
System
System.Core
System.Net
etc
Each of these lines has an error of Assembly not available for .NetPortable 4.0 Profile1 Profile (in Mono 2.10.9)
I realise its all a moving target but its obviously possible to get it to compile.
Any suggestions as to what I may have missed would be appreciated.
TIA,
Andreas

Thanks Andreas
In the version referenced in the blog at http://slodge.blogspot.co.uk/2013/02/a-patched-monodevelop-for-pcls.html, it appears that MonoDevelop reports that CrossUI is missing its references - but it still compiles. See this screenshot from my Mac - solution explorer reports problems but 'rebuild all' on CrossUI succeeds.
If you get problems with building, please do report the build output and I'll try to help.
Note that the patched version of MonoDevelop also still has other problems - e.g. syntax highlighting and intellisense issues- MonoTouch: creating multiplatform apps using Portable Class Libraries
Alternatively, there are some iOS/Mac friendly binaries on SkyDrive - http://slodge.blogspot.co.uk/p/mvvmcross-binaries_7.html
The schedule for 'proper' support of Portable Class Libraries is aiming for a demonstrable version before Evolve (so less than 2 months away). Until then I'll personally continue to do most of my PCL work in VS, with the platform specific steps in MonoDevelop.

Related

Can someone tell me how to Configure Visual C++ 2015 with CPLEX?

I tried tutorial steps for Visual 2010, the linking didn't work or the console doesn't respond to build or run. I tried for other options to configure, which also didn't work as well.
You may vote for a request for enhancement at https://www.ibm.com/developerworks/rfe/execute?use_case=viewRfe&CR_ID=85231
regards
Alex Fleischer
It can be a bit complicated...
First, I think you should start reading the following tutorial. I find it quite straightforward as adapted to any CPLEX version. You must only notice that using a CPLEX version 12.X translates into the usage of its library: cplex12X.lib, the tutorial referring to CPLEX v12.61.
Then, you must install Visual Studio 2012, or even 2010, as they will install another Platform Toolset, v110 for VS2012 or v100 for VS2010. This is required since CPLEX comes with libraries for the 2010, 2012 and 2013 only, there is none so far for VS2015.
The configuration might work even if you have already VS2015 installed on your computer but I strongly advise you to begin installing the older version first, then the VS2015 to ensure the latter will recognize the older Platform Toolset and give you the option under: View\Property Pages\Configuration Properties\General\Platform Toolset of choosing the v110 for your project.
Be aware that using only VS2015 will prompt you a bunch of LNK2038 mismatch detected for '_msc_ver' errors letting you know that you're using version 1800 whereas you're linking libraries compiled on 1600 or 1700 versions.
One is glad to be of service
As of CPLEX 12.6.3, VS2015 is not supported (see the detailed system requirements here). It is possible to use VS2015 with a VS2013 project (e.g., see here), but this is probably not what you are looking for.

Visual Studio 2015 C# ANTLR

To convince my employers of the benefits of ANTLR and StringTemplate, I constructed a small demonstration first in Java. But Java is not one of our preferred languages, so I translated it to C#. Using VS2015 (Community Edition) and various instructions on the net I got only so far. I now get
ANTLR cannot generate 'org.antlr.v4.codegen.CSharp_v4_5_2Target' code as of version 4.3
Incompatible versions? Which versions of what libraries are compatible for a successful build. I could not work out how to use GitHub. There didn't seem to be a package to download, and I could not see how to download a set of files to compile.
Update 1
Randomly installing versions of whatever I can find, I have now got it down to loads of errors like this from the generated code.
CS0103 The name '_errHandler' does not exist in the current context
Update 2
I have subsequently tried (and failed) to get it going in VS2010(Express). I think that version is seriously hobbled. I can't get NuGet working on it. I am now going to try to install VS2013 as that seems to be the most commonly referred to in this ANTLR context. With VS2015 I have been through all the .NET versions I have installed on my machine back to v3, with no success. It now fails to generate the parsing code.
Update 3 - Solved
Problem solved! Use VS2013 and follow Sam Harwell's clear instructions. Some minor differences between Java and C# to work out when using StringTemplate

Project is targeting frameworks not installed or are included as part of future updates to Visual Studio

I am attempting to convert the Microsoft.Health C# class library that is installed as part of the HealthVault SDK, using instructions provided here. After following these instructions, I get the following error when attempting to load the project into Visual Studio 2013.
"The project is targeting frameworks hat are either not installed or
are included as part of future updates to Visual Studio. See
http://go.microsoft.com/fwlink/?LinkId=287985"
Visiting the link takes me to .NET SDKs and Downloads. Once there, I have no clue on what needs to be done.
I do realize that one will have to leverage the Portable Class Library Contrib project to fill in some missing bits, especially code related to System.Security. This, I will deal with later.
Any one run into a similar problem?
Maybe so late but for those who have the same problem.
I had the same error in a project which was working perfect before updating VS2013 and finally after 3 hours looking for the source of the error I found that the error is about TargetFrameworkProfile.
In my case I sloved it like so:
Right click in the unloaded project in your solution and click Edit.
Find the TargetFrameworkProfile tag and set it as below:
<TargetFrameworkProfile>Profile78</TargetFrameworkProfile>
At a guess, this is because you need to specify the TargetFrameworkVersion and TargetFrameworkProfile properties in the project file. Compare the .csproj you are trying to create to a newly created PCL project file, and make sure that everything that's not specific to your project matches.
I ran into the same issue and got it resolved by installing the latest Visual Studio Update

install and execute cocos2dx project on windows 8

I am making a small basic game for multiple mobile platforms using cocos 2dx, I have done all the coding in c++ on xcode and the project is running fine for iOS and android.
But when porting to windows phone I am facing a lot of hurdles. I am using cocos2dx 2.1.3 on visual studio 2012 express on 64 bit windows 8 with windows 8 phone SDK.
Firstly i don't get templates for cocos2dx, then there is no option to run the project in simulator or device. I have been digging the internet alot for this and have found some tutorials but all of them have one or the other limitations.
can somebody guide me with this windows part or a totally new way round to implement cocos2dx on multiple platforms ?
Option 1
Your going to have to open a new Direct3D project and follow the directions from here
Option 2
There are a couple build scripts available to generate project types for all platforms in python, as seen here.
(this works with 2.1.2 or later)
Option 3
Newer versions of cocos2d-x have build scripts for all platforms that come with the latest git repos. Not sure if there are a lot of breaking changes but the newer versions also have build projects.(build-win32.bat)
About the project template.
The templates for windows 8, at least in the last stable release I looked at a month ago, still had some issues with the html in the c++ project wizard but, the current development branch should have that fixed for the windows 8 visual studio browser. If they haven't then there are a couple of html meta-data tags that will need to be removed as they are depreciated in order for the project wizard to be usable.

Running unit tests on Mac with MvvmCross?

Finally, I've got my Mac and tried to re-compile and run my project with Xamarin.iOs
Since, PCL is not yet supported, I had to create a copies of .sln and .csproj and replace references to MvvmCross-Binaries and it works (thanks, Stuart). I hope Xamarin will give more elegant solution soon.
However, I couldn't compile and run unit tests on Mac - Mono 4.5 is not installed, and I didn't find Cirrious.MvvmCross.Test.Core.dll.
So, is it possible to run this kind of unit tests on Mac or we just test it in Windows platform?
I believe you should be able to build and run the 4.5 assemblies using the latest mono 3 releases. Further, the latest mono alpha release should also contain 'proper' support for portable class libraries.
Alternatively, if you'd rather work off of stable xam releases, then you'll probably need to create your own version of a .net4 core test assembly - there are only 2 small classes so this shouldn't be too hard to do - https://github.com/slodge/MvvmCross/tree/v3/Cirrious/Test/Cirrious.MvvmCross.Test.Core
As well as on mac testing, I know some people also use the on device test runners - especially for iOS where the aot compilation makes on-device testing important.

Resources