microsoft / setup-msbuild

A GitHub Action to facilitate configuring MSBuild in the workflow PATH for building .NET Framework applications.
MIT License
335 stars 89 forks source link

Transferring projects with MFC Library from VS2019 to VS2022 #82

Closed caibinwav123456 closed 2 years ago

caibinwav123456 commented 2 years ago

When I‘m recently building my MFC based project on an github hosted agent with label "windows-latest", I got the following error ever since the VS version has switched to VS2022:

C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v160\Microsoft.CppBuild.targets(479,5): error MSB8041: MFC libraries are required for this project. Install them from the Visual Studio installer (Individual Components tab) for any toolsets and architectures being used.

So is the MFC Library simply not installed on this version of VS? What shall I do now?

timheuer commented 2 years ago

This looks unrelated to setup-msbuild so I will close it but as a suggestion change your agent to windows-2019 and see if resolves.