If you found this post useful, consider buying something fun/useful for yourself or a gift for a friend using my banggood referral link and I’ll get a little commission (you still get the same -best- price). Thank you.

Maybe you are using a build server, with Jenkins or a similar tool and you did not install Visual Studio 2017. I have such a setup and I installed just the ms build tools standalone package, find it at the bottom of this page: Build Visual Studio Downloads > find Build Tools for Visual Studio 2017.

Solution

In my case, I noticed I forgot to select also Web development build tools > .NET Framework 4.6.2 development tools:

Updating ms build tools and adding this missing component did the job. Now when I run msbuild I get my artifacts as expected.

If this solution helped you, consider buying something at my favorite affiliate website. I consider this better than asking a donation, because like this you get a product you may need and use and I just get a little commission, which doesn’t affect the price, so win to win 😉