Skip to main content
Solved

dotnet or msbuild - what and why?

  • August 4, 2026
  • 2 replies
  • 26 views

Neil Hayes
Forum|alt.badge.img+1

Should you use dotnet build or msbuild to compile COBOL assemblies to .NET core 8?

For example if I wanted to do a local recompile of my whole applications, I have a PowerShell script that does the compile, but I used “dotnet build”

When I went and loaded a project and compiled,  I think I observed after using “dotnet build” then using Visual Studio you get a file tracking log file error, “The tracking data is invalid”  FTK1013.

Agreed dotnet build is more lightweight, but are there other consequences?

Neil

Best answer by Simon Ellis

dotnet build and msbuild are really the same thing. That is they are built from the same source and multitargeted; msbuild is .NET Framework and installed to your Visual Studio instance and used when you work with solutions/projects inside the IDE. dotnet build is targeted to .NET (Core). You can use either outside the IDE.

They could be built from different versions of the source code which can introduce differences, but the most obvious difference is that the .NET (Core) version is cross-platform and msbuild is tied to Windows/Visual Studio. That means there are certain Windows-centric or .NET Framework-centric things that are not supported in the .NET (Core) version.

One example is the file tracker which is a low level native code Windows-only utility. For the dotnet build scenario we provide our own implementation to handle the COBOL compilation scenario. One of the goals here was to conform to Microsoft’s own tracking log files but it appears in your scenario there is something amiss. That is the cause of the error you are seeing and potentially a bug in our implementation. A Rebuild in Visual Studio should be enough to resolve this. You can open a support incident and we’ll take a look.

Whether you use msbuild or dotnet build, the built outputs should be the same.

 

2 replies

  • Rocketeer
  • Answer
  • August 5, 2026

dotnet build and msbuild are really the same thing. That is they are built from the same source and multitargeted; msbuild is .NET Framework and installed to your Visual Studio instance and used when you work with solutions/projects inside the IDE. dotnet build is targeted to .NET (Core). You can use either outside the IDE.

They could be built from different versions of the source code which can introduce differences, but the most obvious difference is that the .NET (Core) version is cross-platform and msbuild is tied to Windows/Visual Studio. That means there are certain Windows-centric or .NET Framework-centric things that are not supported in the .NET (Core) version.

One example is the file tracker which is a low level native code Windows-only utility. For the dotnet build scenario we provide our own implementation to handle the COBOL compilation scenario. One of the goals here was to conform to Microsoft’s own tracking log files but it appears in your scenario there is something amiss. That is the cause of the error you are seeing and potentially a bug in our implementation. A Rebuild in Visual Studio should be enough to resolve this. You can open a support incident and we’ll take a look.

Whether you use msbuild or dotnet build, the built outputs should be the same.

 


Neil Hayes
Forum|alt.badge.img+1
  • Author
  • Participating Frequently
  • August 5, 2026

Thank you Simon. I raise case : 01202108 with simple duplication steps (Well for me anyway).

Agreed a rebuild can resolve it.