portable-class-library

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

ぃ、小莉子 提交于 2019-12-17 16:27:41
问题 Is anybody explain to me what is the advantage of using portable class libraries instead of using "Add as Link"? Thanks 回答1: 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

How to implement progress reporting for Portable HttpClient

非 Y 不嫁゛ 提交于 2019-12-17 15:45:07
问题 I'm writing a library with intentions to use it in desktop (.Net 4.0 and up), phone (WP 7.5 and up) and Windows Store (Windows 8 and up) apps. The library has the capability to download files from the Internet using Portable HttpClient library, and report the progress of the download. I search around here and the rest of the internet for documentations and code sample/guidelines on how to implement the progress reporting, and this search led me to nowhere. Does anyone has an article,

Difference between .Net Core, Portable, Standard, Compact, UWP, and PCL?

孤人 提交于 2019-12-17 10:16:09
问题 I've heard of .Net Core .Net Portable .Net Standard .Net Compact Universal Windows Platform Portable Class Libraries All of these were explained to me as "a subset of the full .Net that allows you to target multiple platforms" . So my questions are What's the difference!? If I want to write a library that's usable to as large an audience as possible, which one (or more than one) of these do I need to use? (My specific situation: I have a library that targets .Net 2.0, .Net 4.5, and UWP.

Timer in Portable Library

[亡魂溺海] 提交于 2019-12-17 06:35:19
问题 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 回答1: 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

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

旧时模样 提交于 2019-12-17 04:14:30
问题 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

How do you create a unit test assembly for a .NET Portable Class Library?

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-14 00:42:59
问题 I am attempting to unit test a Portable Class Library that I've created and I want to make sure it's being tested with the same framework subset that it targets. Per the Visual Studio ALM + Team Foundation Server blog, the MSTest unit test framework was converted to a PCL in Visual Studio 2012 RC; however, I am unable to create a portable class library and then reference the MSTest framework in VS2012 RTM. Browsing in the "References" dialog shows me that no unit testing components are

Xamarin.Mac 4.5 with BCL Async release compile fails to resolve System.Threading.Tasks

℡╲_俬逩灬. 提交于 2019-12-13 18:03:34
问题 I have been using .NET 4.5 in Xamarin Studio with portable libraries and a Xamarin.Mac project. When the Xamarin.Mac project is set to .NET 4.5 and Microsoft Async is added via nuget, compile in Debug will succeed but Release/AppStore will fail with error MM2002: Failed to resolve assembly: 'System.Threading.Tasks, In this case, it is unnecessary to add the dlls (System.Threading.Tasks and System.Runtime) from BCL because they are already in .NET 4.5. If you switch to .NET 4.0 it will work,

NSURLSession/NSURLConnection HTTP load failed (kCFStreamErrorDomainSSL, -9801)

♀尐吖头ヾ 提交于 2019-12-13 17:16:44
问题 So I have tried the fixes mentioned in the solutions that come up when I search for this issue but on Visual Studio I still get these issues for my iOS web view project. The android version works fine, but iOS does not load the web page properly. Tried these fixes mainly: NSURLSession/NSURLConnection HTTP load failed (kCFStreamErrorDomainSSL, -9802) I've added this to my Info.plist file: <key>NSAppTransportSecurity</key> <dict> <key>NSExceptionDomains</key> <dict> <key>site.co.za</key> <dict>

Error installing MVVMCross from nuget into a PCL

て烟熏妆下的殇ゞ 提交于 2019-12-13 14:25:48
问题 When I try to install MvvmCross into a new PCL I receive an error. The console log is below: Package Manager Console Host Version 2.5.40416.9020 Type 'get-help NuGet' to see all available NuGet commands. PM> install-package MvvmCross 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

Portable Class Library - you must add a reference to assembly 'System.Net, Version=2.0.5.0

耗尽温柔 提交于 2019-12-13 12:31:36
问题 We have a Portable Class Library targeting 4.0. A WPF application references this which is a standard .NET 4.0 app. The PCL references the System.Net.NetworkCredential class. When we build the .NET 4.0 app we get an error: The type 'System.Net.NetworkCredential' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Net, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e, Retargetable=Yes'. Several posts say to install KB2468871. That