Problems compiling MvvmCross TipCalc sample - mvvmcross

I am trying to run the MvvmCross TipCalc sample. Using NuGet on TipCalc.UI.Droid to resolve references works OK. I then try to do same on TipCalc.Core and get:
Adding 'MvvmCross.PortableSupport 3.0.13' to TipCalc.Core.
Could not install package 'MvvmCross.PortableSupport 3.0.13'. You are trying
to install this package into a project that targets 'portable-win+net40+sl40+wp',
but the package does not contain any assembly references or content files that
are compatible with that framework. For more information, contact the package author.
Shouldn't the project just be ready to go for NuGet and it should "just work"? I am newbie to NuGet and MvvmCross. I am on Win7, VS.NET 2012, NuGet 2.7.40911.225, and latest MvvmCross-Tutorials from GitHub.

The problem will probably be in 'net40' and 'wp' platforms you've included - for PCL reasons we need a minimum of 'net45' and wp75' used - see the chart in http://msdn.microsoft.com/en-us/library/gg597391.aspx for the fact that 'net40' doesn't currently support Mvvm Types (e.g. INotifyPropertyChanged).
If it helps, my current development setup here has remained unchanged since March - it's still http://slodge.blogspot.co.uk/2013/04/my-current-pcl-setup-in-visual-studio.html
Shouldn't the project just be ready to go for NuGet and it should "just work"?
The process towards getting all the tooling for PCLs, nuget, VS, XS, etc working across all the platforms has been slow, hard work.... it is happening and it will one day 'just work' but it continues to take time and lots of work from lots of people.
There are still open workitems within nuget and within Xamarin - e.g. http://nuget.codeplex.com/workitem/2926 - which people are working on; some of the MS legal hurdles have recently been cleared (http://blogs.msdn.com/b/dotnet/archive/2013/10/14/portable-class-library-pcl-now-available-on-all-platforms.aspx); and technically things change on the Xamarin side with almost every Alpha release. But it is hard to get definitive answers on when things will be 100% ready and will "just work".
The good news is that:
with the 2 XML files from http://slodge.blogspot.co.uk/2013/04/my-current-pcl-setup-in-visual-studio.html I and plenty of others have been happily using PCLs and nuget for the last 6 months or so.
progress is still moving forwards
Some of these Q&A's may also help:
MVVMCross StarterPack not installing from Nuget in fresh PCL
Can't install MVVMCross on PCL project
MvvMCross 3.0.6 Nuget package installation issue
Adding MvvmCross nuget package reference to PCL failed
Getting PCL, Mvvmcross, Nuget and Xamarin Studio to play "nice" on Mac

Related

NU1202: MySql.Data.Entity isn't compatible with monoandroid81

I am trying to start my first Xamarin project and I got some issue while trying to install the MySqlEntity NuGet package.
Severity Code Description Project File Line Suppression State
Error NU1202 Package MySql.Data.Entity 6.10.8 is not compatible with monoandroid81 (MonoAndroid,Version=v8.1). Package MySql.Data.Entity 6.10.8 supports: net452 (.NETFramework,Version=v4.5.2) Refo_T3.Android C:\Users\evyat\source\repos\Refo_T3\Refo_T3\Refo_T3.Android\Refo_T3.Android.csproj 1
I tried this solution: Xamarin.Android: Package XX is not compatible with monoandroid81 (MonoAndroid,Version=v8.1)
and I still end up with errors.
It's my first application on Xamarin platform, I used to code in .NET but I decided to test my luck with Xamarin.
I couldn't find any more useful information online and I need your better experience.
Thank You :)
As written on the nuget packages page, the package is only available for .net framework >= 4.5.2
So you can't install it for Xamarin Android project only classic desktop .Net Framework applications.

TKCustomMap Version Conflict

