3 ms·
> why can't Visual Studio compile to something that works by default on the Windows of the target audience without requiring them to install those additional DL
by pjc50 5y ago
> why can't Visual Studio compile to something that works by default on the Windows of the target audience without requiring them to install those additional DLLs?
Not without a time machine; the problem is that you can target older versions of windows with newer versions of Visual Studio. When Microsoft produces vc_redist_2022.exe they can put it Windows 11, but how do they put it in the 2018 version of Windows 10?
The arrival of the Windows Store raises the possibility of automatically installing dependencies. You can also create an "unpackaged" app that uses the WinRT APIs without being a Windows Store app distributed through the store, but if you do that you're exposed to all the horrific machinery yourself as a developer: https://docs.microsoft.com/en-us/windows/apps/windows-app-sdk/deployment-architecture#dynamic-dependency-lifetime-manager-ddlm https://docs.microsoft.com/en-us/windows/apps/windows-app-sd...
In re static linking: I haven't checked but I suspect that COM is involved somewhere. Does anyone have a good summary of what's actually _in_ the redistributable?
- pjmlp 5y agoCOM best practices should be to ship the libraries as registration free components. https://docs.microsoft.com/en-us/windows/win32/sbscs/creating-registration-free-com-objects https://docs.microsoft.com/en-us/windows/win32/sbscs/creatin... Unfortunately, like in every best practices from Microsoft, some teams are in deep need of internal advocacy.