Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@rolfbjarne
Copy link
Member

Backport of #23919.

…e app bundle.

Due to #23898, the build may end up with resources whose LogicalName property
(which is a path relative to the app bundle where the resource in question
would be located inside the app bundle) points to a location outside the app
bundle.

On macOS we correctly detect this and report an error:

> The path '../../../../../../../../../Users/rolf/test/bugs/issue2576178/RazorClassLibrary/wwwroot/background.png' would result in a file outside of the app bundle and cannot be used.

But no such thing was reported on Windows.

Additionally, this become a problem in .NET 10 on Windows because we now
process resources in library projects on Windows without a connection to a
Mac, while previously a connection to a Mac would be required to run into this
problem.

So:

* Fix the check to work on Windows as well.
* Also make it a warning (and just ignore the file in question) instead of an
  error, to keep the "works-by-luck" behavior of .NET 9.

This works around #23898 while we implement an actual fix.
@rolfbjarne rolfbjarne changed the title [release/10.0.1xx-rc.2] Merge 389015c28aacfee9b3a913613f53684f19cc3aaa into b3a916d0ec7e88d7249caf6d3aa2cadcfe427cf2 [release/10.0.1xx-rc.2] [msbuild] Improve detection of resources that would end up outside the app bundle. Sep 26, 2025
@vs-mobiletools-engineering-service2
Copy link
Collaborator

βœ… [CI Build #d40fe6f] Build passed (Build packages) βœ…

Pipeline on Agent
Hash: d40fe6f7b39714745d5a951f6f824fdd5e9643f8 [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

βœ… [PR Build #d40fe6f] Build passed (Detect API changes) βœ…

Pipeline on Agent
Hash: d40fe6f7b39714745d5a951f6f824fdd5e9643f8 [PR build]

@rolfbjarne rolfbjarne enabled auto-merge (squash) September 26, 2025 18:20
@vs-mobiletools-engineering-service2
Copy link
Collaborator

βœ… [CI Build #d40fe6f] Build passed (Build macOS tests) βœ…

Pipeline on Agent
Hash: d40fe6f7b39714745d5a951f6f824fdd5e9643f8 [PR build]

@vs-mobiletools-engineering-service2
Copy link
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: d40fe6f7b39714745d5a951f6f824fdd5e9643f8 [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

πŸ’» [CI Build #d40fe6f] Tests on macOS X64 - Mac Sonoma (14) passed πŸ’»

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

Pipeline on Agent
Hash: d40fe6f7b39714745d5a951f6f824fdd5e9643f8 [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

πŸ’» [CI Build #d40fe6f] Tests on macOS arm64 - Mac Sequoia (15) passed πŸ’»

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

Pipeline on Agent
Hash: d40fe6f7b39714745d5a951f6f824fdd5e9643f8 [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

πŸ’» [CI Build #d40fe6f] Tests on macOS arm64 - Mac Tahoe (26) passed πŸ’»

βœ… All tests on macOS arm64 - Mac Tahoe (26) passed.

Pipeline on Agent
Hash: d40fe6f7b39714745d5a951f6f824fdd5e9643f8 [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

πŸ’» [CI Build #d40fe6f] Tests on macOS M1 - Mac Monterey (12) passed πŸ’»

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

Pipeline on Agent
Hash: d40fe6f7b39714745d5a951f6f824fdd5e9643f8 [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

πŸ’» [CI Build #d40fe6f] Tests on macOS M1 - Mac Ventura (13) passed πŸ’»

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

Pipeline on Agent
Hash: d40fe6f7b39714745d5a951f6f824fdd5e9643f8 [PR build]

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2
Copy link
Collaborator

πŸš€ [CI Build #d40fe6f] Test results πŸš€

Test results

βœ… All tests passed on VSTS: test results.

πŸŽ‰ All 115 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. [attempt 2] 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 11 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: d40fe6f7b39714745d5a951f6f824fdd5e9643f8 [PR build]

@rolfbjarne rolfbjarne merged commit 042ba3e into release/10.0.1xx-rc.2 Sep 26, 2025
44 of 45 checks passed
@rolfbjarne rolfbjarne deleted the dev/rolf/backport-pr-23919-release/10.0.1xx-rc.2-2025-09-26 branch September 26, 2025 20:59
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.

5 participants