-
Notifications
You must be signed in to change notification settings - Fork 516
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
[msbuild] Unify escaping algorithm for mangled resources, and remove code duplication. #21488
Conversation
…code duplication. When embedding bundle resources to an assembly as assembly resources, we store the LogicalName property for the resource. We do this by using the LogicalName property as the resource name - but we need to encode forward and backward slashes, since they don't work properly has resource names. In the past, we've encoded forward and backward slashes differently, but this results in different encodings depending on whether the resources are embedded on Windows or macOS. So change the encoding, so that both forward and backward slashes are encoded the same way, and then they're extracted using the platform's path character. This way we get consistent behavior on both platforms.
💻 [CI Build] Windows Integration Tests passed 💻✅ All Windows Integration Tests passed. Pipeline on Agent |
💻 [CI Build] Tests on macOS X64 - Mac Sonoma (14) passed 💻✅ All tests on macOS X64 - Mac Sonoma (14) passed. Pipeline on Agent |
💻 [CI Build] Tests on macOS M1 - Mac Monterey (12) passed 💻✅ All tests on macOS M1 - Mac Monterey (12) passed. Pipeline on Agent |
💻 [CI Build] Tests on macOS M1 - Mac Ventura (13) passed 💻✅ All tests on macOS M1 - Mac Ventura (13) passed. Pipeline on Agent |
✅ API diff for current PR / commit.NET (No breaking changes)✅ API diff vs stable.NET (No breaking changes)ℹ️ Generator diffGenerator Diff: vsdrops (html) vsdrops (raw diff) gist (raw diff) - Please review changes) Pipeline on Agent |
🚀 [CI Build] Test results 🚀Test results✅ All tests passed on VSTS: test results. 🎉 All 101 tests passed 🎉 Tests counts✅ cecil: All 1 tests passed. Html Report (VSDrops) Download Pipeline on Agent |
When embedding bundle resources to an assembly as assembly resources, we store
the LogicalName property for the resource. We do this by using the LogicalName
property as the resource name - but we need to encode forward and backward
slashes, since they don't work properly has resource names.
In the past, we've encoded forward and backward slashes differently, but this
results in different encodings depending on whether the resources are embedded
on Windows or macOS.
So change the encoding, so that both forward and backward slashes are encoded
the same way, and then they're extracted using the platform's path character.
This way we get consistent behavior on both platforms.