I have been pointed to this answer regarding using HTML Agility Pack in Monotouch. However the answer is poorly formatted, ambiguous, and some parts have android mentioned.
I am new to Xamarin could someone please step me through the process of compiling a project for use in Monotouch?
There are multiple ways to tackle this, but one approach would be
create a new iOS Library Project
add the *.cs files from HtmlAgilityPack
build
resolve any build errors
goto 3
Related
I have seriously tried to find a method to integrate zxing library for my barcode scanning application and found some examples and tutorials, but they mostly concentrate on the code of integrating the project library. I have understood how to use it but my only issue is I cant seem to find a correct way to copy the new zxing library. Please can anyone guide me through which files to copy where or how to bind the project in Android Studio.
I believe you want to 'add' the zxing library in your Android Studio project.
If you are comfortable with using Gradle, just add the below line in your app's build.gradle file under dependencies.
compile 'com.google.zxing:core:3.2.0'
Build your project and then start integrating zxing by importing the required classes.
I hope this answers your question and solves your problem.
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
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.
I have a class library project (developed in VS) which I want to share with a MonoTouch project I'm working on. The problem is that when I try to add a reference to the library project in MonoDevelop an error is displayed saying 'Incompatible target framework: v.NETFramework,Version=v3.5)'.
From what I've read on the web I have to create another class library project in MonoDevelop and then link all the project files from the original into it...I'll do this if I have to but i'd rather have a cleaner solution to this, if not a simple project file fix then maybe a script I can run...
Regards
Lee
A Portable Class Library would be the way to go, but unfortunately not yet properly supported in the current version of MonoDevelop with MonoTouch. Work seems to be in progress though.
You do have to create a class library project in MonoDevelop. The library has to be compiled with the MonoTouch version of the framework.
The reason for this is MonoTouch framework is based on the Silverlight lightweight version of the .NET framework.
See here http://docs.xamarin.com/ios/about/assemblies for more info.
Monotouch compiles the app into the native code. How can Apple know that the app was built using MonoTouch? Does Monotouch leaves a signature in the application?
Does Monotouch has its own libraries which could be a trace of the origin or it compiles all the code and all its .NET libraries into native code?
The resulting .app package contains the application binary, your resources as well as the required additional libraries, such as:
montouch.dll;
System.dll;
System.Xml.dll and so on.
As such, it would be trivial for them to check if the application was built with monotouch or not - it is as simple as right clicking the package and then select "Show package contents" in Finder.
However, you need not worry about that, as Apple has just relaxed their License Agreement: http://daringfireball.net/2010/09/app_store_guidelines
And even if the assemblies containing metadata were not included in the app bundle (directory), I am quite sure it is relatively trivial to learn how to recognize from the patterns in the actual code in the app executable that it was produced by MonoTouch, if one would want to. So there is not reason for MonoTouch to try to "hide" that fact.