.Net 2015 References with yellow triangle for Nuget packages on portable libraries
If you’ve received no output errors during install and there are no Warnings on build/rebuild. Simply: Restart Visual Studio
If you’ve received no output errors during install and there are no Warnings on build/rebuild. Simply: Restart Visual Studio
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 … Read more
You could try wrapping it in a lambda function: MyPCL.PCLDebug.LogLine = s => { System.Diagnostics.Debug.WriteLine( s ); };
David Kean’s comment here gave me the answer I’m using for the moment: or remove the <ProjectTypeGuid> element entirely – this will opt you of “portable” enhancements, such as a UI for changing the target framework, etc I’ve tried that, and it works like a dream. On machines which have everything appropriately installed, you can … Read more
No can do. When someone expects a Func<T> f you can assume it will be invoked with something like result = f() – i.e., it does not know about async behavior. If you cheat it by using .Result like you have, it will deadlock on UI thread because it wants to schedule the code after … Read more
In the Views\Web.config file, add the following code under the <system.web> section: <compilation debug=”true” targetFramework=”4.5″> <assemblies> <add assembly=”System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a” /> </assemblies> </compilation> There are a bunch of other assemblies you may also need to reference, depending on what types your portable code is using. You can either add each one as you encounter … Read more
There’s been some issues with Xamarin frameworks in the past, but try doing something like this; https://github.com/AutoMapper/AutoMapper/blob/93f276fea36dedb2efd861096f881667af880d58/src/AutoMapper/project.json See if this works: { “frameworks”: { “.NETPortable,Version=v4.0,Profile=Profile328”: { “frameworkAssemblies”: { … } } } }
Portable Class Libraries (PCLs) now officially deprecated [16 August 2017] If you’re sharing code between different .NET implementations today, you’re probably aware of Portable Class Libraries (PCLs). With the release of .NET Standard 2.0, we’re now officially deprecating PCLs and you should move your projects to .NET Standard. Source: Announcing .NET Standard 2.0 Portable Class … Read more
Although it might be late to answer this question but I’ve faced a similar problem and the following code worked for me. HttpRequestMessage request = new HttpRequestMessage { Content = new StringContent(“[YOUR JSON GOES HERE]”, Encoding.UTF8, “application/json”), Method = HttpMethod.Delete, RequestUri = new Uri(“[YOUR URL GOES HERE]”) }; await httpClient.SendAsync(request); UPDATE on .NET 5 .NET … Read more
Yes, you can create a new HttpRequestMessage, set all the properties you need to, and then pass it to SendAsync. var request = new HttpRequestMessage() { RequestUri = new Uri(“http://example.org”), Method = HttpMethod.Post, Content = new StringContent(“Here is my content”) } request.Headers.Accept.Add(…); // Set whatever headers you need to var response = await client.SendAsync(request);