portable-class-library

Why can't my PCL use System.Runtime?

倾然丶 夕夏残阳落幕 提交于 2020-02-02 16:31:43
问题 I have a PCL that targets the following platforms: .NET Framework 4.5 Windows 8 Windows Phone 8.1 I need to add a reference to System.Runtime because I want to use another package that depends on it. From what I can see, version 4.0.0 appears to include the target platforms mentioned above. However, when I try installing it via NuGet, I get this stack trace: PM> Install-Package System.Runtime -Version 4.0.0 # ... Install failed. Rolling back... Package 'System.Runtime 4.0.0' does not exist in

Why can't my PCL use System.Runtime?

一世执手 提交于 2020-02-02 16:30:08
问题 I have a PCL that targets the following platforms: .NET Framework 4.5 Windows 8 Windows Phone 8.1 I need to add a reference to System.Runtime because I want to use another package that depends on it. From what I can see, version 4.0.0 appears to include the target platforms mentioned above. However, when I try installing it via NuGet, I get this stack trace: PM> Install-Package System.Runtime -Version 4.0.0 # ... Install failed. Rolling back... Package 'System.Runtime 4.0.0' does not exist in

Can you/How to specify Editor at runtime for PropertyGrid (for PCL)?

不羁的心 提交于 2020-02-01 09:39:28
问题 I wrote a PCL with custom objects in there, and then I create a GUI that handles the objects from the PCL... and I try to use PropertyGrid to edit the properties... I've already read that in order for the grid to know what to do with the object, I need to specify the EditorAttribute as well as providing a TypeConverter... but I don't think I could add those 2 in the PCL... Is there a way to handle this at the GUI level, like telling the PropertyGrid to use a specific type of Editor

Akavache's GetObject<T> hangs when awaited. Any idea what is wrong here?

假装没事ソ 提交于 2020-01-23 08:11:29
问题 I have a Xamarin.Forms application, with this code in my App class (yes, this is just a sample to demonstrate the issue): public App() { BlobCache.ApplicationName = "MyApp"; BlobCache.EnsureInitialized(); // The root page of your application MainPage = GetMainPage(); } public object BlockingGetExternalUser() { return GetExternalUser().Result; } private async Task<object> GetExternalUser() { try { return await BlobCache.LocalMachine.GetObject<object>("user"); } catch (KeyNotFoundException) {

Exception while loading assemblies Xamarin.Android.Support.v4

时光总嘲笑我的痴心妄想 提交于 2020-01-21 06:26:50
问题 I am working on visual studio with Xamarin.Forms , I get the following Error: Exception while loading assemblies: System.IO.FileNotFoundException: Could not load assembly 'Xamarin.Android.Support.v4, Version=1.0.0.0, Culture=neutral, PublicKeyToken='. Perhaps it doesn't exist in the Mono for Android profile? File name: 'Xamarin.Android.Support.v4.dll' at Xamarin.Android.Tuner.DirectoryAssemblyResolver.Resolve(AssemblyNameReference reference, ReaderParameters parameters) at Xamarin.Android

Creating a PCL NET 4.0 gives me an error in Visual Studio 2015

↘锁芯ラ 提交于 2020-01-14 10:32:58
问题 I am using VS 2015 Pro. If I create a new project Class Library (portable) Targeting: NET Framework 4.0 Windows 8 all works fine. BUT when I add to the targeting: Windows Phone 8.1 the following two errors appear: There was a mismatch between the processor architecture of the project being built "MSIL" and the processor architecture of the reference "C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\mscorlib.dll", "x86". This mismatch may cause runtime failures. And the Linq not found: The type

Creating a PCL NET 4.0 gives me an error in Visual Studio 2015

删除回忆录丶 提交于 2020-01-14 10:31:50
问题 I am using VS 2015 Pro. If I create a new project Class Library (portable) Targeting: NET Framework 4.0 Windows 8 all works fine. BUT when I add to the targeting: Windows Phone 8.1 the following two errors appear: There was a mismatch between the processor architecture of the project being built "MSIL" and the processor architecture of the reference "C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\mscorlib.dll", "x86". This mismatch may cause runtime failures. And the Linq not found: The type

MVVM Light - PCL+WPF - Getting exception of type Microsoft.Practices.ServiceLocation.ActivationException

我怕爱的太早我们不能终老 提交于 2020-01-14 08:17:09
问题 Background Hi all SO viewers. I am normally an Android developer, but now I'm developing a cross platform application targeting WPF and Android. That being said, there's practically no info on how to directly do what I want. So, I ended up finding a 3-part blog series that goes in depth on how to develop a Windows-based cross platform MVVM project. As long as I set the PCL to be compatible with Xamarin.Android, any code that doesn't throw an error SHOULD work once I get to the Android side of

Best strategy to target .NET 4 from a NuGet package with a portable class library

这一生的挚爱 提交于 2020-01-13 18:01:31
问题 I have a NuGet package for a library that is currently implemented only for .NET 4. But I have ported library code to support various platforms (WinRT, SL5, WP8) so ideally I would like to package it as a portable class library (PCL) to simplify the maintenance. But the library is using LINQ to XML (XELements etc.) that requires targeting .NET 4.0.3 and installting .NET 4.0.3 on a client machine. So I have a dilemma regarding how to target plain .NET 4. If it was not about NuGet packages and

TPL on PCL for MvvmCross for PCL Profile 78

你离开我真会死。 提交于 2020-01-13 10:54:10
问题 Trying to use PCL for mvvmcross with TPL by Profile 78 (regarding question TPL on PCL of mvvmcross) On iOS project it's working, but NOT for android . here the Error: Exception while loading assemblies: System.IO.FileNotFoundException: Could not load assembly 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.Perhaps it doesn't exist in the Mono for Android profile? File name: 'System.Runtime.dll' at Xamarin.Android.Tuner.DirectoryAssemblyResolve So, does