Skip to content

Ensure that markup compilation is run for all design time builds#2004

Merged
wtgodbe merged 1 commit intodotnet:release/3.1from
wpfcontrib:runmarkupcompilationondesigntimebuilds
Oct 5, 2019
Merged

Ensure that markup compilation is run for all design time builds#2004
wtgodbe merged 1 commit intodotnet:release/3.1from
wpfcontrib:runmarkupcompilationondesigntimebuilds

Conversation

@vatsan-madhavan
Copy link
Copy Markdown
Member

Port of #1895
Fixes #1915

/cc @debonte, @davidwengier


Description

In SDK-style projects the project system will combine design time builds together to improve performance, but depending on timing, this can cause issues. If something like the designer asks for output groups, then the build for that could be combined with the build that produces the intellisense file, but getting output groups sets BuildingProject to true, which in turn prevents WPF's markup-compilation from running.

This change works around the issue by allowing the intellisense files to generate irrespective of the value of BuildingProject , as long we're doing a design time build.

Customer Impact

Developers encountering this problem see the following error:

Error: ‘CS0103 - The name ‘InitializeComponent’ does not exist in the current context’

This is usually persistent and doesn't go away upon rebuilds. It can sometimes be overcome by persistently cleaning the project, deleting intermediate files etc., and rebuilding.

We have also been hearing several reports of this on .NET core via //vsfeedback.

Regression

Not a regression. This problem exists in .NET Framework also, but now we understand what's going on and have a fix for this.

Risk

Low risk.
The fix is very simple, safe and easy to test. It has been in master/.NET 5 for a few weeks now.

@vatsan-madhavan vatsan-madhavan added this to the 3.1 milestone Oct 4, 2019
@ghost ghost requested a review from rladuca October 4, 2019 18:06
@ghost ghost added the PR metadata: Label to tag PRs, to facilitate with triage label Oct 4, 2019
@ghost ghost requested a review from SamBent October 4, 2019 18:06
@vatsan-madhavan vatsan-madhavan self-assigned this Oct 4, 2019
@vatsan-madhavan
Copy link
Copy Markdown
Member Author

Marking as *NO MERGE* until shiproom approves merging into release/3.1

@vatsan-madhavan vatsan-madhavan added the * NO MERGE * metadata: The PR is not ready for merge yet (see discussion for detailed reasons) label Oct 5, 2019
@wtgodbe wtgodbe removed the * NO MERGE * metadata: The PR is not ready for merge yet (see discussion for detailed reasons) label Oct 5, 2019
@wtgodbe
Copy link
Copy Markdown
Member

wtgodbe commented Oct 5, 2019

Approved by shiproom/tactics/Steve, merging

@wtgodbe wtgodbe merged commit 17d637d into dotnet:release/3.1 Oct 5, 2019
@vatsan-madhavan vatsan-madhavan deleted the runmarkupcompilationondesigntimebuilds branch October 5, 2019 19:55
@ghost ghost locked as resolved and limited conversation to collaborators Apr 14, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

ask-mode PR metadata: Label to tag PRs, to facilitate with triage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants