[Xamarin.Android.Build.Tasks] _ResolveAssemblies better handle missing assemblies #2622
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.
Fixes: #2548
Fixes: http://work.devdiv.io/753650
In the case of the Android designer, a
SetupDependenciesForDesignertarget is run as a way to "build enough" things for the designer to
work.
The problem is if a
<ProjectReference/>hasn't built yet, the_ResolveAssembliestarget can fail:In this case, I ran:
From a fresh checkout of this sample:
https://github.com/jonathanpeppers/HelloWorld/
To fix this problem, we can add an
Existscheck in theConditionfor assemblies passed into the
<ResolveAssemblies/>MSBuild task. Idon't think this will have any negative consequences, since we are
already doing a check for
Exists ('$(OutDir)$(TargetFileName)').I also setup a new test that emulates what happens with
SetupDependenciesForDesigner. This should also help us make sure wearen't breaking the designer in this repo.
Downstream in monodroid, we should also make sure the designer tests
we have there are using a
<ProjectReference/>.