Xamarin Studio PCL support - MvvmCross

Hi,

I have been put off doing some multi-platform development for some time, but now that 'PCL' is not suffering from licensing issues (http://blog.xamarin.com/microsofts-pcl-reference-assemblies/) and can now/soon be supported by Xamarin I'm ready to give it another go.

I updated Xamarin Studio and swapped to the 'Alpha' branch (because I got the impression it includes the latest PCL support). I can create a PCL, but when I try to add the MvvmCross nuget package it errors.

Am I too early to be expecting this all to work?

A related question, nuget shows a ton of MvvmCross projects, most sounds very similar, what's the right one for iOS, Android, Mac, Windows, Win7 platforms, I assumed MvvmCross Hot Tuna Starter Pack, but now I see a PCL version too (neither work).

------- Installing...MvvmCross.PortableSupport 3.0.13 ------- Adding 'MvvmCross.PortableSupport 3.0.13' to vizolio.mac. Could not install package 'MvvmCross.PortableSupport 3.0.13'. You are trying to install this package into a project that targets '.NETFramework,Version=v4.0', 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. System.InvalidOperationException: Could not install package 'MvvmCross.PortableSupport 3.0.13'. You are trying to install this package into a project that targets '.NETFramework,Version=v4.0', 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. at NuGet.ProjectManager.ExtractPackageFilesToProject (IPackage package) [0x00000] in <filename unknown>:0 at NuGet.ProjectManager.AddPackageReferenceToProject (IPackage package) [0x00000] in <filename unknown>:0 at NuGet.ProjectManager.Execute (NuGet.PackageOperation operation) [0x00000] in <filename unknown>:0 at NuGet.ProjectManager.Execute (IPackage package, IPackageOperationResolver resolver) [0x00000] in <filename unknown>:0 at NuGet.ProjectManager.AddPackageReference (IPackage package, Boolean ignoreDependencies, Boolean allowPrereleaseVersions) [0x00000] in <filename unknown>:0 at NuGet.ProjectManager.AddPackageReference (System.String packageId, NuGet.SemanticVersion version, Boolean ignoreDependencies, Boolean allowPrereleaseVersions) [0x00000] in <filename unknown>:0 at ICSharpCode.PackageManagement.SharpDevelopPackageManager.AddPackageReference (IPackage package, Boolean ignoreDependencies, Boolean allowPrereleaseVersions) [0x00000] in <filename unknown>:0 at ICSharpCode.PackageManagement.SharpDevelopPackageManager.InstallPackage (IPackage package, ICSharpCode.PackageManagement.InstallPackageAction installAction) [0x00000] in <filename unknown>:0 at ICSharpCode.PackageManagement.PackageManagementProject.InstallPackage (IPackage package, ICSharpCode.PackageManagement.InstallPackageAction installAction) [0x00000] in <filename unknown>:0 at ICSharpCode.PackageManagement.InstallPackageAction.ExecuteCore () [0x00000] in <filename unknown>:0 at ICSharpCode.PackageManagement.ProcessPackageAction.Execute () [0x00000] in <filename unknown>:0 at ICSharpCode.PackageManagement.PackageActionRunner.Run (IPackageAction action) [0x00000] in <filename unknown>:0 at ICSharpCode.PackageManagement.PackageViewModel.InstallPackage (IEnumerable1 packageOperations) [0x00000] in :0
at ICSharpCode.PackageManagement.PackageViewModel.InstallPackage () [0x00000] in :0

at ICSharpCode.PackageManagement.PackageViewModel.TryInstallingPackage () [0x00000] in :0

`
Any help is hugely appreciated.

Rob.

Posts

  • mattwardmattward Xamurai GBMember Xamurai

    There are a few problems here.

    1. The NuGet addin does not currently support finding PCLs on Mac/Linux. This is because NuGet currently looks in C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETPortable

    2. On Windows the MvvmCross.PortableSupport NuGet package does not install into a project targeting .NET 4.0, but will install if the project targets .NET 4.0 with the portable profile Profile104. Changing your project to target Profile104 will not work on Mac/Linux due to issue 1).

    3. The MvvmCross.PortableSupport does not have any portable assemblies in it. So when it installs successfully no assembly references are added.

  • RobWilsonRobWilson GBMember

    Are these things something that Xamarin should / are planning on resolving or even just going to make it easier?

    If I do the nuget stuff from Visual Studio in my VM should I be okay? I'm sure I tried profile 104 without success.

    Many thanks,
    Rob.

  • mattwardmattward Xamurai GBMember Xamurai

    Xamarin and the Mono team are adding support for PCLs. Mono 3.2.3 includes PCLs on the Mac. The problems listed are not something that Xamarin themselves will be looking at as far as I'm aware.

    1) NuGet addin support for PCLs is something I am looking at.
    2) The MvvmCross.PortableSupport NuGet package will install into a .NET 4.5 project. At least in Visual Studio it does.
    3) This is for the MvvmCross maintainer to add.

    Installing MvvmCross.PortableSupport will work in Visual Studio however it does not actually install anything unless the project is targeting MonoAndroid v1.6

Sign In or Register to comment.