Skip to content

[msbuild] Resolve Content and BundleResource items using the main project's location. Fixes 23898.#25713

Draft
rolfbjarne wants to merge 1 commit into
mainfrom
dev/rolf/issue-23898-test
Draft

[msbuild] Resolve Content and BundleResource items using the main project's location. Fixes 23898.#25713
rolfbjarne wants to merge 1 commit into
mainfrom
dev/rolf/issue-23898-test

Conversation

@rolfbjarne

Copy link
Copy Markdown
Member

TODO: implement the actual fix, this only contains a test (that's supposed to fail).

Fixes #23898

🤖 Pull request created by Copilot

Add a test that reproduces the issue where Content/BundleResource items
defined by an SDK (like the Razor SDK) have their LogicalName computed
relative to the SDK directory instead of the project directory, resulting
in paths like '../../../../../src/MyProject/file.png' that get rejected.

This test currently fails, demonstrating the bug described in #23898.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@vs-mobiletools-engineering-service2

Copy link
Copy Markdown
Collaborator

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

Pipeline on Agent
Hash: f76389ce751a02ba6e8903e5ec2554db0ee7f9b4 [PR build]

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

Copy link
Copy Markdown
Collaborator

✅ [PR Build #f76389c] Build passed (Build packages) ✅

Pipeline on Agent
Hash: f76389ce751a02ba6e8903e5ec2554db0ee7f9b4 [PR build]

@vs-mobiletools-engineering-service2

Copy link
Copy Markdown
Collaborator

✅ API diff for current PR / commit

NET (empty diffs)

✅ API diff vs stable

NET (empty diffs)

ℹ️ Generator diff

Generator Diff: vsdrops (html) vsdrops (raw diff) gist (raw diff) - Please review changes)

Pipeline on Agent
Hash: f76389ce751a02ba6e8903e5ec2554db0ee7f9b4 [PR build]

@vs-mobiletools-engineering-service2

Copy link
Copy Markdown
Collaborator

✅ [PR Build #f76389c] Build passed (Build macOS tests) ✅

Pipeline on Agent
Hash: f76389ce751a02ba6e8903e5ec2554db0ee7f9b4 [PR build]

@vs-mobiletools-engineering-service2

Copy link
Copy Markdown
Collaborator

🔥 [CI Build #f76389c] Test results 🔥

Test results

❌ Tests failed on VSTS: test results

0 tests crashed, 13 tests failed, 180 tests passed.

Failures

❌ linker tests (iOS)

11 tests failed, 0 tests passed.

Failed tests

  • dont link/iOS - simulator/Debug: LaunchTimedOut
  • dont link/iOS - simulator/Release: LaunchTimedOut
  • link sdk/iOS - simulator/Debug: LaunchTimedOut
  • link sdk/iOS - simulator/Release: LaunchTimedOut
  • link all/iOS - simulator/Debug: LaunchTimedOut
  • link all/iOS - simulator/Release: LaunchTimedOut
  • link all/iOS - simulator/Debug (don't bundle original resources): LaunchTimedOut
  • trimmode copy/iOS - simulator/Debug: LaunchTimedOut
  • trimmode copy/iOS - simulator/Release: LaunchTimedOut
  • trimmode link/iOS - simulator/Debug: LaunchTimedOut
  • trimmode link/iOS - simulator/Release: LaunchTimedOut

Html Report (VSDrops) Download

❌ monotouch tests (macOS)

1 tests failed, 22 tests passed.

Failed tests

  • monotouch-test/macOS/Release (trimmable static registrar, NativeAOT, ARM64): TimedOut (Execution timed out after 1200 seconds.
    Test run crashed)

Html Report (VSDrops) Download

❌ msbuild tests

1 tests failed, 1 tests passed.

Failed tests

  • MSBuild tasks tests: Failed (Execution failed with exit code 1)
    • Xamarin.MacDev.Tasks.CollectBundleResourcesTaskTests.ContentDefi...: Warnings: The path '../../../../../src/MyProject/wwwroot/background.png' would result in a file outside of the app bundle and ...

Html Report (VSDrops) Download

Successes

✅ 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 6 tests passed. Html Report (VSDrops) Download
✅ linker (MacCatalyst): All 11 tests passed. Html Report (VSDrops) Download
✅ linker (macOS): All 11 tests passed. Html Report (VSDrops) Download
✅ linker (tvOS): All 11 tests passed. Html Report (VSDrops) Download
✅ monotouch (iOS): All 20 tests passed. Html Report (VSDrops) Download
✅ monotouch (MacCatalyst): All 23 tests passed. Html Report (VSDrops) Download
✅ monotouch (tvOS): All 20 tests passed. Html Report (VSDrops) Download
✅ sharpie: All 1 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

macOS tests

✅ Tests on macOS Monterey (12): All 5 tests passed. Html Report (VSDrops) Download
✅ Tests on macOS Ventura (13): All 5 tests passed. Html Report (VSDrops) Download
✅ Tests on macOS Sonoma (14): All 5 tests passed. Html Report (VSDrops) Download
✅ Tests on macOS Sequoia (15): All 5 tests passed. Html Report (VSDrops) Download
✅ Tests on macOS Tahoe (26): All 5 tests passed. Html Report (VSDrops) Download

Linux Build Verification

Linux build succeeded

Pipeline on Agent
Hash: f76389ce751a02ba6e8903e5ec2554db0ee7f9b4 [PR build]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Content and BundleResource items are resolved using the defining project's location

2 participants