CARVIEW |
Select Language
HTTP/2 200
date: Sun, 27 Jul 2025 05:16:40 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/"90ddb1dc40737c11d408ad7925af40b6"
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=M8g%2BUnV8YTYBPzWVTh8JyWxXgttJNS1yMu09MSbGuGJwGt0M3BrKLNfjlvE9kQWh1W9j8rtdLJzHVtaN6C78xxIyCRHSzdlfPdfOBZH7hYgqIQwCCiKIXaMrmTBsjNkMDlIpIoZXFaW8yrzKkey3%2BNokwb0CYO4IPVfoq%2BBzMO1t0yraeVWEFOyic8syyMARBdJYS3V4UTqEAWBiGQxi1oTf5oU6IXJyp3%2B4n5Fzj%2FTHr%2FhV%2FinsfjV8rm0Leuj%2FQIcs3D%2Fz6S7HsKb2lCOkug%3D%3D--NdKJtDeEjmYCHzmc--ZDRVu0du9oua1MAIx9674A%3D%3D; Path=/; HttpOnly; Secure; SameSite=Lax
set-cookie: _octo=GH1.1.154808669.1753593398; Path=/; Domain=github.com; Expires=Mon, 27 Jul 2026 05:16:38 GMT; Secure; SameSite=Lax
set-cookie: logged_in=no; Path=/; Domain=github.com; Expires=Mon, 27 Jul 2026 05:16:38 GMT; HttpOnly; Secure; SameSite=Lax
x-github-request-id: A3CA:0A61:14CD9D:1E6817:6885B636
[Xamarin.Android.Build.Tasks] Install should skip Build when inside t… · dotnet/android@76fb90e · GitHub
Copy file name to clipboardExpand all lines: src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/AndroidUpdateResourcesTest.cs
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/Tests/Xamarin.Android.Build.Tests/IncrementalBuildTest.cs
Copy file name to clipboardExpand all lines: src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/PackagingTest.cs
Copy file name to clipboardExpand all lines: src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/Utilities/BuildHelper.cs
Copy file name to clipboardExpand all lines: src/Xamarin.Android.Build.Tasks/Tests/Xamarin.ProjectTools/Common/Builder.cs
Copy file name to clipboardExpand all lines: src/Xamarin.Android.Build.Tasks/Tests/Xamarin.ProjectTools/Common/DotNetXamarinProject.cs
Copy file name to clipboardExpand all lines: src/Xamarin.Android.Build.Tasks/Tests/Xamarin.ProjectTools/Common/ProjectBuilder.cs
Copy file name to clipboardExpand all lines: src/Xamarin.Android.Build.Tasks/Xamarin.Android.Common.targets
Copy file name to clipboardExpand all lines: tests/CodeBehind/UnitTests/BuildTests.cs
Skip to content
Navigation Menu
{{ message }}
-
Notifications
You must be signed in to change notification settings - Fork 555
Commit 76fb90e
[Xamarin.Android.Build.Tasks] Install should skip Build when inside the IDE (#2626)
Context: https://work.devdiv.io/765447
Context: https://github.com/jonathanpeppers/HelloWorld
Context: https://github.com/xamarin/xamarin-android/wiki/IDE-Performance-Results
When doing some performance measurements *inside* of Visual Studio,
I noticed some significant overhead in a build without changes.
In a "Hello World" Xamarin.Forms app:
Preparation Time: 00:03.9
Launch Time: 00:02.5
Where "Preparation Time" is everything MSBuild, and "Launch Time"
is the time it takes to start the Android application and attach the
debugger.
"Preparation Time" is effectively:
msbuild Foo.Android.csproj /p:BuildingInsideVisualStudio=True /t:Build
msbuild Foo.Android.csproj /p:BuildingInsideVisualStudio=True /t:Install
One concern here is that the `Install` target depends on the
`SignAndroidPackage` target, which depends on the `Build` target.
We are doing a lot of MSBuild work here *twice*, since MSBuild needs
to run through certain targets twice and decide whether they can be
skipped. This work is "not free" and mostly involves MSBuild
evaluating properties and time stamps on files.
What I found we could do here is skip the `Build` on the `Install`
targets when `$(BuildingInsideVisualStudio)` is `True`. Due to the
dependency chain, this also affects `SignAndroidPackage`.
The minimal list of targets for `SignAndroidPackage` that still work:
* `_CreatePropertiesCache`
* `ResolveReferences`
* `_CopyPackage`
* `_Sign`
Initial results from the IDE show:
Preparation Time: 00:02.06s
Launch Time: 00:02.5
This is a ~1.8 second saving on the inner dev loop!
~~ MSBuild Tests ~~
Since our MSBuild tests set `$(BuildingInsideVisualStudio)`, a lot of
our tests might break. We might have to add an additional call to
`Build` in each failing test.
The way I worked around this was to make the
`BuildHelper.CreateApkBuilder()` method run the
`Build,SignAndroidPackage` target by default. Originally there were
248 test failures.
I also did some other cleanup:
- Added a `ProjectBuilder.RunTarget()` method, so tests can more
easily run custom targets and not modify the `Target` property:
`builder.RunTarget ("Foo")`.
- Added `ProjectBuilder.DesignTimeBuild`().
- `Builder` now has a `BuildingInsideVisualStudio` property to
toggle the value as a command-line global property. We were
putting this in the `csproj`, which seems a bit different than
what IDEs are actually doing...
Also added a `BuildTest.BuildOutsideVisualStudio()` test to verify
the `SignAndroidPackage` target works by itself *outside* of IDEs.1 parent 5951aa5 commit 76fb90eCopy full SHA for 76fb90e
File tree
Expand file treeCollapse file tree
12 files changed
+95
-60
lines changedFilter options
- src/Xamarin.Android.Build.Tasks
- Tests
- Xamarin.Android.Build.Tests
- Utilities
- Xamarin.ProjectTools/Common
- tests
- CodeBehind/UnitTests
- CodeGen-MkBundle/Xamarin.Android.MakeBundle-UnitTests
- EmbeddedDSOs/EmbeddedDSO-UnitTests
Expand file treeCollapse file tree
12 files changed
+95
-60
lines changedsrc/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/AndroidUpdateResourcesTest.cs
Copy file name to clipboardExpand all lines: src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/AndroidUpdateResourcesTest.cs+5-24Lines changed: 5 additions & 24 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
80 | 80 |
| |
81 | 81 |
| |
82 | 82 |
| |
83 |
| - | |
84 |
| - | |
85 | 83 |
| |
86 | 84 |
| |
87 | 85 |
| |
| |||
1080 | 1078 |
| |
1081 | 1079 |
| |
1082 | 1080 |
| |
1083 |
| - | |
1084 |
| - | |
1085 |
| - | |
1086 |
| - | |
| 1081 | + | |
1087 | 1082 |
| |
1088 | 1083 |
| |
1089 | 1084 |
| |
| |||
1095 | 1090 |
| |
1096 | 1091 |
| |
1097 | 1092 |
| |
1098 |
| - | |
1099 | 1093 |
| |
1100 | 1094 |
| |
1101 | 1095 |
| |
| |||
1156 | 1150 |
| |
1157 | 1151 |
| |
1158 | 1152 |
| |
1159 |
| - | |
1160 | 1153 |
| |
1161 |
| - | |
1162 |
| - | |
| 1154 | + | |
1163 | 1155 |
| |
1164 | 1156 |
| |
1165 | 1157 |
| |
1166 |
| - | |
1167 |
| - | |
| 1158 | + | |
1168 | 1159 |
| |
1169 | 1160 |
| |
1170 | 1161 |
| |
| |||
1180 | 1171 |
| |
1181 | 1172 |
| |
1182 | 1173 |
| |
1183 |
| - | |
1184 | 1174 |
| |
1185 | 1175 |
| |
1186 | 1176 |
| |
1187 |
| - | |
1188 |
| - | |
| 1177 | + | |
1189 | 1178 |
| |
1190 | 1179 |
| |
1191 | 1180 |
| |
| |||
1202 | 1191 |
| |
1203 | 1192 |
| |
1204 | 1193 |
| |
1205 |
| - | |
1206 |
| - | |
1207 | 1194 |
| |
1208 | 1195 |
| |
1209 |
| - | |
1210 | 1196 |
| |
1211 | 1197 |
| |
1212 | 1198 |
| |
1213 | 1199 |
| |
1214 | 1200 |
| |
1215 |
| - | |
1216 |
| - | |
1217 | 1201 |
| |
1218 | 1202 |
| |
1219 | 1203 |
| |
| |||
1521 | 1505 |
| |
1522 | 1506 |
| |
1523 | 1507 |
| |
1524 |
| - | |
1525 |
| - | |
1526 |
| - | |
| 1508 | + | |
1527 | 1509 |
| |
1528 | 1510 |
| |
1529 |
| - | |
1530 | 1511 |
| |
1531 | 1512 |
| |
1532 | 1513 |
| |
|
src/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+33-1Lines changed: 33 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
3104 | 3104 |
| |
3105 | 3105 |
| |
3106 | 3106 |
| |
3107 |
| - | |
| 3107 | + | |
3108 | 3108 |
| |
3109 | 3109 |
| |
3110 | 3110 |
| |
| |||
3452 | 3452 |
| |
3453 | 3453 |
| |
3454 | 3454 |
| |
| 3455 | + | |
| 3456 | + | |
| 3457 | + | |
| 3458 | + | |
| 3459 | + | |
| 3460 | + | |
| 3461 | + | |
| 3462 | + | |
| 3463 | + | |
| 3464 | + | |
| 3465 | + | |
| 3466 | + | |
| 3467 | + | |
| 3468 | + | |
| 3469 | + | |
| 3470 | + | |
| 3471 | + | |
| 3472 | + | |
| 3473 | + | |
| 3474 | + | |
| 3475 | + | |
| 3476 | + | |
| 3477 | + | |
| 3478 | + | |
| 3479 | + | |
| 3480 | + | |
| 3481 | + | |
| 3482 | + | |
| 3483 | + | |
| 3484 | + | |
| 3485 | + | |
| 3486 | + | |
3455 | 3487 |
| |
3456 | 3488 |
| |
3457 | 3489 |
|
src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/IncrementalBuildTest.cs
Copy file name to clipboardExpand all lines: src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/IncrementalBuildTest.cs-1Lines changed: 0 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
97 | 97 |
| |
98 | 98 |
| |
99 | 99 |
| |
100 |
| - | |
101 | 100 |
| |
102 | 101 |
| |
103 | 102 |
| |
|
src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/PackagingTest.cs
Copy file name to clipboardExpand all lines: src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/PackagingTest.cs+3-10Lines changed: 3 additions & 10 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
498 | 498 |
| |
499 | 499 |
| |
500 | 500 |
| |
501 |
| - | |
502 |
| - | |
503 |
| - | |
504 |
| - | |
| 501 | + | |
| 502 | + | |
505 | 503 |
| |
506 |
| - | |
507 |
| - | |
508 |
| - | |
509 |
| - | |
510 | 504 |
| |
511 | 505 |
| |
512 | 506 |
| |
| |||
523 | 517 |
| |
524 | 518 |
| |
525 | 519 |
| |
526 |
| - | |
527 |
| - | |
| 520 | + | |
528 | 521 |
| |
529 | 522 |
| |
530 | 523 |
| |
|
src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/Utilities/BuildHelper.cs
Copy file name to clipboardExpand all lines: src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/Utilities/BuildHelper.cs+2-1Lines changed: 2 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
14 | 14 |
| |
15 | 15 |
| |
16 | 16 |
| |
17 |
| - | |
| 17 | + | |
| 18 | + | |
18 | 19 |
| |
19 | 20 |
| |
20 | 21 |
| |
|
src/Xamarin.Android.Build.Tasks/Tests/Xamarin.ProjectTools/Common/Builder.cs
Copy file name to clipboardExpand all lines: src/Xamarin.Android.Build.Tasks/Tests/Xamarin.ProjectTools/Common/Builder.cs+7-3Lines changed: 7 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
24 | 24 |
| |
25 | 25 |
| |
26 | 26 |
| |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
27 | 31 |
| |
28 | 32 |
| |
29 | 33 |
| |
| |||
341 | 345 |
| |
342 | 346 |
| |
343 | 347 |
| |
344 |
| - | |
| 348 | + | |
| 349 | + | |
345 | 350 |
| |
346 |
| - | |
347 |
| - | |
| 351 | + | |
348 | 352 |
| |
349 | 353 |
| |
350 | 354 |
| |
|
src/Xamarin.Android.Build.Tasks/Tests/Xamarin.ProjectTools/Common/DotNetXamarinProject.cs
Copy file name to clipboardExpand all lines: src/Xamarin.Android.Build.Tasks/Tests/Xamarin.ProjectTools/Common/DotNetXamarinProject.cs-1Lines changed: 0 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
30 | 30 |
| |
31 | 31 |
| |
32 | 32 |
| |
33 |
| - | |
34 | 33 |
| |
35 | 34 |
| |
36 | 35 |
| |
|
src/Xamarin.Android.Build.Tasks/Tests/Xamarin.ProjectTools/Common/ProjectBuilder.cs
Copy file name to clipboardExpand all lines: src/Xamarin.Android.Build.Tasks/Tests/Xamarin.ProjectTools/Common/ProjectBuilder.cs+14-18Lines changed: 14 additions & 18 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
76 | 76 |
| |
77 | 77 |
| |
78 | 78 |
| |
79 |
| - | |
80 |
| - | |
81 |
| - | |
82 |
| - | |
83 |
| - | |
84 |
| - | |
85 |
| - | |
| 79 | + | |
86 | 80 |
| |
87 | 81 |
| |
88 | 82 |
| |
89 | 83 |
| |
90 |
| - | |
91 |
| - | |
92 |
| - | |
93 |
| - | |
94 |
| - | |
95 |
| - | |
96 |
| - | |
97 |
| - | |
| 84 | + | |
98 | 85 |
| |
99 | 86 |
| |
100 | 87 |
| |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
101 | 98 |
| |
102 | 99 |
| |
103 |
| - | |
| 100 | + | |
104 | 101 |
| |
105 | 102 |
| |
106 |
| - | |
107 |
| - | |
| 103 | + | |
108 | 104 |
| |
109 | 105 |
| |
110 | 106 |
| |
|
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+15-1Lines changed: 15 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
3169 | 3169 |
| |
3170 | 3170 |
| |
3171 | 3171 |
| |
3172 |
| - | |
| 3172 | + | |
| 3173 | + | |
| 3174 | + | |
| 3175 | + | |
| 3176 | + | |
| 3177 | + | |
| 3178 | + | |
| 3179 | + | |
| 3180 | + | |
| 3181 | + | |
| 3182 | + | |
| 3183 | + | |
| 3184 | + | |
| 3185 | + | |
| 3186 | + | |
3173 | 3187 |
| |
3174 | 3188 |
| |
3175 | 3189 |
| |
|
tests/CodeBehind/UnitTests/BuildTests.cs
Copy file name to clipboardExpand all lines: tests/CodeBehind/UnitTests/BuildTests.cs+6Lines changed: 6 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
16 | 16 |
| |
17 | 17 |
| |
18 | 18 |
| |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
19 | 24 |
| |
20 | 25 |
| |
21 | 26 |
| |
| |||
533 | 538 |
| |
534 | 539 |
| |
535 | 540 |
| |
| 541 | + | |
536 | 542 |
| |
537 | 543 |
| |
538 | 544 |
| |
|
You can’t perform that action at this time.
0 commit comments