1

I am trying to move my current build server, which is based on Visual Studio, to a containerized environment. As such, I am trying to use the mcr.microsoft.com/dotnet/framework/sdk:4.7.2-windowsservercore-ltsc2019 image available on docker hub.

One step required during the build is to remove the NXCOMPAT flag from the resulting executable (more details available here for the why). To do so, I need to use editbin.exe which ships with Visual Studio. The current image version does not include it. So I would like to add it myself as I already have to customize the image a bit to fit my needs.

Which package can I install to get editbin.exe working in my docker image?

I don't want to install a full Visual Studio as it will defeat the purpose of using the dotnet sdk image. I am not even sure I can as the container is not running in an interactive mode.

I originally reported my issue to the microsoft/dotnet-framework-docker repo here.

GGirard
  • 1,145
  • 1
  • 13
  • 33
  • Have you looked into install just the build tools for vs 2017? Like from nuget? – C.J. Jun 20 '19 at 13:53
  • 1
    The build tools for visual studio are already part of the `dotnet/framework/sdk` image – GGirard Jun 20 '19 at 14:02
  • Can you provide the link @GGirard? – C.J. Jun 20 '19 at 15:02
  • This should be the one I am using https://github.com/microsoft/dotnet-framework-docker/blob/master/4.7.2/sdk/windowsservercore-ltsc2019/Dockerfile – GGirard Jun 20 '19 at 15:21
  • No the link for hub.docker.com – C.J. Jun 20 '19 at 16:14
  • Is this it? https://hub.docker.com/_/microsoft-dotnet-framework-sdk/ – C.J. Jun 20 '19 at 16:14
  • 1
    yes this is the one – GGirard Jun 20 '19 at 16:28
  • I asked this question once, I'll look for it. In the end I managed to solve it, but not optimally. That is, I may have installed more components than necessary. – baruchiro Jun 20 '19 at 19:50
  • I hope I remember to add the `Dockerfile` as an answer. If not, you might want to remind me. – baruchiro Jun 20 '19 at 19:54
  • @Baruch thanks for your post, it indeed contains the information I was looking for. It was a bit tricky in my case as I didn't have the C++ workload installed on my machine. The editbin.exe I have been using for years now was part of an internal SDK of Visual Studio. This article helped a lot too https://devblogs.microsoft.com/cppblog/finding-the-visual-c-compiler-tools-in-visual-studio-2017/ – GGirard Jun 20 '19 at 21:06

0 Answers0