CARVIEW |
Select Language
HTTP/2 200
date: Sun, 27 Jul 2025 04:34:25 GMT
content-type: text/html; charset=utf-8
vary: X-PJAX, X-PJAX-Container, Turbo-Visit, Turbo-Frame, X-Requested-With,Accept-Encoding, Accept, X-Requested-With
x-repository-download: git clone https://github.com/dotnet/android.git
etag: W/"d8176ab0ba63237fdd914a7c167b292e"
cache-control: max-age=0, private, must-revalidate
strict-transport-security: max-age=31536000; includeSubdomains; preload
x-frame-options: deny
x-content-type-options: nosniff
x-xss-protection: 0
referrer-policy: no-referrer-when-downgrade
content-security-policy: default-src 'none'; base-uri 'self'; child-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/; connect-src 'self' uploads.github.com www.githubstatus.com collector.github.com raw.githubusercontent.com api.github.com github-cloud.s3.amazonaws.com github-production-repository-file-5c1aeb.s3.amazonaws.com github-production-upload-manifest-file-7fdce7.s3.amazonaws.com github-production-user-asset-6210df.s3.amazonaws.com *.rel.tunnels.api.visualstudio.com wss://*.rel.tunnels.api.visualstudio.com objects-origin.githubusercontent.com copilot-proxy.githubusercontent.com proxy.individual.githubcopilot.com proxy.business.githubcopilot.com proxy.enterprise.githubcopilot.com *.actions.githubusercontent.com wss://*.actions.githubusercontent.com productionresultssa0.blob.core.windows.net/ productionresultssa1.blob.core.windows.net/ productionresultssa2.blob.core.windows.net/ productionresultssa3.blob.core.windows.net/ productionresultssa4.blob.core.windows.net/ productionresultssa5.blob.core.windows.net/ productionresultssa6.blob.core.windows.net/ productionresultssa7.blob.core.windows.net/ productionresultssa8.blob.core.windows.net/ productionresultssa9.blob.core.windows.net/ productionresultssa10.blob.core.windows.net/ productionresultssa11.blob.core.windows.net/ productionresultssa12.blob.core.windows.net/ productionresultssa13.blob.core.windows.net/ productionresultssa14.blob.core.windows.net/ productionresultssa15.blob.core.windows.net/ productionresultssa16.blob.core.windows.net/ productionresultssa17.blob.core.windows.net/ productionresultssa18.blob.core.windows.net/ productionresultssa19.blob.core.windows.net/ github-production-repository-image-32fea6.s3.amazonaws.com github-production-release-asset-2e65be.s3.amazonaws.com insights.github.com wss://alive.github.com api.githubcopilot.com api.individual.githubcopilot.com api.business.githubcopilot.com api.enterprise.githubcopilot.com; font-src github.githubassets.com; form-action 'self' github.com gist.github.com copilot-workspace.githubnext.com objects-origin.githubusercontent.com; frame-ancestors 'none'; frame-src viewscreen.githubusercontent.com notebooks.githubusercontent.com; img-src 'self' data: blob: github.githubassets.com media.githubusercontent.com camo.githubusercontent.com identicons.github.com avatars.githubusercontent.com private-avatars.githubusercontent.com github-cloud.s3.amazonaws.com objects.githubusercontent.com release-assets.githubusercontent.com secured-user-images.githubusercontent.com/ user-images.githubusercontent.com/ private-user-images.githubusercontent.com opengraph.githubassets.com copilotprodattachments.blob.core.windows.net/github-production-copilot-attachments/ github-production-user-asset-6210df.s3.amazonaws.com customer-stories-feed.github.com spotlights-feed.github.com objects-origin.githubusercontent.com *.githubusercontent.com; manifest-src 'self'; media-src github.com user-images.githubusercontent.com/ secured-user-images.githubusercontent.com/ private-user-images.githubusercontent.com github-production-user-asset-6210df.s3.amazonaws.com gist.github.com; script-src github.githubassets.com; style-src 'unsafe-inline' github.githubassets.com; upgrade-insecure-requests; worker-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/
server: github.com
content-encoding: gzip
accept-ranges: bytes
set-cookie: _gh_sess=FECr2thE4q%2F%2BFCYuOOayPKb%2By9X6hGLfOHKQ3g0e7DjMrM7BHldSciEAUXAmawiV0zg4MsOOFit1sBNxHP7A2JIGRTjL%2FGXoLxcBgiLxd0bKD0Ip%2FJNR3HDHDFmQZH%2FsD8GoUd541Od2vbq0eXWlt9%2FSYfZj8y9JkZu4KYa2q7BBiuMtKdXZItnpPUkXCUxqNh5v%2Bnq8DWspu5NljCaF6G27OZXHiaj%2Bcx1rkMa4nRGB90ni85%2BK%2FIe5vpIS%2Bn%2BUi%2B8byZPc93yhLZy4ALs%2BCQ%3D%3D--BRMGmZnn75Cnan75--7%2FSLQ7CkJXQTOTxTriIWpg%3D%3D; Path=/; HttpOnly; Secure; SameSite=Lax
set-cookie: _octo=GH1.1.873491453.1753590864; Path=/; Domain=github.com; Expires=Mon, 27 Jul 2026 04:34:24 GMT; Secure; SameSite=Lax
set-cookie: logged_in=no; Path=/; Domain=github.com; Expires=Mon, 27 Jul 2026 04:34:24 GMT; HttpOnly; Secure; SameSite=Lax
x-github-request-id: D720:1C79A4:AAE2A3:E3BAEE:6885AC50
[Xamarin.Android.Build.Tasks] fix incremental builds for Xamarin.Form… · dotnet/android@970da9e · GitHub
Copy file name to clipboardExpand all lines: src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/BuildTest.cs
Copy file name to clipboardExpand all lines: src/Xamarin.Android.Build.Tasks/Utilities/Files.cs
Copy file name to clipboardExpand all lines: src/Xamarin.Android.Build.Tasks/Xamarin.Android.Common.targets
Skip to content
Navigation Menu
{{ message }}
-
Notifications
You must be signed in to change notification settings - Fork 555
Commit 970da9e
[Xamarin.Android.Build.Tasks] fix incremental builds for Xamarin.Forms projects (#2088)
@StephaneDelcroix noticed a build performance problem when building
Xamarin.Forms projects:
- Build
- Build again with no changes
- Slow targets such as `_UpdateAndroidResgen` and
`_GenerateJavaStubs` run again!
The cause appeared to be this:
Building target "_UpdateAndroidResgen" completely.
Input file "obj/Debug/res/layout/tabbar.xml" is newer than output file "obj/Debug/R.cs.flag".
I modified the `CheckTimestamps()` test to replicate this issue:
- Added Xamarin.Forms NuGet packages
- Added `Tabbar.axml` from the Xamarin.Forms template
This surfaced several problems with timestamps and Xamarin.Android
building incrementally.
~~ Problem 1 ~~
In the `_GenerateJavaStubs` target, the `<ConvertResourcesCases/>`
MSBuild task is not supplied an `AndroidConversionFlagFile`. It uses
this file to compare timestamps and decide if XML files need to be
fixed up or not.
Supplying `$(_AndroidResgenFlagFile)` seemed to be the way to go here,
since `_UpdateAndroidResgen` runs right before this task. It also
solves the original problem from the `Tabbar.axml` file.
I also realized we should be using a "stamp" file for the
`_GenerateJavaStubs` MSBuild target, in general.
This gives us several benefits:
- `<ConvertResourcesCases/>` has a proper
`AndroidConversionFlagFile` it can use for checking timestamps
- The `Outputs` of the target are drastically simplified, which may
help performance in MSBuild evaluating if the target should run
- It is likely more precise/correct.
So I added a new file in `$(IntermediateOutputPath)`,
`obj\Debug\_javastubs.stamp` we use to determine if
`_GenerateJavaStubs` should run.
I also tried to do things "the right way", such as:
- Adding the stamp file to the `@(FileWrites)` item group
- Made sure the file is deleted during a `Clean`
After these changes, two instances of `<ConvertResourcesCases/>` were
*still* fighting each other. They would always run and update the
timestamps on one file, causing the other one to run.
`ConvertResourcesCases` runs twice:
- In the `_UpdateAndroidResgen` target
- In the `_GenerateJavaStubs` target
But these are both working with the same files, so in the second case,
we need to make sure `_GenerateJavaStubs` updates the timestamp on the
*first* flag file so the target doesn't run every time.
~~ Problem 2 ~~
Timestamps of Xamarin.Forms assemblies in `obj\Debug\linksrc` were
out of date!
I updated the `_CopyIntermediateAssemblies` target to update the
timestamps of all files within this directory. It did not appear to
be doing it correctly, and was only running `<Touch/>` on a subset of
assemblies.
~~ Problem 3 ~~
After fixing Problem 2, the next problem I noticed were `*.pdb` and
`*.mdb` files in `obj\Debug\linksrc` were out of date!
The problem here was a call to `<Touch />`:
<Touch Files="@(_DebugFilesCopiedToLinkerSrc)" />
The `@(_DebugFilesCopiedToLinkerSrc)` did not appear to contain any
items!
I updated the `_CopyPdbFiles` and `_CopyMdbFiles` targets to use the
correct item groups.
~~ Problem 4 ~~
Lastly, after fixing the previous three problems, the timestamps of
output assemblies in `obj\Release\android\assets` were not correct
for `Release` builds.
I had made a change for this in the past, which was making `Debug`
builds work correctly:
#2028
At the time I wrote #2028, since the test wasn't using Xamarin.Forms,
I did not see the problem occurring in `Release` mode. It *does*
occur if you are using NuGet packages.
I replicated what I changed in the `_LinkAssembliesNoShrink` target,
and also renamed the item groups to be unique:
- `_LinkAssembliesNoShrinkFiles`
- `_LinkAssembliesShrinkFiles`
~~ Other changes ~~
The `CheckTimestamps()` test also was verifying timestamps in
`$(OutputPath)` such as `bin\Debug`.
It appears the core MSBuild targets are leaving timestamps as-is in
the `CopyFilesToOutputDirectory` and `_CopyFilesMarkedCopyLocal`
targets. Assemblies from Xamarin.Forms NuGet are out of date here, but
I don't think we should do anything, since the core MSBuild targets
are doing this.
For now, I removed the checks for `$(OutputPath)` in this test, and
cleaned up the test a bit.
Update `Files.ExtractAll()` so that the timestamps of extracted files
are set to "now", in order to fix some failing unit tests on macOS.1 parent 07d4563 commit 970da9eCopy full SHA for 970da9e
File tree
Expand file treeCollapse file tree
3 files changed
+65
-18
lines changedFilter options
- src/Xamarin.Android.Build.Tasks
- Tests/Xamarin.Android.Build.Tests
- Utilities
Expand file treeCollapse file tree
3 files changed
+65
-18
lines changedsrc/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/BuildTest.cs
Copy file name to clipboardExpand all lines: src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/BuildTest.cs+39-10Lines changed: 39 additions & 10 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
259 | 259 |
| |
260 | 260 |
| |
261 | 261 |
| |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
262 | 269 |
| |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
263 | 289 |
| |
264 |
| - | |
265 |
| - | |
266 |
| - | |
267 |
| - | |
268 |
| - | |
269 |
| - | |
270 |
| - | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
271 | 296 |
| |
272 | 297 |
| |
273 | 298 |
| |
274 | 299 |
| |
275 |
| - | |
276 | 300 |
| |
277 | 301 |
| |
278 | 302 |
| |
| |||
291 | 315 |
| |
292 | 316 |
| |
293 | 317 |
| |
294 |
| - | |
295 |
| - | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
296 | 325 |
| |
297 | 326 |
| |
298 | 327 |
| |
|
src/Xamarin.Android.Build.Tasks/Utilities/Files.cs
Copy file name to clipboardExpand all lines: src/Xamarin.Android.Build.Tasks/Utilities/Files.cs+3Lines changed: 3 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
245 | 245 |
| |
246 | 246 |
| |
247 | 247 |
| |
| 248 | + | |
| 249 | + | |
| 250 | + | |
248 | 251 |
| |
249 | 252 |
| |
250 | 253 |
| |
|
src/Xamarin.Android.Build.Tasks/Xamarin.Android.Common.targets
Copy file name to clipboardExpand all lines: src/Xamarin.Android.Build.Tasks/Xamarin.Android.Common.targets+23-8Lines changed: 23 additions & 8 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1952 | 1952 |
| |
1953 | 1953 |
| |
1954 | 1954 |
| |
1955 |
| - | |
1956 |
| - | |
1957 | 1955 |
| |
| 1956 | + | |
| 1957 | + | |
| 1958 | + | |
| 1959 | + | |
1958 | 1960 |
| |
1959 | 1961 |
| |
1960 | 1962 |
| |
| |||
2028 | 2030 |
| |
2029 | 2031 |
| |
2030 | 2032 |
| |
2031 |
| - | |
| 2033 | + | |
2032 | 2034 |
| |
2033 | 2035 |
| |
2034 | 2036 |
| |
| |||
2050 | 2052 |
| |
2051 | 2053 |
| |
2052 | 2054 |
| |
2053 |
| - | |
| 2055 | + | |
2054 | 2056 |
| |
2055 | 2057 |
| |
2056 | 2058 |
| |
| |||
2079 | 2081 |
| |
2080 | 2082 |
| |
2081 | 2083 |
| |
2082 |
| - | |
| 2084 | + | |
2083 | 2085 |
| |
2084 |
| - | |
| 2086 | + | |
2085 | 2087 |
| |
2086 | 2088 |
| |
2087 | 2089 |
| |
| |||
2116 | 2118 |
| |
2117 | 2119 |
| |
2118 | 2120 |
| |
| 2121 | + | |
| 2122 | + | |
| 2123 | + | |
| 2124 | + | |
| 2125 | + | |
| 2126 | + | |
2119 | 2127 |
| |
2120 | 2128 |
| |
2121 | 2129 |
| |
| |||
2198 | 2206 |
| |
2199 | 2207 |
| |
2200 | 2208 |
| |
2201 |
| - | |
| 2209 | + | |
2202 | 2210 |
| |
2203 | 2211 |
| |
2204 | 2212 |
| |
| |||
2225 | 2233 |
| |
2226 | 2234 |
| |
2227 | 2235 |
| |
2228 |
| - | |
| 2236 | + | |
| 2237 | + | |
| 2238 | + | |
| 2239 | + | |
| 2240 | + | |
| 2241 | + | |
| 2242 | + | |
2229 | 2243 |
| |
2230 | 2244 |
| |
2231 | 2245 |
| |
| |||
3057 | 3071 |
| |
3058 | 3072 |
| |
3059 | 3073 |
| |
| 3074 | + | |
3060 | 3075 |
| |
3061 | 3076 |
| |
3062 | 3077 |
| |
|
You can’t perform that action at this time.
0 commit comments