Skip to content

Conversation

@jonathanpeppers
Copy link
Member

Fixes: #19607

The _CompileAppManifest MSBuild target currently runs on every build because it has no Inputs defined.

In cases where the inputs are not discretely known, we can use a pattern we've used in dotnet/android:

https://github.com/dotnet/android/blob/b61cac33ea1a1a8c4751b8f9f1eade8cf27313c6/src/Xamarin.Android.Build.Tasks/Xamarin.Android.Common.targets#L960-L990

  • Write a file with <WriteLinesToFile WriteOnlyWhenDifferent="true"> to the obj directory with all the parameters to the <CompileAppManifest/> MSBuild task.

  • Use this file as the Inputs for the _CompileAppManifest target.

  • If any of the parameters change, the file will be different and _CompileAppManifest will run again.

I updated tests/dotnet/UnitTests/WindowsTest.cs to verify this target is skipped appropriately.

Fixes: #19607

The `_CompileAppManifest` MSBuild target currently runs on every build
because it has no `Inputs` defined.

In cases where the inputs are not discretely known, we can use a
pattern we've used in dotnet/android:

https://github.com/dotnet/android/blob/b61cac33ea1a1a8c4751b8f9f1eade8cf27313c6/src/Xamarin.Android.Build.Tasks/Xamarin.Android.Common.targets#L960-L990

* Write a file with `<WriteLinesToFile WriteOnlyWhenDifferent="true">`
  to the `obj` directory with all the parameters to the
  `<CompileAppManifest/>` MSBuild task.

* Use this file as the `Inputs` for the `_CompileAppManifest`
  target.

* If any of the parameters change, the file will be different and
  `_CompileAppManifest` will run again.

I updated `tests/dotnet/UnitTests/WindowsTest.cs` to verify this
target is skipped appropriately.
@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

Fixes:

    error MSB4012: The expression "FontFilesToRegister=@(_FontFilesToRegister)" cannot be used in this context. Item lists cannot be concatenated with other strings where an item list is expected. Use a semicolon to separate multiple item lists.
@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@jonathanpeppers
Copy link
Member Author

The latest change, I removed the SessionId from <WriteLinesToFile/> and it's working as I would like:

1st build (I also had some old files in obj):

Target _CompileAppManifest
Input file "obj\Debug\net9.0-ios\iossimulator-arm64\_CompileAppManifest.inputs" is newer than output file "obj\Debug\net9.0-ios\iossimulator-arm64\AppManifest.plist".

2nd build:

Task WriteLinesToFile
Skipping write to file "obj\Debug\net9.0-ios\iossimulator-arm64\_CompileAppManifest.inputs" because content would not change.
...
Target _CompileAppManifest
Skipping target "_CompileAppManifest" because all output files are up-to-date with respect to the input files.

and then bonus (target from #22741):

Target _CoreCompileImageAssets
Skipping target "_CoreCompileImageAssets" because all output files are up-to-date with respect to the input files.

Logs: 22745.zip

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2
Copy link
Collaborator

✅ [PR Build #22bb00e] Build passed (Detect API changes) ✅

Pipeline on Agent
Hash: 22bb00ee57227015975e00b803e24f8c2d10c3d3 [PR build]

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2
Copy link
Collaborator

✅ API diff for current PR / commit

.NET ( No breaking changes )

✅ API diff vs stable

.NET ( No breaking changes )

✅ Generator diff

Generator diff is empty

Pipeline on Agent
Hash: 22bb00ee57227015975e00b803e24f8c2d10c3d3 [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

✅ [CI Build #22bb00e] Build passed (Build packages) ✅

Pipeline on Agent
Hash: 22bb00ee57227015975e00b803e24f8c2d10c3d3 [PR build]

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2
Copy link
Collaborator

✅ [CI Build #22bb00e] Build passed (Build macOS tests) ✅

Pipeline on Agent
Hash: 22bb00ee57227015975e00b803e24f8c2d10c3d3 [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

💻 [CI Build #22bb00e] Tests on macOS X64 - Mac Sonoma (14) passed 💻

All tests on macOS X64 - Mac Sonoma (14) passed.

Pipeline on Agent
Hash: 22bb00ee57227015975e00b803e24f8c2d10c3d3 [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

💻 [CI Build #22bb00e] Tests on macOS M1 - Mac Monterey (12) passed 💻

All tests on macOS M1 - Mac Monterey (12) passed.

Pipeline on Agent
Hash: 22bb00ee57227015975e00b803e24f8c2d10c3d3 [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

💻 [CI Build #22bb00e] Tests on macOS arm64 - Mac Sequoia (15) passed 💻

All tests on macOS arm64 - Mac Sequoia (15) passed.

Pipeline on Agent
Hash: 22bb00ee57227015975e00b803e24f8c2d10c3d3 [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

💻 [CI Build #22bb00e] Tests on macOS M1 - Mac Ventura (13) passed 💻

All tests on macOS M1 - Mac Ventura (13) passed.

Pipeline on Agent
Hash: 22bb00ee57227015975e00b803e24f8c2d10c3d3 [PR build]

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2
Copy link
Collaborator

🚀 [CI Build #22bb00e] Test results 🚀

Test results

✅ All tests passed on VSTS: test results.

🎉 All 119 tests passed 🎉

Tests counts

✅ cecil: All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (iOS): All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (MacCatalyst): All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (macOS): All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (Multiple platforms): All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (tvOS): All 1 tests passed. Html Report (VSDrops) Download
✅ framework: All 2 tests passed. Html Report (VSDrops) Download
✅ fsharp: All 4 tests passed. Html Report (VSDrops) Download
✅ generator: All 5 tests passed. Html Report (VSDrops) Download
✅ interdependent-binding-projects: All 4 tests passed. Html Report (VSDrops) Download
✅ introspection: All 4 tests passed. Html Report (VSDrops) Download
✅ linker: All 44 tests passed. Html Report (VSDrops) Download
✅ monotouch (iOS): All 8 tests passed. Html Report (VSDrops) Download
✅ monotouch (MacCatalyst): All 15 tests passed. Html Report (VSDrops) Download
✅ monotouch (macOS): All 9 tests passed. Html Report (VSDrops) Download
✅ monotouch (tvOS): All 8 tests passed. Html Report (VSDrops) Download
✅ msbuild: All 2 tests passed. Html Report (VSDrops) Download
✅ windows: All 3 tests passed. Html Report (VSDrops) Download
✅ xcframework: All 4 tests passed. Html Report (VSDrops) Download
✅ xtro: All 1 tests passed. Html Report (VSDrops) Download

Pipeline on Agent
Hash: 22bb00ee57227015975e00b803e24f8c2d10c3d3 [PR build]

@jonathanpeppers jonathanpeppers merged commit 5b23fb7 into net10.0 May 8, 2025
44 checks passed
@jonathanpeppers jonathanpeppers deleted the dev/peppers/_CompileAppManifest branch May 8, 2025 14:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants