The C# team posts answers to common questions and describes new language features
As announced today by Soma, we've just released the first CTP (Community Technology Preview) of the next version of Visual Studio. This is doubly-exciting as this is the first public release of a version of Visual Studio powered by "Roslyn" by default. At BUILD we released the "Roslyn" End User Preview which extends Visual Studio 2013 by replacing some components with their "Roslyn" equivalents but this version of Visual Studio is built from the ground up on "Roslyn" with "Roslyn".
The Visual Studio "14" CTP includes new and improved language and IDE features for C# such as a revamped refactoring experience (including new refactorings):
And the highly requested conditional access (?.) operator*:
*Because this is an experimental language feature, to enable it in a project you must add this element to your .csproj file to enable the "Experimental" language version:
These are just some of the small but powerful enhancements we're building for C# developers and we're far from done. But that's no reason for you to wait. Since we've literally rebuilt the very foundations of C# it couldn't be more critical for us to get your feedback early and often on what you like, don't like, love, and what you want to see more of.
Stay tuned for more posts from the Managed Languages team highlighting new and improved language features and experiences. In the meantime…
And one more thing: Visual Studio side-by-side support is not available on this early build. DO NOT install this CTP (or feed it after midnight) on a machine with any other version of Visual Studio installed.
Anthony D. Green, Program Manager, Visual Basic and C# Languages Team
Awesome. Can't wait to try it. Any information on the "version" of C# 6.0 that is present in this CTP?
The two biggest things I'm looking forward to still are the return of the C# REPL and lambda support while debugging. Are there any plans to use Roslyn to provide language support while editing T4 templates? It seems like it should be much lower-cost for the VS team to do that now with Roslyn.
Agree with support of T4 - powerful feature I like and MUST HAVE support in VS.
C# features also interesting to know, esp. "string expanding" (when you write "My name is $name" and got value of variable 'name').
And I hope anybody did anything to change that ugly and stupid "intellisense", since it's not "intelligent" at all! Just a dumb list of members.
@MgSm88 It would probably be easy enough to provide an extension for T4 templates yourself now. I'm looking into how to make extensions, so maybe you'll see 3rd party support soon enough.
When i try new "roslyn" syntax i can compile it and run but i have in error window errors and lines od code are underlined with red line :// how can i solve this ?
I added <LangVersion>Experimental<LangVersion> to csproj file
I don't understand your question about the C# "version" in the CTP. It's what will eventually be C# 6 but we still have some features we're not 100% about under the "experimental" flag.
No plans around T4. "Roslyn" might enable that experience and it's our goal to make the cost of doing such things must cheaper though we wouldn't be the team building it.
The C# REPL is something we're still working on but we're working on how to give the best possible experience with it that is fully integrated with the power of Visual Studio. We're working on the lambdas thing.
@Anthony D. Green [MSFT]
Hi can you help with my problem too ?
Guys, how did you make it work?? I installed VS2014, made a simple project with "null" feature:
FileStream z = null;
var s = z?.ToString();
But Studio complains "Error 2 Cannot implicitly convert type 'System.IO.FileStream' to 'bool'". And that even despite project settings "Language=C# 6.0"!
I am experiencing the same problem specified here stackoverflow.com/.../no-c-sharp-6-0-in-visual-studio-2014-ctp. Tried the conditional access example in this post on downloaded and installed VS '14' CTP and instance of VM available in Azure.
I added <LangVersion>Experimental<LangVersion> to csproj file as well but with no luck... What am I doing wrong here...I believe I do not have to install Roslyn preview since VS '14' comes with Roslyn by default
@Peter, Thorn, chamindac,
Try using "experimental" with a lower case 'e'. It looks like the setting is case-sensitive. We'd fixed it to be case-insensitive on the build I used when taking that screenshot but it didn't make it into the CTP branch it seems. I'll be updating this post shortly with a fixed screenshot.
@Anthony.... Awesome!!! It works like a charm. Thanks a lot..
Is an Azure deployment available? I don't own a computer that doesn't have VS 2013 on it...
@Jörgen Sigvardsson.. Yes it is available in Azure blogs.msdn.com/.../visual-studio-14-ctp-now-available-in-the-virtual-machine-azure-gallery.aspx
@Anthony D. Green By "version" I just meant which feature set is in this release. Some features have been withdrawn since the Build CTP.
Can you disable the "revamped" refactoring feature? I hate ReSharper because of things poping up every time you move the cursor but now VS looks like it's doing the same distracting behavior.
It also says that "this" can be removed from method calls, yet StyleCop enforces it to be there (again, this was another reason ReSharper never lasted more than two days on my machine). If there's no option to disable that light bulb, will it at least be possible to say to never prompt again for a refactoring as an option in the drop down menu that appears?
Sorry to be so negative but I can't use the CTP in its current state.
Hi there. Just installed the VS 14 CTP but I cannot find the Roslyn templates. I was hoping to find something similar to what the End User Preview installs into VS 13.
Can I install the End User preview into VS 14 CTP ?