0

Are async/await keywords only usable with VS 2012+ and not usable with the C# compiler, which I could use from command line?

I've read some questions at SO, like:

Will VS 2010 allow me to use the new async and await keywords in C#?

But, I don't really understand how such keywords which must be connected only with such stuff as the compiler/interpreter are connected with the IDE. How it could be?

So if I want to use these features without VS 2012 the single solution is CTP for 2010?

It doesn't sound like a clear logic. Keywords which are linked with the language semantics must be independet from the such stuff as IDE. Interoperability is a main feature for such products, isn't it?

Community
  • 1
  • 1

1 Answers1

0

Are async/await keywords only usable with VS 2012+ and not usable with the C# compiler, which I could use from command line?

No, it's fine to build with csc.exe from the command line, so long as it's the C# 5 compiler (as shipped with .NET 4.5).

If you want to develop in Visual Studio though, you'll need to get VS2012 or later. (I really wouldn't use the CTP at this point - there were various bugs fixed in the real release, and there's no need to go through the pain of them now.)

Don't forget there's always the Express range of Visual Studio editions, which are free.

Jon Skeet
  • 1,421,763
  • 867
  • 9,128
  • 9,194
  • Couldn't I just to change some options to make VS2010 be able to work with the C# 5 compiler, as it could be easily done for C++ projects in VS? –  Oct 02 '13 at 12:44
  • 2
    @GeloVolro: Not that I'm aware of. The C# compiler is fairly closely tied to the IDE. You could *potentially* force the project to use the newer compiler in MSBuild, but it wouldn't be a pleasant experience - I wouldn't expect Intellisense to work, as a first example. – Jon Skeet Oct 02 '13 at 12:45