CARVIEW |
Select Language
HTTP/2 200
date: Sun, 27 Jul 2025 09:18:02 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/"87a5f0ea4003ea406ab1c79e0052a2a9"
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=ETDH23j6LKZesYdtL2li8vA434lt9%2F4rboxuZUUMq851KMru%2B6lUIWsOL%2FDxMpObKY8%2FvKAHkPNQHOp7ObPVNr8Kmd9FBoKMNGn4UaWpi1a2HU%2BqSPu70e6FFg%2BGVcCbGa4MZYMrY7ogKpTHHhe1u9ngjKYu1OUDByUgMtLn%2B4y91UVedNoYq%2Bc5A4baHaX036NN62BzvuBWnNxDhpNtPFDoa5H7LOMhVLdsw9vsBEsyvDkxkJojvl7btl6QTEgN3viLBNYFip89VTWVdKutXQ%3D%3D--LjZ52kl6BqBjOveP--MX7QKEs9LGnrxwvE6df2Hw%3D%3D; Path=/; HttpOnly; Secure; SameSite=Lax
set-cookie: _octo=GH1.1.299532903.1753607881; Path=/; Domain=github.com; Expires=Mon, 27 Jul 2026 09:18:01 GMT; Secure; SameSite=Lax
set-cookie: logged_in=no; Path=/; Domain=github.com; Expires=Mon, 27 Jul 2026 09:18:01 GMT; HttpOnly; Secure; SameSite=Lax
x-github-request-id: B17E:32A0BD:347A42:47AFA7:6885EEC9
[Xamarin.Android.Build.Tasks] filter @(ReferencePath) for MonoAndroid… · dotnet/android@5ec3e3a · GitHub
Copy file name to clipboard
Copy file name to clipboardExpand all lines: src/Xamarin.Android.Build.Tasks/Tasks/ResolveLibraryProjectImports.cs
Copy file name to clipboardExpand all lines: src/Xamarin.Android.Build.Tasks/Utilities/MetadataExtensions.cs
Copy file name to clipboardExpand all lines: src/Xamarin.Android.Build.Tasks/Xamarin.Android.Build.Tasks.csproj
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 5ec3e3a
[Xamarin.Android.Build.Tasks] filter @(ReferencePath) for MonoAndroid assemblies (#2934)
We have a couple MSBuild targets that need to only operate on
`MonoAndroid`-profile assemblies:
* `_BuildAdditionalResourcesCache` is the precursor to the
[Xamarin.Build.Download NuGet package][0]
* `_ResolveLibraryProjectImports` unzips
`__AndroidLibrariesProjects__.zip`, `.jar`/`.aar` files, etc.
Both of these targets look at *all* assemblies, but this isn't
necessary: only `MonoAndroid`-profile assemblies can contain those
"special" embedded resources. This would allow us to skip all other
types of assemblies -- BCL, .NET Standard libraries, etc. -- and thus
reduce the amount of build-time work that must be performed.
I added a new `<FilterAssemblies/>` MSBuild task to filter based on
the presence of this attribute in an assembly:
[assembly: System.Runtime.Versioning.TargetFrameworkAttribute ("MonoAndroid,Version=v8.1")]
MSBuild/Roslyn populate this attribute based on the
`$(TargetFrameworkIdentifier)` of the project.
We then use `<FilterAssemblies/>` to create a new
`@(_MonoAndroidReferencePath)` item group, and use
`@(_MonoAndroidReferencePath)` in `_BuildAdditionalResourcesCache`
and `_ResolveLibraryProjectImports`. This allows the tasks inside
these targets to operate on fewer assemblies, and also allows them
to not be executed due to changes in .NET Standard projects.
One complication is that during design-time builds, some assemblies
may not exist. I made `<FilterAssemblies/>` just skip files in this
case--using the same logic that `<ResolveLibraryProjectImports/>`
uses. (I also fixed some wording/misspelling/)
~~ Results ~~
I tested the Xamarin.Forms project in this repo.
Initial build:
Before:
78 ms _BuildAdditionalResourcesCache 1 calls
1678 ms _ResolveLibraryProjectImports 1 calls
After:
47 ms FilterAssemblies 1 calls
23 ms _BuildAdditionalResourcesCache 1 calls
1120 ms _ResolveLibraryProjectImports 1 calls
566ms is saved on the initial build.
Incremental build with XAML change:
Before:
62 ms _BuildAdditionalResourcesCache 1 calls
300 ms _ResolveLibraryProjectImports 1 calls
After:
62 ms FilterAssemblies 1 calls
0 ms _BuildAdditionalResourcesCache 1 calls
16 ms _ResolveLibraryProjectImports 1 calls
284ms saved on the incremental build when only the .NET Standard
project is changed.
Note that during the incremental build, since only a .NET Standard
assembly was updated the following targets are skipped:
_BuildAdditionalResourcesCache:
Skipping target "_BuildAdditionalResourcesCache" because all output files are up-to-date with respect to the input files.
...
_ResolveLibraryProjectImports:
Skipping target "_ResolveLibraryProjectImports" because all output files are up-to-date with respect to the input files.
[0]: https://www.nuget.org/packages/Xamarin.Build.Download/1 parent 4a6c4cd commit 5ec3e3aCopy full SHA for 5ec3e3a
File tree
Expand file treeCollapse file tree
5 files changed
+92
-6
lines changedFilter options
- src/Xamarin.Android.Build.Tasks
- Tasks
- Utilities
Expand file treeCollapse file tree
5 files changed
+92
-6
lines changedsrc/Xamarin.Android.Build.Tasks/Tasks/FilterAssemblies.cs
Copy file name to clipboard+51Lines changed: 51 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + |
src/Xamarin.Android.Build.Tasks/Tasks/ResolveLibraryProjectImports.cs
Copy file name to clipboardExpand all lines: src/Xamarin.Android.Build.Tasks/Tasks/ResolveLibraryProjectImports.cs+1-1Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
200 | 200 |
| |
201 | 201 |
| |
202 | 202 |
| |
203 |
| - | |
| 203 | + | |
204 | 204 |
| |
205 | 205 |
| |
206 | 206 |
| |
|
src/Xamarin.Android.Build.Tasks/Utilities/MetadataExtensions.cs
Copy file name to clipboardExpand all lines: src/Xamarin.Android.Build.Tasks/Utilities/MetadataExtensions.cs+28-1Lines changed: 28 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 |
| - | |
| 1 | + | |
| 2 | + | |
2 | 3 |
| |
3 | 4 |
| |
4 | 5 |
| |
| |||
22 | 23 |
| |
23 | 24 |
| |
24 | 25 |
| |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
25 | 52 |
| |
26 | 53 |
|
src/Xamarin.Android.Build.Tasks/Xamarin.Android.Build.Tasks.csproj
Copy file name to clipboardExpand all lines: src/Xamarin.Android.Build.Tasks/Xamarin.Android.Build.Tasks.csproj+1Lines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
128 | 128 |
| |
129 | 129 |
| |
130 | 130 |
| |
| 131 | + | |
131 | 132 |
| |
132 | 133 |
| |
133 | 134 |
| |
|
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+11-4Lines changed: 11 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
58 | 58 |
| |
59 | 59 |
| |
60 | 60 |
| |
| 61 | + | |
61 | 62 |
| |
62 | 63 |
| |
63 | 64 |
| |
| |||
494 | 495 |
| |
495 | 496 |
| |
496 | 497 |
| |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
497 | 504 |
| |
498 | 505 |
| |
499 | 506 |
| |
| |||
503 | 510 |
| |
504 | 511 |
| |
505 | 512 |
| |
506 |
| - | |
| 513 | + | |
507 | 514 |
| |
508 | 515 |
| |
509 | 516 |
| |
510 | 517 |
| |
511 | 518 |
| |
512 |
| - | |
| 519 | + | |
513 | 520 |
| |
514 | 521 |
| |
515 | 522 |
| |
| |||
1389 | 1396 |
| |
1390 | 1397 |
| |
1391 | 1398 |
| |
1392 |
| - | |
| 1399 | + | |
1393 | 1400 |
| |
1394 | 1401 |
| |
1395 | 1402 |
| |
1396 | 1403 |
| |
1397 | 1404 |
| |
1398 |
| - | |
| 1405 | + | |
1399 | 1406 |
| |
1400 | 1407 |
| |
1401 | 1408 |
| |
|
You can’t perform that action at this time.
0 commit comments