Code Analysis is not working for WDK project on Windows container

  • Thread starter Thread starter LiangMing2003
  • Start date Start date
L

LiangMing2003

Guest
I got following error when compiling a C++ driver project with Build Tools 2017 in Windows container “windowservercore”.


Running Code Analysis for C/C++...

c1xx : error C2220: warning treated as error - no 'object' file generated [C:\jenkins\workspace\ABC-DEV\ABC\ABC.vcxproj]

c1xx : fatal error C1250: Unable to load plug-in 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\localespc.dll'. [C:\jenkins\workspace\ABC-DEV\ABC\ABC.vcxproj]




Building it with same build tools and workloads on Win10 does not have this problem.
localespc.dll is actually present under ‘C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin’ in container.

How to resolve this error?

Compile script:


call "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Auxiliary\Build\vcvarsall.bat" x64

"C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\MSBuild.exe" C:\Work\ABC.sln /p:configuration=Release /p:platform=x64 /t:rebuild




This error can be resolved by adding the /p:PlatformToolset=v141 to the compile command, but the project cannot be built successfully with the value of PlatformToolset change from “WindowsKernelModeDriver10.0” to “v141”.

For details of the problem,pls see the below link.
Code Analysis is not working on Windows container - Developer Community

Continue reading...
 
Back
Top