[SOLVED] Problems with Microsoft.CppCommon.targets and Microsoft.Cpp.Default.props

Hi

It’s my first post here so hello to you :slight_smile:

I started adventure with cocos2d (v3.3) recently and want to create simple game for Windows 8.1 desktop.

I followed Programmers Guide Appx G but at the end of compilation cpp-tests from cocos2d-win32.vc2012.sln I get:

	Line 95: 2>TRACKER : error TRK0002: Failed to execute command: ""C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\Lib.exe" @C:\Users\luk\AppData\Local\Temp\tmp07f7fdfbbc404747b1c963f1688c6d0a.rsp". Odmowa dostępu.
	Line 98: 1>TRACKER : error TRK0002: Failed to execute command: ""C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\Lib.exe" @C:\Users\luk\AppData\Local\Temp\tmpc7af6376ebfe4139a23813ec291188d4.rsp". Odmowa dostępu.
	Line 591: 3>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.CppCommon.targets(127,5): error MSB6003: The specified task executable "cmd.exe" could not be run. Odmowa dostępu
	Line 819: 4>TRACKER : error TRK0002: Failed to execute command: ""C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\link.exe" /ERRORREPORT:PROMPT @C:\Users\luk\AppData\Local\Temp\tmpfa2ac5d79ae9426480a60323dd2d3dce.rsp". Odmowa dostępu.
	Line 819: 4>TRACKER : error TRK0002: Failed to execute command: ""C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\link.exe" /ERRORREPORT:PROMPT @C:\Users\luk\AppData\Local\Temp\tmpfa2ac5d79ae9426480a60323dd2d3dce.rsp". Odmowa dostępu.

“Odmowa dostępu” means “Access denied”.

In README.md where I have found link to MS Open Tech Cocos2d-x. After simple steps from that tut I get:

c:\Users\luk\Projekty\cocos2d-x-3.3>cocos run -s projects\MyGame -p win32
Running command: compile
Building mode: debug
building
Required VS version : 11.0
find vs in reg : 64bit
find vs in reg : 32bit
Find VS path : C:\Program Files (x86)\Microsoft Visual Studio 12.0\
Not found devenv. Try to use msbuild instead.
Found msbuild path: C:\Program Files (x86)\MSBuild\12.0\bin\amd64\MSBuild.exe
running: '"C:\Program Files (x86)\MSBuild\12.0\bin\amd64\MSBuild.exe" "c:\Users\luk\Projekty\cocos2d-x-3.3\projects\MyGame\proj.win32\MyGame.sln" /target:MyGame /property:Configura
tion=Debug /maxcpucount:2'

Microsoft (R) Build Engine version 12.0.31101.0
[Microsoft .NET Framework, version 4.0.30319.34014]
Copyright (C) Microsoft Corporation. All rights reserved.

Build started 2015-01-15 21:01:21.
     1>Project "c:\Users\luk\Projekty\cocos2d-x-3.3\projects\MyGame\proj.win32\MyGame.sln" on node 1 (MyGame target(s)).
     1>ValidateSolutionConfiguration:
         Building solution configuration "Debug|Win32".
     1>Project "c:\Users\luk\Projekty\cocos2d-x-3.3\projects\MyGame\proj.win32\MyGame.sln" (1) is building "c:\Users\luk\Projekty\cocos2d-x-3.3\projects\MyGame\proj.win32\MyGame.v
       cxproj.metaproj" (2) on node 1 (default targets).
     2>Project "c:\Users\luk\Projekty\cocos2d-x-3.3\projects\MyGame\proj.win32\MyGame.vcxproj.metaproj" (2) is building "c:\Users\luk\Projekty\cocos2d-x-3.3\projects\MyGame\cocos2
       d\cocos\2d\libcocos2d.vcxproj" (3) on node 1 (default targets).
     3>c:\Users\luk\Projekty\cocos2d-x-3.3\projects\MyGame\cocos2d\cocos\2d\libcocos2d.vcxproj(19,3): error MSB4019: The imported project "c:\Microsoft.Cpp.Default.props" was not
       found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.
     3>Done Building Project "c:\Users\luk\Projekty\cocos2d-x-3.3\projects\MyGame\cocos2d\cocos\2d\libcocos2d.vcxproj" (default targets) -- FAILED.
     2>Done Building Project "c:\Users\luk\Projekty\cocos2d-x-3.3\projects\MyGame\proj.win32\MyGame.vcxproj.metaproj" (default targets) -- FAILED.
     1>Done Building Project "c:\Users\luk\Projekty\cocos2d-x-3.3\projects\MyGame\proj.win32\MyGame.sln" (MyGame target(s)) -- FAILED.

Build FAILED.

       "c:\Users\luk\Projekty\cocos2d-x-3.3\projects\MyGame\proj.win32\MyGame.sln" (MyGame target) (1) ->
       "c:\Users\luk\Projekty\cocos2d-x-3.3\projects\MyGame\proj.win32\MyGame.vcxproj.metaproj" (default target) (2) ->
       "c:\Users\luk\Projekty\cocos2d-x-3.3\projects\MyGame\cocos2d\cocos\2d\libcocos2d.vcxproj" (default target) (3) ->
         c:\Users\luk\Projekty\cocos2d-x-3.3\projects\MyGame\cocos2d\cocos\2d\libcocos2d.vcxproj(19,3): error MSB4019: The imported project "c:\Microsoft.Cpp.Default.props" was no
       t found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.

    0 Warning(s)
    1 Error(s)

Time Elapsed 00:00:00.15
Error running command, return code: 1
c:\Users\luk\Projekty\cocos2d-x-3.3>

Problem seems to be with some configuration and those property files…

Did you have such issue?
How to solve this case?

BR,
luk

Finally found answer on stackoverflow. It was necessary to set VCTargetsPath variable before running cocos.py.

Maybe this info should appear in Programmer’s Guide?

How do you set this variable to cocos code ide?
I can compile from command line using your solution but not from cocos code ide “build runtime”