开发者

Using XdcMake with Windows 7.1 SDK

Problem

I'm having trouble using XdcMake to generate XML documentation in a C++ project in Visual Studio 2010 using the Windows 7.1 SDK.

Using Visual Studio's 7.0A SDK (v100) XdcMake runs fine, but with the Windows 7.1 SDK (v7.1) the following error message appears when building:

C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(775,5): error MSB6006: "xdcmake.exe" exited with code -1073741701."

When building via console MSBuild an additional error dia开发者_StackOverflowlog popups, stating:

xdcmake.exe - Application Error
The application was unable to start correctly (0xc000007b). Click OK to close the application.

Question

So my question is whether XdcMake is working for anyone else with the V7.1 SDK, and if it does, what might be wrong in my case.

Diagnostics

The error code 0xc000007b suggests that there's some mismatching executable architecture. Diagnostic MSBuild output identifies the failing command as:

Task "XDCMake"
 D:\Program Files\Dev\Visual Studio\10.0\VC\bin\xdcmake.exe /old "XdcTest" /nologo /Fo"D:\XdcTest\Test-v7.1\XdcTest.xml" /Fs"Test-v7.1\main.xdc"
 Tracking command:
 D:\Program Files\Dev\Sdk\Windows\v7.1\bin\NETFX 4.0 Tools\Tracker.exe /d C:\Windows\Microsoft.NET\Framework64\v4.0.30319\FileTracker.dll /i D:\XdcTest\Test-v7.1 /r D:\XDCTEST\TEST-V7.1\MAIN.XDC /b MSBuildConsole_CancelEvent04ce1cba7b0043f99e27c7ca7d5a58e5 /c "D:\Program Files\Dev\Visual Studio\10.0\VC\bin\xdcmake.exe" /old "XdcTest" /nologo /Fo"D:\XdcTest\Test-v7.1\XdcTest.xml" /Fs"Test-v7.1\main.xdc"
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(775,5): error MSB6006: "xdcmake.exe" exited with code -1073741701. [D:\XdcTest\XdcTest.vcxproj]

I experimented with both mentioned Windows SDKs and platform settings and noticed the following executed commands (abbreviated):

[x] dev10_x64-v100-Win32.txt:  "C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\bin\NETFX 4.0 Tools\x64\Tracker.exe" /d C:\Windows\Microsoft.NET\Framework64\v4.0.30319\FileTracker.dll /c "D:\Program Files\Dev\Visual Studio\10.0\VC\bin\xdcmake.exe"
[x] dev10_x64-v100-x64.txt:    "C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\bin\NETFX 4.0 Tools\x64\Tracker.exe" /d C:\Windows\Microsoft.NET\Framework64\v4.0.30319\FileTracker.dll /c "D:\Program Files\Dev\Visual Studio\10.0\VC\bin\AMD64\xdcmake.exe"
[x] dev10_x86-v100-Win32.txt:  "C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\bin\NETFX 4.0 Tools\x64\Tracker.exe" /d C:\Windows\Microsoft.NET\Framework64\v4.0.30319\FileTracker.dll /c "D:\Program Files\Dev\Visual Studio\10.0\VC\bin\xdcmake.exe"
[x] dev10_x86-v100-x64.txt:    "C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\bin\NETFX 4.0 Tools\x64\Tracker.exe" /d C:\Windows\Microsoft.NET\Framework64\v4.0.30319\FileTracker.dll /c "D:\Program Files\Dev\Visual Studio\10.0\VC\bin\xdcmake.exe"
[ ] dev10_x64-v7.1-Win32.txt:  "D:\Program Files\Dev\Sdk\Windows\v7.1\bin\NETFX 4.0 Tools\Tracker.exe"                   /d C:\Windows\Microsoft.NET\Framework64\v4.0.30319\FileTracker.dll /c "D:\Program Files\Dev\Visual Studio\10.0\VC\bin\xdcmake.exe"
[x] dev10_x64-v7.1-x64.txt:    "D:\Program Files\Dev\Sdk\Windows\v7.1\bin\NETFX 4.0 Tools\x64\Tracker.exe"               /d C:\Windows\Microsoft.NET\Framework64\v4.0.30319\FileTracker.dll /c "D:\Program Files\Dev\Visual Studio\10.0\VC\bin\amd64\xdcmake.exe"
[ ] dev10_x86-v7.1-Win32.txt:  "D:\Program Files\Dev\Sdk\Windows\v7.1\bin\NETFX 4.0 Tools\Tracker.exe"                   /d C:\Windows\Microsoft.NET\Framework64\v4.0.30319\FileTracker.dll /c "D:\Program Files\Dev\Visual Studio\10.0\VC\bin\xdcmake.exe"
[ ] dev10_x86-v7.1-x64.txt:    "D:\Program Files\Dev\Sdk\Windows\v7.1\bin\NETFX 4.0 Tools\Tracker.exe"                   /d C:\Windows\Microsoft.NET\Framework64\v4.0.30319\FileTracker.dll /c "D:\Program Files\Dev\Visual Studio\10.0\VC\BIN\xdcmake.exe"

