19

When the new async and await features go live, will I be able to use them in Visual Studio 2010, or will I need to have Visual Studio?

What I'm asking is this: will Microsoft maintain language feature parity between VS 2010 and VS 11? The CTP is a preview, solid or not, and our customers don't want us using technology that is perceived to be incomplete or untested - so despite the licensing I can't use it.

My employer is not purchasing VS 11, so I need to know whether or not I'm wasting my time writing code with async and await.

Erik Forbes
  • 35,357
  • 27
  • 98
  • 122
  • 3
    What's wrong with using the Async CTP? It is very solid in its 3rd release. – Doguhan Uluca Apr 06 '12 at 15:22
  • @duluca Nothing's wrong with it, it's just a culture / politics issue. =( – Erik Forbes Apr 06 '12 at 15:28
  • @ErikForbes - assuming that means 'requires official support' then it's going to mean VS11, sorry. – James Manning Apr 06 '12 at 15:30
  • @ErikForbes Yeah I get that, but the team that wrote Async CTP (at least the lead of it) invented C# itself - so if I were to trust any kind of unsupported code, this would be 'the one'. – Doguhan Uluca Apr 06 '12 at 15:47
  • @duluca unfortunately it's not a matter of trust. – Erik Forbes Apr 06 '12 at 15:54
  • @ErikForbes That just opens up a whole can of worms that I will leave untouched. I was working for a company like that before and I will never work for a company like that again. Async has saved me so much time, its monetary benefits alone would be enough to hire another developer. But let corporate geeks that don't understand software continue to be corporate geeks. – Doguhan Uluca Apr 06 '12 at 18:06
  • @duluca - it's not the company, it's the customer. =P – Erik Forbes Nov 06 '12 at 16:32
  • @DoguhanUluca Once i install Async CTP what is the dll i have to add? – Pomster Oct 01 '14 at 17:39
  • @Pomster I'm sorry, it's been way too long since I've worked with VS2010 and I don't have a sample code base I can look at for this. But if memory serves me right the words async and ctp is in the DLL. I recommend using the Search Everything tool to find the DLL in your system. – Doguhan Uluca Oct 02 '14 at 16:27

5 Answers5

13

Right now the Async CTP allows for you to use the new awaits and async syntax in Visual Studio 2010. It's common for the language teams to provide CTPs for the current version of Visual Studio when demonstrating new features. It's a great way to let developers experiment and give feedback to the language team.

However for the final release the new language features are typically only made available for the next version of Visual Studio (Dev11 in this case). They aren't back ported to the previous version of Visual Studio.

This pattern of CTP in current release and final in next has happened before with LINQ. It's almost certain to repeat with awaits

JaredPar
  • 733,204
  • 149
  • 1,241
  • 1,454
  • This is what I expect as well, but it'd be nice to see some official communication from Microsoft about this so that I can share it with management. – Erik Forbes Apr 06 '12 at 15:29
  • 3
    @ErikForbes if i were communicating with management my message would be that the back porting of IDE support for a new language feature to a previous version of Visual Studio has not ever happened in C# or any other language. It would take a rather large effort to do so across several teams at Microsoft. I'd be extremely shocked if this happened. – JaredPar Apr 06 '12 at 15:33
  • as would I, but in the absence of a statement from Microsoft, anything's possible. =P – Erik Forbes Apr 06 '12 at 17:15
  • @JaredPar What is the DLL called, i installed the Async CTP but can't find what the ddl is called. – Pomster Oct 01 '14 at 17:26
10

Just install the Async CTP, reference the dll in your project and you can use async and await. Or install VS11 and use it directly with .Net 4.5. If you want to use it in production anytime soon i'd go with the first option.

EDIT: For anyone still looking this up. If at this point you still have an .Net 4.0 application and want to use all the async features of .Net 4.5, there has been a Nuget Package called Microsoft Async. You only need to have at least Visual Studio 2012. With that package you won't have to fiddle around installing the Async CTP when you already have VS2012. (Also, installing the Async CTP side-by-side with VS2012 doesn't really work from what i've tried)

shriek
  • 5,157
  • 2
  • 36
  • 42
  • @shriek Whats the Async CTP ddl called, i have installed it but can't find the ddl? – Pomster Oct 01 '14 at 17:30
  • @Pomster If you installed the old Async CTP you don't need do add any dll, you can use async and await in visual studio right away. – shriek Oct 03 '14 at 15:00
1

You can use them in 2010. I ran the developer preview in 2010 with no problems. Resharper however didn't recognize the keywords but they have (or will) be remedying that in later releases.

devshorts
  • 8,572
  • 4
  • 50
  • 73
  • 1
    @devshorts - FWIW, 6.1 was when it was added - see the post @ http://blogs.jetbrains.com/dotnet/2011/11/async-ctp-support-in-resharper-61/ – James Manning Apr 06 '12 at 15:26
0

Due to the scope of changes it would mean, it's extremely unlikely to make it back to VS2010 as an official release.

As others have commented, though, you can use the CTP fine. If your concern is around it being officially supported, though, it's almost certainly going to mean using VS11 (the Beta has a go-live license, FWIW)

James Manning
  • 13,429
  • 2
  • 40
  • 64
0

As i understand it, the new functionality will be part of C# 5.0. As per the past releases to the framework and programming languages, they were available with the new studio release that usually came together with this.

However, in the past we have been able to use newer C# features by referencing the library that holds them, therefore this may become possible by referencing something required.

ericosg
  • 4,926
  • 4
  • 37
  • 59
  • Just referencing a library won't give you any new language features, you need to modify the compiler for that. – svick Apr 06 '12 at 15:36