[workload] move all build tasks out of library-packs #4235
Merged
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.
Description of Change
Fixes: https://dev.azure.com/devdiv/DevDiv/_workitems/edit/1459138
Fixes: #4098
This partially reverts 974cac4.
Creating a new MAUI solution, results in several intellisense errors:
The missing members are created by the (previously XamlG) Roslyn
source generator. You can go-to definition the missing members, build
& run works, and if you close/reopen the solution the errors go away.
Unchecking the
Run code analysis in a separate process
, also seemsto solve the issue.
.NET MAUI seems to be using an intersection of features that causes
this problem:
dotnet new maui
project template.package.
AdditionalFiles
to pass.xaml
files in to the sourcegenerator.
What happens on the first project load, the design-time builds
before project restore are missing the source generator. So the call
to
<Csc/>
does not have@(Analyzer)
orAdditionalFiles
at all.To solve this issue, we can move everything out of NuGet packages,
so they become regular "SDK" or workload packs:
Microsoft.Maui.Controls.Build.Tasks
is no longer packableMicrosoft.Maui.Sdk
Resizetizer.csproj
is no longer packableMicrosoft.Maui.Resizetizer.Sdk
$(MauiVersion)
no longer applies to build tasksTesting locally, this seems to solve the problem for me. I can see the
@(Analyzer)
andAdditionalFiles
being passed on all design-timebuilds now.
Other changes:
%(IsImplicitlyDefined)
to the source generator assembly. Ijust noticed this was missing while reading
.binlog
files.Sdk
folder inMicrosoft.Maui.Sdk
. Thisseems a bit simpler to have one directory.
PR Checklist
Does this PR touch anything that might affect accessibility?
No