An "x" denotes a working combination. "dev10_x64" is a shell prepared with "vcvarsall.bat amd64", and "dev10_x86" with "vcvarsall.bat x86".

What I gather from that is that the wrong tracker.exe is selected (except in one case) when using the v7.1 SDK which fails to run xdcmake.exe. Testing different combinations confirms that x86 tracker + x86 filetracker runs native/managed x86 programs, x64 tracker/x64 filetracker runs native/managed x64 and managed AnyCPU. And since xdcmake.exe is a managed AnyCPU exe, and I run a 64-bit Windows, it requires the 64-bit tracker.

I reinstalled the Windows 7.1 SDK without success, and browsing through the installed MSBuild files for C++ projects didn't reveal anything helpful to me. I can hardcode the x64 Tracker.exe in C:\Program Files (x86)\MSBuild\4.0\Microsoft.NETFramework.targets\ImportAfter\Microsoft.NetFramework4.Windows7.1SDK.props, but this doesn't seem right.

Steps to reproduce

Here is a small project to test this: http://dl.dropbox.com/u/37016844/XdcTest.zip

It includes two configurations: Test-v7.1 for the 7.1 Windows SDK, and Test-v100 for the 7.0A SDK. As shown in the initial post, the only combination with V7.1 that works is Platform=x64 using the x64 toolchain.

msbuild XdcTest.sln -p:Configuration=Test-v7.1 -p:Platform=Win32 -t:Rebuild
msbuild XdcTest.sln -p:Configuration=Test-v7.1 -p:Platform=x64 -t:Rebuild
msbuild XdcTest.sln -p:Configuration=Test-v100 -p:Platform=Win32 -t:Rebuild
msbuild XdcTest.sln -p:Configuration=Test-v100 -p:Platform=x64 -t:Rebuild

For reference here are the involved files with their architecture, version and SHA1 hash:

                  Arch            Version       SHA1                                      Path
Tracker.exe
 v7.0a-x86      : Native-x86      4.0.30319     3bf12583e8c69de866cd9f8532f449bed3a46443  C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\bin\NETFX 4.0 Tools\Tracker.exe
 v7.0a-x64      : Native-x64      4.0.30319     7cc65c574e8dcb1f3ff384357d0b0955b8bd4405  C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\bin\NETFX 4.0 Tools\x64\Tracker.exe
 v7.1-x86       : Native-x86      4.0.30319     3bf12583e8c69de866cd9f8532f449bed3a46443  D:\Program Files\Dev\Sdk\Windows\v7.1\bin\NETFX 4.0 Tools\Tracker.exe
 v7.1-x64       : Native-x64      4.0.30319     7cc65c574e8dcb1f3ff384357d0b0955b8bd4405  D:\Program Files\Dev\Sdk\Windows\v7.1\bin\NETFX 4.0 Tools\x64\Tracker.exe
FileTracker.dll
 v4.0.30319-x86 : Native-x86      10.0.30319.1  328c1e7449612c354063a3c761577bab9f1cc2ab  C:\Windows\Microsoft.NET\Framework\v4.0.30319\FileTracker.dll
 v4.0.30319-x64 : Native-x64      10.0.30319.1  883bc6d0c64e315d6b80733ac8fb9cec8c5cf57d  C:\Windows\Microsoft.NET\Framework64\v4.0.30319\FileTracker.dll
xdcmake.exe
 dev10-x86      : Managed-AnyCPU  10.00.30319   8c9b7e31a80bf81488464dd106e6ecec097a47cb  D:\Program Files\Dev\Visual Studio\10.0\VC\bin\xdcmake.exe
 dev10-x64      : Managed-AnyCPU  10.00.30319   22910925f1eff9491ddde1166ed32956a98963bd  D:\Program Files\Dev\Visual Studio\10.0\VC\bin\amd64\xdcmake.exe

OS is a 64-bit Windows 7 Professional (6.1.7601 Service Pack 1 Build 7601); with VS2010 Ultimate SP1.


Microsoft confirmed that it's a bug on x64 platform and as workaround they suggest don't use xdcmake - http://connect.microsoft.com/VisualStudio/feedback/details/459478/upgraded-project-causes-error-in-xdcmake-exe

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