2

So, I have a project in VS2017, and VS2017 has recently received an update. I have then added all the wxWidgets modules as projects to my initial solution and have dealt with build order so they're built in the proper order.

However, I always get this error:

C:\Programs\Visual Studio 2017\Common7\IDE\VC\VCTargets\Microsoft.Cpp.Common.props(144,5): warning
MSB4211: The property "WindowsTargetPlatformVersion" is being set to a value for the first time, but it was already consumed at
"C:\Programs\Visual Studio 2017\Common7\IDE\VC\VCTargets\Microsoft.Cpp.WindowsSDK.props (29,5)".

I've found this thread and the article linked in it: link

but it doesn't tell me how to fix it. From what I can tell, the properties for individual project are not evaluated in an order they should be evaluated.

How do I define the property sheet ordering? What exactly do I need to change?

Also not that I cannot change the project files or anything connected to wxWidgets since it's a submodule in my repository and any changes done cannot be saved to the repo.

Karlovsky120
  • 6,212
  • 8
  • 41
  • 94

2 Answers2

5

Disclaimer: I haven't got a clue about your issue ,just trying to help you (the OP) !

In the IDE ,under menu View ,select other windows. There select Property Manager ,which let you manipulate property sheets in your projects. Right-click on a property-sheet. Some sheets have a menu which let you move the sheet up or down.

I suggest to play around with that. It might just solve your issue. I could be completely wrong of course.

engf-010
  • 3,980
  • 1
  • 14
  • 25
  • It's a step in the right direction, but I can't really do anythin here. I tried to compile wxWidgets with the sln provided, and I still got an error though, making me believe that this is a problem with my system setup, not solution setup... – Karlovsky120 Feb 08 '18 at 19:17
  • This is the right answer. Also check [this](https://stackoverflow.com/a/6617068/4743275) out. It's easy. Basically the properties from the property sheet that is located towards the top are those of the project properties (unless the project has specific properties). It will work. Good feature of MSVS actually (once you get to know it). If that doesn't work for you then you've probably made manual adjustments to project/solution xml-like files or there might be something else entirely. – KeyC0de Oct 08 '18 at 01:30
1

I had the same problem, with a different library though.

The cause for me was that in the project that I converted, the configuration that I was compiling with was not present in the props file

C:\Users\\AppData\Local\Microsoft\MSBuild\v4.0\Microsoft.Cpp.x64.user.props

For example, in the vcxproj file I had

<ProjectConfiguration Include="DLL Release|x64">
  <Configuration>DLL Release</Configuration>
  <Platform>x64</Platform>
</ProjectConfiguration>

but in the props file I only had:

  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
    <ClCompile>
      <PreprocessorDefinitions>MYMACRO1;MYMACRO2;%(PreprocessorDefinitions)</PreprocessorDefinitions>
    </ClCompile>
  </ItemDefinitionGroup>

I just added a similar entry for 'DLL Release|x64' and that fixed it.

Definitely the warning message is not very helpful in this case.