Skip to content

Conversation

@dellis1972
Copy link
Contributor

@dellis1972 dellis1972 commented Apr 4, 2018

Fixes #1501

If we have valid live cache files for the additional resources, the design time build should make use of them. However it should not create them since it would cause build problems for the live builds.

@dellis1972 dellis1972 added the do-not-merge PR should not be merged. label Apr 4, 2018
@dellis1972 dellis1972 changed the title [Xamarin.Android.Build.Tasks] DesignTimeBuild should use live build cache's if they exist. [WIP [Xamarin.Android.Build.Tasks] DesignTimeBuild should use live build cache's if they exist. [WIP] Apr 4, 2018
@dellis1972 dellis1972 removed the do-not-merge PR should not be merged. label Apr 4, 2018
Copy link
Member

@jonathanpeppers jonathanpeppers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought this might also fix https://devdiv.visualstudio.com/DevDiv/Xamarin%20Project%20Mgrs/_workitems/edit/594126

I figured out how to repro this issue on 15.6 (simplest way):

  • git clean -dxf
  • Add AndroidUseManagedDesignTimeResourceGenerator=True to the Xamarin.Forms.ControlGallery.Android project
  • Open the XF sln and run the Xamarin.Forms.ControlGallery.Android project

So I add the changes in this PR manually to my VS 2017 install by editing C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets in an elevated Notepad++, and repeated.

Then it worked? I'll retry a few more times to make sure it is not a random issue.

@jonathanpeppers
Copy link
Member

Trying a few more times, and I think that 594126 is only happening randomly.

Having trouble repro-ing with the fix removed, so hard to know if this fixes 594126 or not.

@dellis1972 dellis1972 changed the title [Xamarin.Android.Build.Tasks] DesignTimeBuild should use live build cache's if they exist. [WIP] [Xamarin.Android.Build.Tasks] DesignTimeBuild should use live build cache's if they exist. Apr 5, 2018
@dellis1972
Copy link
Contributor Author

I think this is good to go.

@jonathanpeppers
Copy link
Member

👍

@garuma
Copy link
Contributor

garuma commented Apr 5, 2018

Tested on my end by using an older monodroid build and only changing the lines this PR changed (i.e. not accounting for the most recent MSBuild changes done to xamarin-android in between) and it does fix the issue.

@grendello grendello merged commit 5d64fb4 into dotnet:master Apr 5, 2018
grendello pushed a commit that referenced this pull request Apr 5, 2018
@github-actions github-actions bot locked and limited conversation to collaborators Feb 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants