Project properties do not open - "There are no property pages to select"

Visual Studio does not unexpectedly display Project Properties for multiple projects in multiple solution files.

I right-clicked on a project in Solution Explorer and I get an error message: There are no property pages for the selection.

I do not think that the problem may be related to the project files themselves - I see this in the project files pulled from the general git repository without any changes; These projects worked correctly yesterday and continue to work without problems for my friends in the office.

I do not know if Visual Studio settings have been changed in any way.

Any idea what could be causing this?

I am using Microsoft Visual Studio Professional 2015, version 14.0.24720.00 Update 1, on Windows 7 (SP1), and I am working on projects in C ++.

+5
source share
2 answers

I found the source of the problem! The problem is my environment variable VCTargetsPath.

It turns out that mine is VCTargetsPathset to:

C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140 

- what seems right; what is the correct directory.

Unfortunately, it lacks a final backslash - it should be:

C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\

Without this backslash at the end, it doesn't work.

Apparently, the problems I ran into were various Visual Studio examples trying to compile paths incorrectly on top of that path, for example. The following error I was trying to create an Android project (shown in bold):

1 > C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.Cpp.Clang.targets(210,5): MSB4062: "ClangCompile" C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\ V140Microsoft.Build.CppTasks.Common.dll. :///C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\ V140Microsoft.Build.CppTasks.Common.dll . .

, ( , ).

, , VCTargetsPath , , .


, , . ++, , .

1. . ++ (, Empty ++ Project), :

  • 'null' is null or not an object
  • Exception from HRESULT: 0x800A138F

, : " " Project1 "... .

2. . , :

  • The desired name for C:\tmp\foo.cpp is invalid.
  • The operation could not be completed. The parameter is incorrect. .

3. . , MyProject Property Pages ( MyProject - ) : There are no property pages for the selection.

, , , , . Microsoft.Cpp.Win32.user Property Pages.

4. Visual Studio , . Visual Studio - ++ . , , : , - , . , .

+14

VS2017

PowerShell:

[Environment]::SetEnvironmentVariable("VCTargetsPath", "C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\VC\VCTargets\", "Machine")
0

All Articles