[Xamarin.Android.Build.Tasks] do not use %(HintPath) #3068
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.
We noticed some odd behavior from MSBuild such as:
%(HintPath)
is leftover metadata from the@(ReferencePath)
itemgroup, so it points to the original assembly???
We currently use
%(HintPath)
in two places, but it seems like wedon't need to use it at all?
@(ReferencePath)
and@(ReferenceDependencyPaths)
will both have the full path to all ofthe assemblies in
ITaskItem.ItemSpec
.I was able to simplify two of our tasks and just use
ItemSpec
:<ResolveLibraryProjectImports/>
<GenerateResourceDesigner/>
I also did some general refactoring in
<GenerateResourceDesigner/>
:foreach
loop, to more closely match whatwe were already doing in
<ResolveLibraryProjectImports/>
.List<string>
of assembly names could just be aList<AssemblyDefinition>
, to avoid some LINQ.Results
I think I'm seeing a ~50ms improvement in
<GenerateResourceDesigner/>
for an initial build:Future Work
<GenerateResourceDesigner/>
to useSystem.Reflection.Metadata instead of Mono.Cecil at some point.