Repository navigation
Build Site Extension XDT helper as AnyCPU - #70519
Conversation
Co-authored-by: Copilot App <[email protected]>
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues were identified for the AnyCPU helper change.
No open issues 🎉
What changed in this PR
Builds the Site Extension XDT helper as AnyCPU so App Service can load it even when the transform host and site worker have different architectures. Architecture-specific packaging and native components remain unchanged.
Changes:
- Sets the helper’s
PlatformTargettoAnyCPU, with a comment explaining why. - Adds a regression test that checks the helper’s PE metadata for architecture-neutral, IL-only output.
| File | Description |
|---|---|
src/SiteExtensions/Microsoft.Web.Xdt.Extensions/tests/InsertOrAppendAttributeTests.cs |
Adds assertions for architecture-neutral assembly metadata. |
src/SiteExtensions/Microsoft.Web.Xdt.Extensions/src/Microsoft.Web.Xdt.Extensions.csproj |
Sets and documents the AnyCPU compilation target. |
Review effort: Balanced
|
/review |
|
/backport to release/10.0 |
|
/backport to release/11.0 |
|
Started backporting to |
|
Started backporting to |
|
✅ No documentation PR was created. Confidence that documentation is needed: 8% Confident no docs needed: bug fix to Site Extension XDT helper build architecture (AnyCPU) with regression test. Documentation surfaces considered
|
Co-authored-by: Korolev Dmitry <[email protected]> Co-authored-by: Copilot App <[email protected]>
Co-authored-by: Korolev Dmitry <[email protected]> Co-authored-by: Copilot App <[email protected]>
Build the Site Extension XDT helper as AnyCPU
Keep the Site Extension transform loadable regardless of process architecture.
Description
processPath="dotnet", requiring a runtime newer than the platform provides.content/payload as a named private Site Extension; a .NET 12 test app ran against those development runtimes.Microsoft.Web.Xdt.Extensions.dllfails to load duringapplicationHost.xdtprocessing withBadImageFormatException(0x800700C1). The transform fails, ANCM selects the older platform runtime, and startup returns HTTP 500.31.PlatformTargettoAnyCPU, retaining architecture-specific package paths and native components. Added a PE-format regression test, verified failing before and passing after for x86/x64 builds. In Azure, changing only this DLL to x86-only reproduced HTTP 500.31; restoring the packaged AnyCPU DLL applied the transform successfully and returned HTTP 200.Related #66203