3

I have Visual Studio 2015, but can't get the new VB language features to work. Or to show up. It's like the product came without it. The null-coalescing operator doesn't work, read-only auto-properties aren't allowed, etc. This is true even when I set up a brand new project, targeting any version of the framework (which shouldn't matter, but I'm trying everything I can think of).

I've got Resharper 9 installed. Following a suggestion in this question, if I select the project, the VB Language Level dropdown list doesn't show anything more recent than "Visual Basic .NET 12".

There are no LangVersion tags anywhere in the .vbproj files. If I add them it seems to make no difference.

I was under the impression that you didn't have to install anything separately for VB 14, just use VS 2015 and you'll have it (C# 6 actually is available and working in C# projects) but it's not there.

Anybody have any ideas what else I can look for?

Community
  • 1
  • 1
Rich
  • 2,322
  • 1
  • 16
  • 14
  • Silly question - are you _sure_ it's VS 2015? What does Help -> About say? – James Thorpe Sep 02 '15 at 18:11
  • Presumably you do have .net 4.6 installed? – Dom Sinclair Sep 02 '15 at 18:11
  • Help --> About says Microsoft Visual Studio Professional 2015, as one would expect. Version 14.0.23107.0 D14REL. I do have .NET 4.6 installed. It installed as part of the VS 2015 install, I assume, but it's definitely there and I can target projects to it. – Rich Sep 02 '15 at 18:15
  • Existing projects or new ones? Can yo share the first propertygroup section of your .vbproj in the question? What .NET framework are you targeting in your project? – jessehouwing Sep 05 '15 at 16:09
  • Related: http://stackoverflow.com/questions/31454902/restrict-new-language-features-of-visual-basic-in-visual-studio-2015/31455783#comment52680789_31455783 – jessehouwing Sep 05 '15 at 16:09
  • Which framework is your project targeting? – jessehouwing Sep 07 '15 at 06:55
  • Any version up to 4.6. When I noticed the problem I was working on 4.5.1, but a new project targeting 4.6 does it too. – Rich Sep 07 '15 at 20:23

1 Answers1

5

It's Resharper.

I'm using Resharper 9.2 Ultimate. Resharper is what's putting all the error messages into the code editor. If I suspend it, all the problems go away, and the code compiles and runs exactly as it should.

I should have taken a cue from the fact that the VB Language Level isn't showing the latest version of VB.

Off to contact technical support.

Rich
  • 2,322
  • 1
  • 16
  • 14