How to build mixed NET5.0 and C/C++ solutions via cake?

  .net-5, c++, cakebuild, msbuild, vcxproj

I am transitioning my .net framework projects to NET5.0, and have finished updating code/dependencies such that it all compiles and runs within Visual Studio, but now I am having issues updating my build scripts. I previously used MSBuild to build the solution, which would build all my projects AND my C/C++ vcxprojs within the solution file. The MSBuild command does not work for the now NET5.0 projects so I tried to use DotNetCoreBuild as well as DotNetCorePublish to build my projects, but these do not build the C/C++ projects. So logically, I next tried to build specifically those C/C++ projects prior to the DotNetCorePublish’s. I did this via MSBuild supplying the specific .vcxproj files rather than the .sln file as the project argument, but the compilations fail due to C1083 errors referencing standard headers.

Has anyone else had success building mixed solutions containing dotnet core/net5.0 projects and C/C++ projects?

Is the approach I am attempting the correct way (build C/C++ projects first then DotNetCorePublish the NET5.0 projects), if so what am I doing incorrectly to cause the issues with include resolution?

Is there a more correct way to do these builds?

Source: Windows Questions C++