0

Due to disk size constraints, I installed MSVS 2017 to D:\Program Files\Visual Studio.

I then installed PVS-Studio v6.14. When I tried to run it, I get the following error messages:

Error was encountered while opening project 'MIDI2LR.vcxproj'.  0
Exception message:   0
Could not find a part of the path 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC'.  0

It also appears that PVS-Studio did install its extensions into the D:\Program Files\Visual Studio\Common7\IDE\Extensions\3ci0fu2p.p0x directory, so it appears that the installer found the executable.

How do I point PVS-Studio to the correct directories?

rsjaffe
  • 5,600
  • 7
  • 27
  • 39
  • Hi, @rsjaffe! First of all, which Visual Studio versions you have installed in your system besides VS2017? Secondly, we will need your project file (vcxproj). You can send it to _support@viva64.com_. Thanks for your feedback! – Sergey Vasiliev Mar 20 '17 at 06:40

1 Answers1

0

If I have understood correctly, we are talking about /Builds/VisualStudio2017/MIDI2LR.vcxproj from your repository (develop branch). If you're talking about another project, please specify it. The information is based on the analysis of the project I mentioned before.

Does this project compile on your machine? If a project does not compile, PVS-Studio does not guarantee the analysis. Otherwise, the analysis should be performed correctly. I also note that for the compilation you have to have the components Visual C++ Build Tools 2015 installed (in this context we use the contents of the directory C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC).

In this case, such behavior occurs because of your project's file structure – the PlatformToolset property is set with a value v140 before the import of Microsoft.Cpp.Default.props, thus this import is performed based on this toolset. This causes MSBuild to use the compiler from Visual C++ 2015, and not from Visual C++ 2017.

To compile using the compiler from VS2017 (V141 toolset), you need to modify the project file (see example of a console application project file that is created in Visual Studio 2017). Then the compilation should be done with a correct compiler and the analysis with PVS-Studio performed correctly.

Sergey Vasiliev
  • 803
  • 8
  • 19
  • I had converted the project from v140 to v141 in the build properties dialog, but somehow that didn't change the vcxproj file. The project was building but PVS-Studio wasn't working. Changing the values in vcxproj fixed the problem. PVS-Studio is now working. Thanks. – rsjaffe Mar 21 '17 at 14:24