A fatal error occurred. The required library hostfxr.dll could not be found February 15, 2023 by Tarik Further to Ajith’s answer, “Deployment Mode: Self Contained” can also be selected in Visual Studio 2019 here: