.net-4.6 Questions

3

Solved

I have a (ReadOnly)Span<byte> from which I want to decode a string. Only in .NET Core 2.1 I have the new overload to decode a string from it without needing to copy the bytes: Encoding.GetS...
Newborn asked 18/1, 2019 at 14:19

5

Solved

I am curious what is the purpose of the HttpClientFactory class. There is no description of why it exists on MSDN (see link). There are Create methods with more specialized arguments, but mostly I ...
Eonian asked 24/9, 2013 at 8:1

4

Solved

We are still using VS 2010 SP1 to develop a large scale LOB ASP.NET web application. The infrastructure folks are looking at pushing .NET 4.6 (and the targeting pack to devs) to the desktop and I a...
Stadiometer asked 27/10, 2015 at 21:34

5

Solved

What is the equivalent of yield return null; in Coroutine (that run each frame at Update) in an async method ? The nearest I got to find is await Task.Delay(1);, but it DO NOT run every frame. pr...
Eligibility asked 23/12, 2017 at 13:38

10

Solved

When using Visual Studio Enterprise 16.3.7 on two separate machines, one builds fine and the other machine throws the error: Feature 'using declarations' is not available in C# 7.3. Please use lan...
Genevieve asked 30/10, 2019 at 11:14

3

Solved

This blog post mentions the new Task APIs, including a new Task.CompletedTask property introduced in .NET 4.6. Why was this added? How is this better than, say, Task.FromResult(whatever)?
Shadowy asked 27/5, 2015 at 20:59

3

Solved

After installing VS 2015, running csc.exe from command line causes this message to be displayed to console: This compiler is provided as part of the Microsoft (R) .NET Framework, but only suppo...
Dyslogistic asked 7/8, 2015 at 10:45

1

Solved

I'd like to use BenchmarkDotNet on some legacy code I'm working with right now. It is written in C# Net462. It is a big, old and complex system and I'd like to Benchmark some methods inside some sp...
Fleda asked 31/7, 2022 at 10:5

5

Solved

How can I install the .NET 4.0 Framework in Windows 10? .NET 4.6 is already installed but I want to have .NET 4 Framework (without modifying the registry). Turning on and off Windows features in c...
Inconvertible asked 1/3, 2016 at 20:40

5

Solved

There is a similar question to this here but I believe that involves a different cause. I moved a class from a newer project into an older project. Both were targeting .net 4.6 however after the m...
Zitella asked 28/2, 2016 at 19:8

4

Solved

I've seen many posts and answers regarding how to mark a field as the identity column. Many of them are outdated and are targeting older versions of Entity Framework. Some resources tell me to use...

4

Solved

I have a C# program that uses both winforms and WPF and I'm struggling to get it to work in high DPI environments. Currently, if I remove all WPF projects from the solution and run it, it will scal...
Hun asked 20/1, 2016 at 13:1

3

I'm trying to disable a code analysis rule across an entire class, but NOT for the entire project, just a single class. In the example below, the build generates a CA1822 warning because it thinks ...
Preterit asked 7/7, 2016 at 13:21

6

Solved

I am trying to target .NET 4.6 and also take advantage of the latest C# version by changing the C# language version to 6. However during compilation I got this error: Error Invalid option '6' f...
Malchy asked 7/8, 2015 at 2:32

2

Solved

I am using Visual Studio 2017. I created a .NET Standard library (let this library be Lib1) project with two Target frameworks, netstandard2.0 and net46. Then I have another two projects... one is ...
Hopple asked 16/7, 2018 at 14:41

3

Solved

I've done this Unit Test and I don't understand why the "await Task.Delay()" doesn't wait ! [TestMethod] public async Task SimpleTest() { bool isOK = false; Task myTask = new Task(async () =&...
Gama asked 15/11, 2019 at 9:0

4

Solved

I'm writing a class library for a simple parser in C#. When I first created it, I used .NET standard 2.0, but now I need to migrate it to .NET 4.6 both to conform to the other projects in my soluti...
Merkel asked 5/7, 2018 at 14:28

1

Solved

According to .net guidance of TLS protocol programming, it suggests to config security via appcontext switch when your project targets on .net 4.6. This way works when add appcontext in app.config ...
Jalousie asked 12/8, 2018 at 9:2

9

Solved

I'm trying to set the 4.6 .NET framework for my project and in the settings, as it wasn't listed, I chose the last option - to install more frameworks. That directed me to a page where I selected V...
Skiagraph asked 5/8, 2015 at 14:58

1

Solved

WPF never ended up supporting XAML 2009, which is a shame because it added some useful extensions, such as generic type parameters and complex x:Key values. UWP seems to have built upon WPF. Does ...
Leisha asked 1/8, 2015 at 23:28

3

Solved

.NET 4.6 introduces the AsyncLocal<T> class for flowing ambient data along the asynchronous flow of control. I've previously used CallContext.LogicalGet/SetData for this purpose, and I'm wond...
Bicycle asked 29/7, 2015 at 17:34

2

Solved

I'm trying to setup an app on an Azure instance that another developer created. I'm trying to user a service that looks like it requires .NET 4.5 and is not compatible with 4.6... for some reason....
Gratia asked 15/2, 2017 at 19:30

2

Solved

The scenario is as follows: a device communicating over is considered connected if it makes a callback to the server within a short period of time. I want to create a class that encapsulates the fu...
Postcard asked 15/11, 2017 at 12:59

3

Solved

I am looking for a clean and short way to deserialize a XmlDocument object. The closest thing I found was this but I am really wondering if there is no nicer way to do this (in .NET 4.5 or even 4.6...
Crisis asked 2/2, 2015 at 17:30

1

Solved

Windows 10 and Windows Server 2016 introduced the SO_REUSE_UNICASTPORT socket option. It was made available for use in .NET starting from version 4.6 via the ServicePointManager.ReusePort static pr...
Fick asked 14/6, 2017 at 15:5

© 2022 - 2024 — McMap. All rights reserved.