In my Visual Studio 2010 project we are running a prebuild and postbuildevent in a C# project as follows:
prebuildevent: "C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin\rc.exe" "$(ProjectDir)$(ProjectName).rc"
postbuildevent: "C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin\mt.exe" -manifest "$(ProjectDir)$(TargetName).exe.manifest" -outputresource:"$(TargetDir)$(TargetFileName)";#1
Where, path for rc.exe and mt.exe are hardcoded for Visual Studio 2010. Now we are migrating from Visual Studio 2010 to Visual Studio 2019.
In Visual Studio 2019, rc.exe and mt.exe are present in this path: "C:\Program Files (x86)\Windows Kits\10\bin\10.0.17763.0\x86\rc.exe" and "C:\Program Files (x86)\Windows Kits\10\bin\10.0.17763.0\x86\mt.exe".
But I cant use the above mentioned hardcoded path because as the Windows SDK Version gets changed for every SDK Version update.
I found that we can use WindowsSdkverbinpath variable to get the latest windows sdk version path, but in my case this i am able to use it like $(WindowsSdkverbinpath) for c++ projects and it is resolving the path and c# projects i am not able to use it like in c++ projects.
Purpose of searching WindowsSdkverbinpath is to use it in prebuild and postbuild events to access mt.exe and rc.exe
Please can anyone help me in getting the WindowsSdkverbinPath to use it in prebuild and postbuildevents for a c# project, Thanks in advance.