This issue has been reported on GitHub here -
https://github.com/TorbenK/TK.CustomMap/issues/325
Has anyone else has struggled with this? I was stoked to find this nuget package because it does exactly what I'm looking for but it needs Places and some other GooglePlayServices installed and I can't install them because of this conflict.
I'm also not sure if uninstalling TK.CustomMap and then installing the Play Services would even help because the person who reported the issue on GitHub said-
I converted my app to .net 2.0 and had to use the newest Google play services
60.1142.1 for AdMob to work. It wouldn't install until I uninstalled TK.CustomMap, and now TK.CustomMap won't reinstall because it only want to use GooglePlayServices 42.1021.1
Severity Code Description Project File Line Suppression State
Error NU1107 Version conflict detected for Xamarin.GooglePlayServices.Tasks. Reference the package directly from the project to resolve this issue.
HunterTracker.Android -> Xamarin.GooglePlayServices.Base 60.1142.1 -> Xamarin.GooglePlayServices.Tasks (= 60.1142.1)
HunterTracker.Android -> HunterTracker -> TK.CustomMap 2.0.1 -> Xamarin.GooglePlayServices.Location 42.1021.1 -> Xamarin.GooglePlayServices.Tasks (= 42.1021.1).
That's pretty much the exact error I'm getting trying to install the other packages. There's no resolution on github.
Anybody found a work around? Or does anyone know how to "Reference the package directly from the project"?
Thanks to SushiHangover's comments above pointing me in the right direction I was able to discover what I needed to do here. I had an error updating the nuget packages of TK.CustomMap at first because v26 Xamarin.Android.Support.Vector.Drawable was targeting MonoAndroid8.0 and the update to v27 must target MonoAndroid8.1 So it took quite a bit just to be able to update the nuget packages in order to get the assemblies with later versions so I could use TK.CustomMap in my solution. But I was eventually able to get there. Here were the steps I followed (as best I can remember). I am unable to compile ios right now because I don't have a MAC so that fix will have to come later. This fix is for the shared project and Android project only
Download the TK.CustomMap-master from github
Extract it and delete the Sample project completely (I also deleted the UWP project as I'm not really interested in that at this time)
Opened and built then closed. Deleted packages folder, vs folder, bin and obj from Android and Shared Project (this step is probably not necessary but I did it so...)
In the packages.config in Android changed all targets from monoandroid80 to monoandroid81 save file
In the TK.CustomMap.Android.csproj for every v26.0.1 of any Xamarin.Android.Support or other Xamarin.Android util package changed 26.0.1\lib\MonoAndroid80 to 27.0.2.1\lib\MonoAndroid81 - save file
In the nuget folder in TK.CustomMap.nuspec changed the target framework in this section
<group targetFramework="lib\MonoAndroid7.0">
<dependency id="Xamarin.GooglePlayServices.Location" version="42.1021.1" />
<dependency id="Xamarin.GooglePlayServices.Places" version="42.1021.1" />
<dependency id="Xamarin.Android.Maps.Utils" version="0.5.0" />
<dependency id="Xamarin.Forms" version="2.5.0.91635" />
<dependency id="Newtonsoft.Json" version="10.0.3" />
</group>
to
<group targetFramework="lib\MonoAndroid">
so it could target any version
Opened and updated all nuget packages using package manager (not console). Built debug and release builds
At this point opened solution I had tried to implement TK.CustomMap in previously to attempt the fix. Remember the original issues was that the latest frameworks could not be used and 42.1021.1 frameworks were unable to locate com.google.gms.location and com.google.gms.places.ui files so they had to be updated or no TK.CustomMap
In the problem solution uninstalled TK.CustomMap from all projects
In the problem solution Android project added reference to all the dlls in the release folder of the Android bin file from TK.CustomMap project.
Installed updates for all Xamarin.Android frameworks in problem solution through Package Manager (not console)
Installed updates of all other nuget packages for all projects using Package Manager (not console)
Installed TK.CustomMap to Shared project using Package Manager (not console)
Added the References to the android project a second time. May or may not have helped.
Installed TK.CustomMap Nuget Package using Package Manager (not console)
Built and ran on Live Player successfully!!
Thanks to Sushi Hangover for the advice. I haven't seen any comprehensive tutorials anywhere on how to accomplish this so I figured I would post my own answer in case anyone else was looking. Definitely if you are new to VS all this stuff is no walk in the park in the beginning.
Thanks to #Travis Fleenor. This is my solution. I change a bit your sequence in order to work on mine.
1. Make sure the original proyect from github (https://github.com/TorbenK/TK.CustomMap) works and you can run it.
2. Update the nugets where you get the conflict. In my case I got conflicted in googleplay library version. I updated it in the original proyect and then assure it could run it.
3. Compile entire solution in release mode. Then, copied the generated dll from bin/release and pasted them in a folder in my desktop.
4. I referenced those dll to shared proyect and android proyect. I only used nuget package manager to install some missing packages needed for the tk.custom. Notice that you only will reference some dll that the proyect accept. For the mayority Visual will prompt ' dll already referenced' something.
5. first reference your shared proyect, later your android one. That's all. make sure the you ca recompile solution.
Hope this helps

Error Adding MvvmCross NuGet package to PCL in VS2013

When I try to install MvvmCross on my PCL, I get the error message below. I am running Visual Studio 2013 and the Xamarin Frameworks are installed for the PCLs.
I'm using Profile78, which targets .net framework 4.5, windows store apps (windows 8) and higher, Windows Phone 8, Xamarin.Android, and Xamarin.iOS.
Is there a better profile for me to use?
Could not install package 'MvvmCross.PortableSupport 3.0.13'. You are trying to install this package into a project that targets 'portable-net45+wp80+win+MonoAndroid10+MonoTouch10', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author.
This area is changing with many new releases from many different places. I don't believe there are any definitive answers here today. There's a walkthrough using the latest platforms on http://slodge.blogspot.co.uk/2013/11/quick-run-through-using-pcls-in.html
That walkthrough uses:
Xamarin - iOS 1.8 & Android 4.10
Nuget - 2.7.2
MvvmCross - 3.0.14-beta3
Visual Studio 2012
portable profile 158
Other setups may also work - I don't know if anyone knows which is "better" - but it would be interesting to hear opinions!

Specified Gradle Installation (..) is not supported by this tooling API version (1.6, protocol version 4) [duplicate]

This question already has answers here:
Gradle build errors with Android Studio
(3 answers)
Closed 9 years ago.
I have just set up Android Studio 0.2.2 and updated my Android SDK to the latest version.
I have exported my Android project (android:minSdkVersion="8", android:targetSdkVersion="15") in Eclipse by 'Generate Gradle Build Files' without (visible) problems. And I can export/compile my app in Eclipse just fine, it also runs fine in the emulator.
However, in Android Studio, when trying to import my project, I am confronted with the above error message. "Gradle Home" is (IMO, correctly) displayed as "D:\Prog\Android-Studio\plugins\gradle".
Any idea how to make Android Studio feel more comfortable on my computer?..
I've encountered a similar problem where I can't import my project. There is at least one answer out there that may help; it requires the creation of a blank project in Android Studio and then copy files over from Eclipse. This ensures the creation by Android Studio of the necessary Gradle files, etc. Here's the link to the full answer: Gradle build errors with Android Studio
Look's like you should try to use the Gradle Wrapper rather than a local Gradle distribution. According to Gradle's website (http://www.gradle.org/docs/current/userguide/gradle_wrapper.html):
The wrapper is something you should check into version control. By distributing the wrapper with your project, anyone can work with it without needing to install Gradle beforehand. Even better, users of the build are guaranteed to use the version of Gradle that the build was designed to work with. Of course, this is also great for continuous integration servers (i.e. servers that regularly build your project) as it requires no configuration on the server.
You'll need to mimic the following structure in your project's directory:
simple/
gradlew
gradlew.bat
gradle/wrapper/
gradle-wrapper.jar
gradle-wrapper.properties
At that point, go to Settings (Windows) Preferences (Mac), click "Gradle" on the left hand side, choose "Use Gradle wrapper (recommended)". If that option isn't available, try restarting Android Studio or closing and reimporting your project. Checking this option should ensure that you always build with the correct Gradle distribution.

Publish WinRT application with SharpCompress library

The current SharpCompress.WindowsStore.dll library published on Nuget is build in Debug mode. I got this error from the Windows Store App Certification Kit.
Error Found: The debug configuration test detected the following errors:
The binary SharpCompress.WindowsStore.dll is built in debug mode.
Is there any way to have/compile the SharpCompress lib in Release Mode?
I'd rebuild it in release mode.
What, you didn't think about that?
It's on NuGet, right? NuGet packages often list a project site. So looking at the page I can see the link points right over here. That's on GitHub. That's where source lives.
You can either fork it (which there isn't really a point, since you don't want to develop it), clone it (aka use a Git tool such as GitHub for Windows) to your local machine, or just download the latest code in a zip file.
From there you can build in release mode and away you go. May not be just that easy, as there might be some dependencies or such that need resolving. Now off you go.