portable-class-library

Why doesn't new WSA Reflection API contain methods to get members with particular bindings?

偶尔善良 提交于 2019-12-10 22:03:45
问题 Consider properties for example. In old API I could call Type.GetProperties(BindingFlgas.Static | BindingFlags.Public); But with TypeInfo I have either DeclaredProperties or GetRuntimeProperties() which return PropertyInfo instances. But PropertyInfo does not contain IsStatic , IsPublic properties. To know this I first need to get Get or Set-method and check its properties. It is said that new reflection API is more sound in architecture and performance ways. But It's hard to believe in it.

Debugger does not recognize variable for return value of awaited method

我怕爱的太早我们不能终老 提交于 2019-12-10 20:41:39
问题 I have this very simple code in portable class library targeted to .NET 4.5 and Windows Store Apps: HttpResponseMessage response = await _httpClient.PostAsync(uri, content); response.EnsureSuccessStatusCode(); When I put breakpoint on the second line and run my application the breakpoint is correctly hit but I cannot investigate response in the debugger because it reports: The name 'response' does not exist in the current context I'm not sure how much is it related but I also had to disable

Class Library (Legacy Portable)?

倾然丶 夕夏残阳落幕 提交于 2019-12-10 20:02:45
问题 I have one PC with Microsoft Visual Studio Community 2017 Version 15.2 and it has a project template for Class Library (Portable). Another PC with Version 15.3.1 has a template for Class Library (Legacy Portable). Are PCLs now legacy ? Any current news on what I should be using instead ? 回答1: Well, "should", I won't say that without seeing exactly what you're doing but yes, PCLs are now "legacy", the new way is .NET Standard and .NET Core. Please note that legacy does not mean "will stop

include XPathSelectElement in portable class library

陌路散爱 提交于 2019-12-10 20:00:05
问题 How can I use XPathSelectElement in a portable class library? When I try to include System.Xml.XPath assembly in the project, I get the following error: The type 'System.Xml.Linq.XElement' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Xml.Linq, Version=2.0.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. My portable class libraries already have a reference to System.Xml.Linq . 回答1: Unfortunately, MSDN is showing that, as of .NET 4.5,

Referenced assemblies automatically replaced by visual studio

感情迁移 提交于 2019-12-10 19:21:49
问题 I have 2 projects, a Portable class library and a regular unit test project. In the Portable class library, I use NuGet to reference the Microsoft.BCL Portability pack, which comes with 2 assemblies ( System.Threading.Tasks.dll and System.Runtime.dll both v1.5). However, when I try to reference these same dlls in my unit test project (both with NuGet and manually browsing to the directory \packages\Microsoft.Bcl.1.0.19\lib\portable-net40+sl4+win8+wp71 ), visual studio automatically points the

PCL project not compiling after updating all the installed NuGet portable libraries

随声附和 提交于 2019-12-10 19:07:05
问题 Everything was working fine in my Portable-Class-Library project until I updated all the installed portable libraries. It has stopped compiling. Throws the following errors for the nuget libraries installed. C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1605,5): warning MSB3268: The primary reference "System.Threading.Tasks" could not be resolved because it has an indirect dependency on the framework assembly "System.Runtime, Version=2.6.3.0, Culture=neutral,

Unable to alter PCL library Target Frameworks

自闭症网瘾萝莉.ら 提交于 2019-12-10 17:12:53
问题 I am running Visual Studio 2012 plus Xamarin.iOS with the latest version of each. I have Portable Class Libraries in which I want to select the latest "Xamarin.iOS" release as a build target (instead of MonoTouch). In Visual Studio I open up the Project's Properties, select the Library tab, and click on Change under Target Frameworks. However, I am unable to modify any of the checkboxes. Any checkbox I change instantly closes the "Change Target Frameworks" dialog. If I change one of the

HttpClient PCL Cookies Not Being Applied to Requests

筅森魡賤 提交于 2019-12-10 16:55:42
问题 I'm using .NET HttpClient for PCL (2.2.15) for a common library across Windows Phone 8, Windows 8, and .NET 4.5. However, I don't see cookies being applied to requests. I'm setting up the HttpClient and HttpClientHandler using the following code. HttpClient is a property on the wrapping class. CookieContainer = new CookieContainer(); var handler = new HttpClientHandler { AllowAutoRedirect = true, CookieContainer = CookieContainer, Credentials = client.CredentialCache, UseCookies = true,

Could not load file or assembly 'System.Net.Http, Version=4.0.0.0'

丶灬走出姿态 提交于 2019-12-10 16:38:18
问题 I don't know what I did, but I may have removed System.Net.Http 4.0.0.0 from the GAC. I have a Windows Portable Library that targets WinRT that was compiling and working fine, and now I get the following error every time I try and run it Could not load file or assembly 'System.Net.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.":"System.Net.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken

How to hide the empty rows of a list view in xamarin.forms

北慕城南 提交于 2019-12-10 13:44:49
问题 I have a StackLayout with a ListView and I have an add-button that I want to display right under the ListView . But the ListView displays many rows which are not used. Just empty rows, this is forcing my button to display at the bottom of the page. I've been messing with the VerticalOptions all day but cannot get the rows to disappear. This is my XAML code : <?xml version="1.0" encoding="utf-8" ?> <ContentPage xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com