I have the following problem with latest Visual Studio 2017 (starting from March, 15/20th 2018):
1) Create a Visual studio Project for a C++ DLL (and related solution), for example dll1Prova
2) Add a resource file (file with ".rc" extension) with version information
3) Save all files and compile. Compilation is good, and all seems functional
4) Then with MSBuild I try to build the solution with the following commands (from Command Prompt):
set VisualStudioVersion=15.0 set VCTargetsPath=C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\VC\VCTargets
"C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\15.0\Bin\msbuild.exe" dll1Prova.sln /nologo /p:PlatformToolset=v141;Configuration=Debug /v:detailed
I obtain the following error at the end of the log:
"C:\Users\LazzaAnd\source\repos\Dll1Prova\dll1Prova.sln" (default target) (1) -> "C:\Users\LazzaAnd\source\repos\Dll1Prova\Dll1Prova\Dll1Prova.vcxproj" (default target) (2) -> (Link target) -> LINK : fatal error LNK1158: cannot run 'cvtres.exe' [C:\Users\LazzaAnd\source\repos\Dll1Prova\Dll1Prova\Dll1Prova.vcx proj]
The problem seems to be related to security issue, because all is functional when I run MSBUild as a Machine Administrator (start Command Prompt with "Run as Administrator").
I put an issue on a Microsoft social forum:
but, when I found the workaround (run as Administrator) there seems to be no further suggestion/investigation. Does anyone have the same problem and/or some solution for this?

