Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Not recognized command when running Docker

whenever I run docker build I'm getting:

'msbuild' is not recognized as an internal or external command, operable program or batch file. and 'nuget.exe' is not recognized as an internal or external command, operable program or batch file.

However, when I run msbuild or nuget restore from CMD it works fine on it's own. I've already added paths to System Variables / Path

like image 584
ShaneKm Avatar asked May 17 '26 03:05

ShaneKm


1 Answers

It appears that msbuild is not available in microsoft/dotnet-framework-build image.

I suspect (!) that this image contains the dotnet binary but not msbuild. One alternative is to find an image that includes it. Another option is to add it to the microsoft/dotnet-framework-build.

You are able to access msbuild from your local machine because it's installed there. When you run docker build, the Dockerfile is executed within the operating system defined by the image's FROM statements.

like image 154
DazWilkin Avatar answered May 18 '26 16:05

DazWilkin



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!