Questions tagged [.net-4.5]

Version 4.5 of the Microsoft .NET Framework. Use for questions specifically related to .NET Framework 4.5. For questions on .NET Framework generally, use the .net tag.

Reference

3775 questions
153
votes
6 answers

Where is the .NET Framework 4.5 directory?

I've installed Windows 8, Visual Studio 2012 but don't have a v4.5 directory in %WINDIR%\Microsoft.NET\Framework. Have I done something wrong, or is .NET 4.5 different from others? If it's because I have not installed the tools, is there a set of…
Nick Randell
  • 17,805
  • 18
  • 59
  • 74
152
votes
2 answers

How does Task become an int?

We have this method: async Task AccessTheWebAsync() { HttpClient client = new HttpClient(); Task getStringTask = client.GetStringAsync("http://msdn.microsoft.com"); // You can do work here that doesn't rely on the string…
Freeman
  • 5,691
  • 3
  • 29
  • 41
146
votes
6 answers

Run two async tasks in parallel and collect results in .NET 4.5

I've been trying for a while to get something I thought would be simple working with .NET 4.5 I want to fire off two long running tasks at same time and collect the results in in the best C# 4.5 (RTM) way The following works but I don't like it…
Simon_Weaver
  • 140,023
  • 84
  • 646
  • 689
132
votes
3 answers

Is async HttpClient from .Net 4.5 a bad choice for intensive load applications?

I recently created a simple application for testing the HTTP call throughput that can be generated in an asynchronous manner vs a classical multithreaded approach. The application is a able to perform a predefined number of HTTP calls and at the end…
Florin Dumitrescu
  • 8,182
  • 4
  • 33
  • 29
113
votes
29 answers

The type or namespace name 'System' could not be found

I have the following errors (and more) in all my views (*.cshtml) when opening my project in Visual Studio 2015 Professional. Error CS0246 The type or namespace name 'System' could not be found (are you missing a using directive or an assembly…
Hélder Gonçalves
  • 3,822
  • 13
  • 38
  • 63
109
votes
2 answers

HttpClient.GetAsync with network credentials

I'm currently using HttpWebRequest to get a website. I'd like to use the await pattern, which is not given for HttpWebRequests. I found the class HttpClient, which seems to be the new Http worker class. I'm using HttpClient.GetAsync(...) to query my…
Jan K.
  • 2,542
  • 2
  • 21
  • 30
104
votes
15 answers

Can Visual Studio 2012 be installed side-by-side w/ Visual Studio 2010?

Will Visual Studio 2012 interfere/break .NET 4 and/or Visual Studio 2010 if installed side-by-side on the same instance of Windows?
101
votes
3 answers

Proper way to implement a never ending task. (Timers vs Task)

So, my app needs to perform an action almost continuously (with a pause of 10 seconds or so between each run) for as long as the app is running or a cancellation is requested. The work it needs to do has the possibility of taking up to 30…
Josh
  • 2,083
  • 5
  • 23
  • 28
96
votes
1 answer

Cannot use a lambda expression as an argument to a dynamically dispatched operation without first casting it to a delegate or expression tree type

I am working with .NET4.5 and VS2013, I have this query that gets dynamic result from db. dynamic topAgents = this._dataContext.Sql( "select t.create_user_id as \"User\", sum(t.netamount) as \"Amount\" from transactiondetail t where…
Matas Vaitkevicius
  • 58,075
  • 31
  • 238
  • 265
90
votes
2 answers

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

I'm unable to find any documentation on this - the links from the Microsoft.Bcl.Build Nuget page don't provide much help: This package provides build infrastructure components so that projects referencing specific Microsoft packages can…
crimbo
  • 10,308
  • 8
  • 51
  • 55
88
votes
6 answers

Is it possible to run a .NET 4.5 app on XP?

First, I have read the following: Connect case VS case and especially this channel9 post So, from the last bullet, I really think there is no way around this, but I had to see if I could get a definitive answer as my team would like to upgrade…
Justin Pihony
  • 66,056
  • 18
  • 147
  • 180
87
votes
5 answers

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

Eager to know Differences between .NET 4.0 and .NET 4.5 in High level in .NET and also differences in ASP.NET, C# also in these frameworks
venkat
  • 5,648
  • 16
  • 58
  • 83
85
votes
13 answers

How to 'await' raising an EventHandler event

Sometimes the event pattern is used to raise events in MVVM applications by or a child viewmodel to send a message to its parent viewmodel in a loosely coupled way like this. Parent ViewModel searchWidgetViewModel.SearchRequest += (s,e) => { …
Simon_Weaver
  • 140,023
  • 84
  • 646
  • 689
82
votes
3 answers

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

Now that SSL 3 has been found to be vulnerable to the POODLE attack: Which versions of SSL/TLS does System.Net.WebRequest use when connecting to any https Uri? I use WebRequest to connect to several 3rd party API's. One of these has now said they…
JK.
  • 21,477
  • 35
  • 135
  • 214
82
votes
4 answers

What's the difference between InvokeAsync and BeginInvoke for WPF Dispatcher

I noticed in .NET 4.5 that the WPF Dispatcher had gotten a new set of methods to execute stuff on the Dispatcher's thread called InvokeAsync. Before, .NET 4.5 we had Invoke and BeginInvoke which handled this syncronously and asynchronously…
Isak Savo
  • 34,957
  • 11
  • 60
  • 92