Version Used:
Version 16.0.0 Preview 1.0 [28321.56.d16.0]
Steps to Reproduce:
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFrameworks>net45;net46</TargetFrameworks>
</PropertyGroup>
</Project>
Expected Behavior:
Context to be changed
Actual Behavior:
Context is flipped back to the previous context.
This is a regression from 15.9.
@jasonmalinowski As part of this change, this line of code https://github.com/dotnet/roslyn/blob/master/src/VisualStudio/Core/Def/Implementation/LanguageService/AbstractLanguageService%602.IVsContainedLanguageFactory.cs#L50 needs to be changed to a IsNullOrEmpty. The hierarchy you are querying is the real one now with https://github.com/dotnet/project-system/pull/4419 and it a IWebFileCtxService service from the web team that returns "" from GetIntellisenseProjectName.
@davkean I don't mind changing that, but why are we seeing this now? Was a "if empty, convert to null" being done somewhere else?
(That check is at _least_ 4 years old, hence my surprise for the need now.)
I've already fixed this myself so don't worry about making the change.
The hierarchy that was previously being checked here was the "fake" one - which caused the GetItemContext to fail.
Do we have an ETA for when this will be fixed? This bug is preventing me from using Dev16 on a number of fixes.
@jaredpar (and others) the PR is now out for this #32313. It'll probably be a few days before it's merged in just because it's a tricky thing to review.
Closing, as this is now merged into Roslyn. @jaredpar the bits were inserted today for Preview 2, so you should see this in a new dogfood build in the next day or two.
Most helpful comment
@jaredpar (and others) the PR is now out for this #32313. It'll probably be a few days before it's merged in just because it's a tricky thing to review.