dotnet / runtime

.NET is a cross-platform runtime for cloud, mobile, desktop, and IoT apps.
https://docs.microsoft.com/dotnet/core/
MIT License
15.48k stars 4.76k forks source link

Support dual comhost.dll (x86, x64) generation for .NET Core assemblies using "Any CPU" #32493

Open carlos-quintero opened 4 years ago

carlos-quintero commented 4 years ago

Currently:

If an assembly targets the architecture Any CPU then two .comhost.dll files should be generated, because the autor may want to create both x64 and x86 COM servers from the same .NET "Any CPU" assembly (ex: consider a .NET-based add-in for Office 64-bit and Office 32-bit). That was possible with .NET Framework with a single build, but it is not possible with .NET Core: two builds are required, one for architecture x86 and another for architecture x64, and you need to move the output files before the second build.

I suggest the following approach:

vitek-karas commented 4 years ago

/cc @AaronRobinsonMSFT

DHowett commented 4 years ago

This is also important for ARM64 for projects that want 3-architecture builds, like WinAppDriver.

jozefizso commented 11 months ago

I created new issue at https://github.com/dotnet/sdk/issues/37570 as the build scripts for COM hosting are in the SDK repository.