portable-class-library

What need I do to get this code to work in a Portable Class Library?

橙三吉。 提交于 2019-11-28 11:00:10
问题 I'm wondering if the Portable Class Library is even more restricted in functionality than the Compact Framework. I'm trying to port a CF/Windows CE app (runs on a handheld device) to a Xamarin solution that will target Android, iOS, Windows Phone, and perhaps other things. One of the problems I run into, though, is that this legacy code (which works under CF): public static List<string> GetXMLFiles(string fileType, string startingDir) { const string EXTENSION = ".XML"; string dirName =

MvvMCross 3.0.6 Nuget package installation issue

怎甘沉沦 提交于 2019-11-28 09:18:28
I am trying to install MVVMCross NuGet package using NuGet 2.5 version. I have added the mono android and touch file to Profile104 folder. Still I am getting following exception: Attempting to resolve dependency 'MvvmCross.HotTuna.StarterPack (≥ 3.0.6)'. Attempting to resolve dependency 'MvvmCross.HotTuna.CrossCore (≥ 3.0.6)'. Attempting to resolve dependency 'MvvmCross.PortableSupport (≥ 3.0.6)'. Installing 'MvvmCross.PortableSupport 3.0.6'. Successfully installed 'MvvmCross.PortableSupport 3.0.6'. Installing 'MvvmCross.HotTuna.CrossCore 3.0.6'. Successfully installed 'MvvmCross.HotTuna

HttpClient missing from .Net portable subset while creating PCL in Xamarin

和自甴很熟 提交于 2019-11-28 08:07:27
问题 I have created a Portable class library in Xamarin and want to use it for an android app. I want to use the HttpClient within this PCL. I have added the Microsoft Http Client libraries from the NuGet Package manager. I can now see the .Net portable subset added to my references. But somehow I still cannot use the HttpClient and it does not show in the .Net portable subset as well. Also, my Current profile of the PCL is 4.0-Profile 158 . If I change the profile to 4.5, Xamarin crashes and does

What is .NET Portable Subset (Legacy)?

坚强是说给别人听的谎言 提交于 2019-11-28 06:57:12
Object browser in Visual Studio 2012 offers two different component sets for Portable class libraries: .NET Portable Subset .NET Portable Subset (Legacy) When I create Portable Class Library it uses .NET Portable Subset. What is the second set and how can I use it? It contains MEF which is not available in .NET Portable Subset . Yep this is confusing, and is basically because Object Browser doesn't have a good way (and we couldn't add a way in this version without a significant rewrite) to represent the portable subset. To help shed some light on this, consider the following diagram: The

Xamarin Shared Library and PCL

為{幸葍}努か 提交于 2019-11-28 06:22:53
What is the exact difference between xamarin shared project and portable class library? When to use shared library and when to use portable class library? Is this possible to write native functionality in shared projects like showing alert,accessing camera and use it for both android and iOS? Can anyone please explain me. In shared projects each code file will be compiled for each destination (Android, iOS, Windows Phone etc). You are able to include platform specific code by using #if compiler directives. When you want to access the camera you need to write the access code inside an #if block

TPL on PCL of mvvmcross

放肆的年华 提交于 2019-11-28 05:38:23
问题 I see i can't use TPL in the CORE projects. Is the PCL doesn't support System.Threading.Tasks? (i checked on profile104 and there is no System.Threading.Tasks namespace, but on profile 131 there is...) So, is there a way to use mvvmcross with TPL? Thanks. 回答1: There are several ways to use TPL with portable class libraries. You can use a profile like 104 and extend it with the BCL AsyncBridge support classes. For more on this see http://channel9.msdn.com/Events/Build/2012/3-004 and the

Portable class library: recommended replacement for [Serializable]

早过忘川 提交于 2019-11-28 04:29:17
I am porting a .NET Framework C# class library to a Portable Class Library. One recurring problem is how to deal with classes decorated with the [Serializable] attribute, since this attribute is not part of the Portable Class Library subset. Serialization functionality in the Portable Class Library subset instead appears to be covered by DataContractAttribute . To preserve as much of functionality as possible in the Portable Class Library, is it sufficient to replace [Serializable] with the [DataContract] attribute (with the implication that all fields and properties subject to serialization

What is a Portable Class Library?

女生的网名这么多〃 提交于 2019-11-28 02:48:10
On MSDN I noticed a section about a Portable Class Library , under Version Information. See System.Object for an example. http://msdn.microsoft.com/en-us/library/system.object.aspx I did a brief Google search and couldn't find anything about the Portable Class Library . Does anyone here know what it is or where I could find more information about it? Ruben Bartelink UPDATE Oct 9 2017: Article comparing/constrasting .NET Core/Std/PCL UPDATE Nov 23 2016: Article by Rick Strahl UPDATE Oct 29 2016: .NETStandard 1->2 FAQ UPDATE Oct 19 2016: This is the best interview/video I've seen to date

Portable Class library and reflection

天大地大妈咪最大 提交于 2019-11-27 23:00:58
I am building new application for Desktop, Windows 8 store and Windows phone at the same time. so I created Portable Class library to have common functionality across all platforms. my problem is that when I try to reuse my code inside PCL I can not access some methods and properties inside library. According to MSDN those methods are supported but I do know now why I can not access them. var property = memberExpression.Member as PropertyInfo; if (property == null) { } var getMethod = property.GetGetMethod(true); if (getMethod.IsStatic) {} here is the fragment of the code that can not be

What is the advantage of using portable class libraries instead of using “Add as Link”?

妖精的绣舞 提交于 2019-11-27 22:58:28
Is anybody explain to me what is the advantage of using portable class libraries instead of using "Add as Link"? Thanks Disadvantages of linked files: Add as link can be hard to maintain, especially as you scale to multiple projects and many source files. Tooling (such as Project Linker for Visual Studio 2010, or holding ALT while dragging in Visual Studio 2012) can make this easier. Refactoring tools don't work with linked files. For example, if you rename a class or method in a linked file, refactoring tools won't update references to other linked copies of that API. When editing code in a