From 2ed367fb49f41928be35b3001be57eb8accdaeb2 Mon Sep 17 00:00:00 2001 From: Mike Griese Date: Thu, 18 Mar 2021 11:14:21 -0500 Subject: [PATCH] Fix build break where Microsoft.Terminal.Control.dll is empty (#9537) TIL that the `` line in our projects is actually totally meaningless. The important line is the one that's in `cppwinrt.build.pre.props`, where we declare ```xml $(ProjectName).def ``` So if you change a project's name, and not the `.def` file, then the linker will just _not use the `.def` file at all_. More importantly, this seemingly doesn't matter in debug builds. In a Debug build, the linker will happily still include `WINRT_CanUnloadNow` and `WINRT_GetActivationFactory` in the exports from the dll, even without the `.def`. But in a Release build, the linker is much more agressive about pruning symbols that aren't referenced, and without those two, NONE of the symbols are eventually referenced. This PR fixes `Microsoft.Terminal.Control` by renaming the `.def`, and makes it marginally harder for someone to make the same mistake in the future. ## References * Regressed in #9472 ## PR Checklist * [x] Closes #9529 * [x] I work here --- src/cascadia/Remoting/dll/Microsoft.Terminal.Remoting.vcxproj | 2 +- src/cascadia/ShellExtension/WindowsTerminalShellExt.vcxproj | 2 +- src/cascadia/TerminalApp/dll/TerminalApp.vcxproj | 2 +- .../{TerminalControl.def => Microsoft.Terminal.Control.def} | 0 src/cascadia/TerminalControl/dll/TerminalControl.vcxproj | 2 +- .../Microsoft.Terminal.Settings.Editor.vcxproj | 2 +- .../Microsoft.Terminal.Settings.Editor.vcxproj.filters | 4 ++-- .../dll/Microsoft.Terminal.Settings.Model.vcxproj | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) rename src/cascadia/TerminalControl/dll/{TerminalControl.def => Microsoft.Terminal.Control.def} (100%) diff --git a/src/cascadia/Remoting/dll/Microsoft.Terminal.Remoting.vcxproj b/src/cascadia/Remoting/dll/Microsoft.Terminal.Remoting.vcxproj index 8b58ce056..a5806ba2b 100644 --- a/src/cascadia/Remoting/dll/Microsoft.Terminal.Remoting.vcxproj +++ b/src/cascadia/Remoting/dll/Microsoft.Terminal.Remoting.vcxproj @@ -33,7 +33,7 @@ - + diff --git a/src/cascadia/ShellExtension/WindowsTerminalShellExt.vcxproj b/src/cascadia/ShellExtension/WindowsTerminalShellExt.vcxproj index 650b1aeb8..b97bb1e60 100644 --- a/src/cascadia/ShellExtension/WindowsTerminalShellExt.vcxproj +++ b/src/cascadia/ShellExtension/WindowsTerminalShellExt.vcxproj @@ -31,7 +31,7 @@ - + diff --git a/src/cascadia/TerminalApp/dll/TerminalApp.vcxproj b/src/cascadia/TerminalApp/dll/TerminalApp.vcxproj index 1aa555c17..c1ed49758 100644 --- a/src/cascadia/TerminalApp/dll/TerminalApp.vcxproj +++ b/src/cascadia/TerminalApp/dll/TerminalApp.vcxproj @@ -47,7 +47,7 @@ - + diff --git a/src/cascadia/TerminalControl/dll/TerminalControl.def b/src/cascadia/TerminalControl/dll/Microsoft.Terminal.Control.def similarity index 100% rename from src/cascadia/TerminalControl/dll/TerminalControl.def rename to src/cascadia/TerminalControl/dll/Microsoft.Terminal.Control.def diff --git a/src/cascadia/TerminalControl/dll/TerminalControl.vcxproj b/src/cascadia/TerminalControl/dll/TerminalControl.vcxproj index 7ac145ce4..89fb2b3cd 100644 --- a/src/cascadia/TerminalControl/dll/TerminalControl.vcxproj +++ b/src/cascadia/TerminalControl/dll/TerminalControl.vcxproj @@ -47,7 +47,7 @@ - + diff --git a/src/cascadia/TerminalSettingsEditor/Microsoft.Terminal.Settings.Editor.vcxproj b/src/cascadia/TerminalSettingsEditor/Microsoft.Terminal.Settings.Editor.vcxproj index 98acfdb10..d67abf429 100644 --- a/src/cascadia/TerminalSettingsEditor/Microsoft.Terminal.Settings.Editor.vcxproj +++ b/src/cascadia/TerminalSettingsEditor/Microsoft.Terminal.Settings.Editor.vcxproj @@ -245,7 +245,7 @@ Designer - + diff --git a/src/cascadia/TerminalSettingsEditor/Microsoft.Terminal.Settings.Editor.vcxproj.filters b/src/cascadia/TerminalSettingsEditor/Microsoft.Terminal.Settings.Editor.vcxproj.filters index 7cd275a7e..1f3afdbd6 100644 --- a/src/cascadia/TerminalSettingsEditor/Microsoft.Terminal.Settings.Editor.vcxproj.filters +++ b/src/cascadia/TerminalSettingsEditor/Microsoft.Terminal.Settings.Editor.vcxproj.filters @@ -22,7 +22,7 @@ - + @@ -41,4 +41,4 @@ {00f725c8-41b4-40a8-995e-8ee2e49a4a4c} - \ No newline at end of file + diff --git a/src/cascadia/TerminalSettingsModel/dll/Microsoft.Terminal.Settings.Model.vcxproj b/src/cascadia/TerminalSettingsModel/dll/Microsoft.Terminal.Settings.Model.vcxproj index 9b8ed046c..3c2546100 100644 --- a/src/cascadia/TerminalSettingsModel/dll/Microsoft.Terminal.Settings.Model.vcxproj +++ b/src/cascadia/TerminalSettingsModel/dll/Microsoft.Terminal.Settings.Model.vcxproj @@ -41,7 +41,7 @@ - +