Make sure to compile SCSS files only once for multi target projects (attempt #2) #217
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.
This is the second attempt to fix #209 (first attempt is #215).
It seems to work fine at first glance:
The problem with the approach of this PR occurs when solution contains a project targeting multiple frameworks that is also being referenced from a project that is targeting a single framework only. In this case the project targeting multiple frameworks gets built twice for the same target framework (as the parameters for building for this target framework are different between being built as referenced project and the inner build) resulting in errors when MSBuild tries to access the same file simultaneously.
Example building
MudBlazor.sln:The project
MudBlazor.csprojgets built three times, twice fornet9.0:This results in the following failure most of the time:
Occasionally the build succeeds, sometimes it also fails when accessing other files:
All in all this is not a solution. I just wanted to put it here for documentation purposes.