Can I get a “sometimes portable” class library project to load in Visual Studio Express?

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

Portable Class Library in MVC 4 / Razor with Visual Studio 2012 RC?

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

Portable class library: recommended replacement for [Serializable]

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

How to send DELETE with JSON to the REST API using HttpClient

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

Modify request headers per request C# HttpClient PCL

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);

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)