roslyn: The project context navigation bar doesn't cause classification to update.
Short project setup (internal only):
- Copy the
Closed\Test\Files\SharedProjectCS
directory from our internal sources to another location (e.g., Desktop.) - Open
TestProj.sln
. - Open
Class2.cs
from the shared project.
Long project setup (manual):
- Create a new Windows app.
- Add a new WindowsPhone app to the solution.
- Add a shared project to the solution that both Windows and WindowsPhone apps reference.
- Add a file to the shared project with the body:
namespace TestNamespace
{
public class TestClass
{
#if WINDOWS_PHONE_APP
public void PhoneMethod(bool b) { }
#elif WINDOWS_APP
public void WinMethod(int i) { }
#endif
}
}
Rest of the repro steps:
- With the shared file open, verify that changing the project context navigation bar causes the classification inside the
#if/#elif/#endif
block to change. - Close the shared file.
- Re-open the shared file.
- Change the project context navigation bar.
Result: The classification no longer changes.
(This failure is visible in the internal-only CSharpSharedProjects
integration test.)
About this issue
- Original URL
- State: closed
- Created 9 years ago
- Comments: 16 (16 by maintainers)
Echoing Oren here, in getting this every day and it’s extremely annoying. It turns Visual Studio into notepad for the #ifdef sections that it bugs on. Please give this bug the severity of the impact it has.
I see that this bug is pretty old. I realize it’s too late for 2017 RTM but please don’t keep pushing it back, please see if you can get it into the first update.
It makes it really hard to work with multi-targeted projects when the context is missing.