-
Notifications
You must be signed in to change notification settings - Fork 549
[msbuild] Improve detection of resources that would end up outside the app bundle. #23919
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…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.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
✅ [CI Build #389015c] Build passed (Build packages) ✅Pipeline on Agent |
✅ [PR Build #389015c] Build passed (Detect API changes) ✅Pipeline on Agent |
✅ API diff for current PR / commitNET (empty diffs)✅ API diff vs stableNET (empty diffs)ℹ️ Generator diffGenerator Diff: vsdrops (html) vsdrops (raw diff) gist (raw diff) - Please review changes) Pipeline on Agent |
✅ [CI Build #389015c] Build passed (Build macOS tests) ✅Pipeline on Agent |
💻 [CI Build #389015c] Tests on macOS X64 - Mac Sonoma (14) passed 💻✅ All tests on macOS X64 - Mac Sonoma (14) passed. Pipeline on Agent |
💻 [CI Build #389015c] Tests on macOS M1 - Mac Monterey (12) passed 💻✅ All tests on macOS M1 - Mac Monterey (12) passed. Pipeline on Agent |
💻 [CI Build #389015c] Tests on macOS M1 - Mac Ventura (13) passed 💻✅ All tests on macOS M1 - Mac Ventura (13) passed. Pipeline on Agent |
💻 [CI Build #389015c] Tests on macOS arm64 - Mac Sequoia (15) passed 💻✅ All tests on macOS arm64 - Mac Sequoia (15) passed. Pipeline on Agent |
💻 [CI Build #389015c] Tests on macOS arm64 - Mac Tahoe (26) passed 💻✅ All tests on macOS arm64 - Mac Tahoe (26) passed. Pipeline on Agent |
This comment has been minimized.
This comment has been minimized.
🚀 [CI Build #389015c] Test results 🚀Test results✅ All tests passed on VSTS: test results. 🎉 All 118 tests passed 🎉 Tests counts✅ cecil: All 1 tests passed. Html Report (VSDrops) Download Pipeline on Agent |
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:
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:
error, to keep the "works-by-luck" behavior of .NET 9.
This works around #23898 while we implement an actual fix.