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
dotnet or msbuild - what and why?
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.
Sign up
Already have an account? Login
Welcome to the Rocket Forum!
No account yet? Create an account
Please log in or register:
Employee Login | Registration Member Login | RegistrationEnter your E-mail address. We'll send you an e-mail with instructions to reset your password.
