Within a Docker container I encounter this error "(Microsoft.Cpp.Default.props" was not found.) pls help

Hans Schneider 21 Reputation points
2021-03-07T22:26:29.263+00:00

I am beginner with Visual Studio, Build Tools and Docker.
I was following this link https://devblogs.microsoft.com/cppblog/using-msvc-in-a-docker-container-for-your-c-projects/
in a Windows server 2019.

But when I try to docker run -v
I have this file Microsoft.Cpp.Default.props which the program Doesn't found.

I know there is a "fix" but in this case is a docker container, maybe I am kind of lost doing this.

I upload some images of my case.

75165-captura-de-pantalla-de-2021-03-07-17-05-12.png

75067-captura-de-pantalla-de-2021-03-07-17-09-28.png

75166-captura-de-pantalla-de-2021-03-07-17-05-53.png

https://social.msdn.microsoft.com/Forums/en-US/088c55cb-6982-483f-9211-29a54fb7a045/vc-msbuild-vs-2010-error-msb4019-the-imported-project-cmicrosoftcppdefaultprops-was-not?forum=msbuild

Developer technologies Visual Studio Debugging
Developer technologies Visual Studio Other
0 comments No comments
{count} votes

Accepted answer
  1. Dylan Zhu-MSFT 6,426 Reputation points
    2021-03-08T07:02:47.073+00:00

    Hi HansSchneider,

    It seems that the VC++ components are not installed into the build tool directory. Please confirm if this command is added in docker file:
    --add Microsoft.VisualStudio.Workload.VCTools --includeRecommended

    Best Regards, Dylan

    If the answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our * *documentation* to enable e-mail notifications if you want to receive the related email notification for this thread.**

    1 person found this answer helpful.
    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Hans Schneider 21 Reputation points
    2021-03-08T17:09:58.637+00:00

    VC++ components had not been installed correctly. I'll build again the Docker image, and it worked Thank you

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.