Only report designer attributes for the primary project of a multi-project config.#44270
Merged
CyrusNajmabadi merged 6 commits intodotnet:masterfrom May 16, 2020
Merged
Conversation
Member
jasonmalinowski
left a comment
There was a problem hiding this comment.
Structure is fine but I admit I'm really confused about the tri-state handling...
src/VisualStudio/Core/Def/Implementation/ProjectSystem/VisualStudioProject.cs
Outdated
Show resolved
Hide resolved
src/VisualStudio/Core/Def/Implementation/ProjectSystem/VisualStudioProject.cs
Outdated
Show resolved
Hide resolved
jasonmalinowski
approved these changes
May 15, 2020
aa5ea3d to
d77f4d9
Compare
davkean
added a commit
to davkean/project-system
that referenced
this pull request
Sep 1, 2020
Fixes: https://devdiv.visualstudio.com/DevDiv/_workitems/edit/961596 Roslyn is responsible for applying SubType to Forms, Components and other types. In multi-targeted projects, the same file can have conflicting "sub types": #if NET45 class MyComponent : Form #else class MyComponent : Component #endif This results Roslyn pushing "Form" when it encounters scans the first definition and "Component" when it encounters the second definition. There is no guaranteed order to which one of these get scanned first, so this can result in the same time having a different sub type every time Roslyn does analysis. Sub Type affects the designer and icon that a type gets, so this results in a type that flickers between two different icons. This was worse before dotnet#5880 as we'd see the sub type change and go back to Roslyn to add/remove the file, resulting in a constant churn. This longer occurs, but we still have the fighting sub type dance whenver the file content changes. To fix this, Roslyn will now only scan the the primary context: dotnet/roslyn#44270. This change plumbs through this property by finding the context that lives in the "active configuration" and passing this through to Roslyn.
Member
|
Note, our counter change is here: dotnet/project-system#6567. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Roslyn part of https://devdiv.visualstudio.com/DevDiv/_queries/edit/961596/?triage=true
Project system still needs to do work once this is in.