Unable to connect to localDB in VS2012 – “A network-related or instance-specific error occurred while establishing a connection to SQL Server…”

Any chance it is because you forgot to double-escape the backslash? Did you try this: “Data Source=(LocalDB)\\v11.0;Integrated Security=true” Or even better, you could just use the @ mark to disable character escaping for the entire connection string: @”Data Source=(LocalDB)\v11.0;Integrated Security=true”

Which versions of SSL/TLS does System.Net.WebRequest support?

When using System.Net.WebRequest your application will negotiate with the server to determine the highest TLS version that both your application and the server support, and use this. You can see more details on how this works here: http://en.wikipedia.org/wiki/Transport_Layer_Security#TLS_handshake If the server doesn’t support TLS it will fallback to SSL, therefore it could potentially fallback to … Read more

Differences between .NET 4.0 and .NET 4.5 in High level in .NET

What is new in .NET Framework 4.5 & What’s new and expected in .NET Framework 4.5: Support for Windows Runtime Support for Metro Style Applications Support for Async Programming Garbage Collector Improvements Faster ASP.NET Startup Better Data Access Support WebSockets Support Workflow Support – BCL Support differences in ASP.NET in these frameworks Compare What’s New … Read more

What does the Microsoft.Bcl.Build NuGet package do?

From looking at Microsoft.Bcl.Build.targets, it has a bunch of project configuration targets, eg: EnsureBindingRedirects – Determine which references are opted in for binding redirects, and update the app.config with them BclBuildValidateNugetPackageReferences – This target validates that any Nuget packages installed in the current project also have their dependencies (transitive dependencies) installed in the current project. … Read more

Thread parameters being changed

You should be careful about accidentally modifying captured variables like i after starting the thread, because the i is shared. The i variable refers to the same memory location throughout the loop’s lifetime. The solution is to use a temporary variable like this: for (int i = 0; i < _threadCount; i++) { var i1 … Read more

How to reliably detect the actual .NET 4.5 version installed?

MS recently patched .NET 4.5 to restore backwards compatibility with .NET 4.0 in some scenarios (see http://blogs.msdn.com/b/dotnet/archive/2012/10/17/net-framework-4-5-off-to-a-great-start.aspx). It’s possible that MS updated the setup with these changes (so that users upgrading to .NET 4.5 don’t run into compat trouble), though I don’t know why they wouldn’t change the version number on the setup. Also, note … Read more

Does C# 7.0 work for .NET 4.5?

Let’s go through the features new in C# 7.0: Tuples: The System.ValueTuple package has a version for the portable-net40+sl4+win8+wp8 profile. That means it is usable on .Net 4.0. (Not sure why dependencies list only .Net 4.5.) If you wanted to use tuples on even lower versions of .Net, it should still work, as long as … Read more

Why does List implement IReadOnlyList in .NET 4.5?

Because List<T> implements all of the necessary methods/properties/etc. (and then some) of IReadOnlyList<T>. An interface is a contract that says “I can do at least these things.” The documentation for IReadOnlyList<T> says it represents a read-only collection of elements. That’s right. There are no mutator methods in that interface. That’s what read-only means, right? IReadOnlyList<T> … Read more