How to execute the visual studio specific linker.exe from the MSBUILD script
I am in a situation to call the “linker.exe” during the C# project (.csproj) build. If I am building the C# project with Visual studio 2019, then I want to execute the Visual Studio 2019 linker, or if I am building with Visual Studio 2022 then i want to execute the Visual Studio 2022 linker. I have tried below approaches, but all of them are failing to find the visual studio specific link.exe.
1- learn.microsoft.com/en-us/visualstudio/msbuild/link-task?view=vs-2022
Its failing, and throwing error – error MSB4018: Microsoft.Build.Shared.InternalErrorException: MSB0001: Internal MSBuild Error: link.exe unexpectedly not a rooted path. Not able to locate the linker.exe.
2- Tried executing the linker.exe by executing the linker.exe using the
So, it will be great if anybody knows how to execute the
Read more here: Source link
