portable-class-library

Xamarin Shared Library and PCL

人盡茶涼 提交于 2019-11-27 05:39:44
问题 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. 回答1: 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

Portable class library: recommended replacement for [Serializable]

青春壹個敷衍的年華 提交于 2019-11-27 05:21:26
问题 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

MvvMCross 3.0.6 Nuget package installation issue

戏子无情 提交于 2019-11-27 02:48:49
问题 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

Handling missing types in PCL with real types existing on some of the platforms

匆匆过客 提交于 2019-11-27 02:26:25
问题 This may be a question answered somewhere, but I can't seem to find an answer. I am working on a project to port Mono.Data.Sqlite to Windows Phone and Windows Store, but of course this requires System.Data to be ported as well. I decided to use PCLs as this removes the need for separate assemblies for the platforms (I am also checking out Silverlight, but this is not a priority) In doing this, I have managed to get most of the functionality across except for one type - DBNull :( This is where

What is .NET Portable Subset (Legacy)?

Deadly 提交于 2019-11-27 01:38:15
问题 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. 回答1: 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)

Timer in Portable Library

不想你离开。 提交于 2019-11-27 00:57:02
I can't find a timer in portable library / Windows Store. (Targeting .net 4.5 and Windows Store aka Metro) Does any have an idea on how to created some kind of timing event? I need somekind of a stopwatch, so this should refreshn once a second or so Update: We have fixed this in Visual Studio 2013. Portable libraries targeting Store (Windows 8.1) and .NET Framework 4.5.1 projects can now reference Timer. This is unfortunate case of where our implementation details are leaking to the user. When you target just .NET 4.5 and Windows Store apps, we actually cause you to build against something

What is a Portable Class Library?

核能气质少年 提交于 2019-11-26 23:49:37
问题 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? 回答1: UPDATE Oct 9 2017: Article comparing/constrasting .NET Core/Std/PCL UPDATE Nov 23 2016: Article by Rick Strahl UPDATE Oct 29 2016:

Portable Class library and reflection

喜欢而已 提交于 2019-11-26 23:16:04
问题 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 =

How to define a more aggressive timeout for HttpWebRequest?

醉酒当歌 提交于 2019-11-26 23:09:58
问题 Inside a Portable Class Library, I've the following method which post data to a specific Url. The method works great. However I'd like to specify a more aggressive timeout (the default is 100 seconds). Considering that there's no Timeout property on the HttpWebRequest class from the Portable Class Library, how can I make sure that the call is abandoned if it takes longer than a few seconds? public async Task<HttpResponse> PostAsync(Uri uri, string data) { HttpWebRequest request =

Build error: You must add a reference to System.Runtime

*爱你&永不变心* 提交于 2019-11-26 18:23:23
I'm preparing a brand new ASP.NET MVC 5.1 solution. I'm adding in a bunch of NuGet packages and setting it up with Zurb Foundation etc. As part of that, I've added a reference to an in-house NuGet package which is a Portable Class Library and I think this is causing a problem on the build server. TeamCity fails the build with: The type 'System.Object' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=4.0.0.0 I originally added the fix for the same or similar error when compiling the Razor web pages, that fix being in the web.config