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 dialog 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
Related
**i find this error when i try to run my application on windows **
Launching lib\main.dart on Windows in debug mode...
Building Windows application...
Nuget.exe not found, trying to download or use cached version.
C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(157,5): error MSB3073: The command "setlocal [D:\fluttr_project\downloader\build\windows\INSTALL.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(157,5): error MSB3073: "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -DBUILD_TYPE=Debug -P cmake_install.cmake [D:\fluttr_project\downloader\build\windows\INSTALL.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(157,5): error MSB3073: if %errorlevel% neq 0 goto :cmEnd [D:\fluttr_project\downloader\build\windows\INSTALL.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(157,5): error MSB3073: :cmEnd [D:\fluttr_project\downloader\build\windows\INSTALL.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(157,5): error MSB3073: endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone [D:\fluttr_project\downloader\build\windows\INSTALL.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(157,5): error MSB3073: :cmErrorLevel [D:\fluttr_project\downloader\build\windows\INSTALL.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(157,5): error MSB3073: exit /b %1 [D:\fluttr_project\downloader\build\windows\INSTALL.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(157,5): error MSB3073: :cmDone [D:\fluttr_project\downloader\build\windows\INSTALL.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(157,5): error MSB3073: if %errorlevel% neq 0 goto :VCEnd [D:\fluttr_project\downloader\build\windows\INSTALL.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(157,5): error MSB3073: :VCEnd" exited with code 1. [D:\fluttr_project\downloader\build\windows\INSTALL.vcxproj]
Exception: Build process failed.
------------------------------ flutter docotor ---------------------------------------
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 2.10.2, on Microsoft Windows [Version 10.0.22000.613], locale en-US)
[!] Android toolchain - develop for Android devices (Android SDK version 32.1.0-rc1)
X cmdline-tools component is missing
Run `path/to/sdkmanager --install "cmdline-tools;latest"`
See https://developer.android.com/studio/command-line for more details.
X Android license status unknown.
Run `flutter doctor --android-licenses` to accept the SDK licenses.
See https://flutter.dev/docs/get-started/install/windows#android-setup for more details.
[√] Chrome - develop for the web
[√] Visual Studio - develop for Windows (Visual Studio Enterprise 2022 17.1.4)
[√] Android Studio (version 4.1)
[√] IntelliJ IDEA Community Edition (version 2020.3)
[√] VS Code (version 1.66.2)
[√] Connected device (3 available)
[√] HTTP Host Availability
! Doctor found issues in 1 category.
I found a fix for that recently:
In Visual Studio go to Tools -> Options -> Nuget -> General and click on the "Clear All Nuget Cache(s)" button.
Mentioned here: Package is not found in the following primary source
Update visual studio and down load nuget Package manager in it. then restart your pc.
I would like to run a batch file below with VisualStudio2017 developer's command prompt.
Set PATH=c:\Program Files\Microsoft Visual Studio 8\VC\bin;%PATH%
Set INCLUDE=c:\Program Files\Microsoft Visual Studio 8\VC\include;c:\Program Files\Microsoft Platform SDK\Include;%INCLUDE%
Set LIB=c:\Program Files\Microsoft Visual Studio 8\VC\lib;c:\Program Files\Microsoft Platform SDK\Lib;%LIB%
Set COMSPEC=cmd.exe
rem nmake -f Makefile.msvc clean
nmake -f Makefile.msvc
But, my command prompt say that "nmake is not recognized as internal-command, external-command, operatable-program or batch-file." in JAPANESE.(see attatched file)
Please tell me that how to use "nmake" command with VisualStudio2017.
I am unable to add an assembly into GAC. Please assist in getting it work. I ran following command in VisualStudio13 CMD
gacutil /i “<C:\Program Files\ibm\IBM DATA SERVER DRIVER>\bin\netf40_32\IBM.Data.DB2.Entity.dll”
Error Message:
Command "gacutil" is not valid.
Also, i checked there is also no gacutil.exe file on path
C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin\NETFX 4.0
Tools
But when i access the path there is no gacutil file as shown:
The issue was Windows Explorer path(C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin\NETFX 4.0 Tools\gacutil.exe) had no "gacutil.exe". Accessing the same path through cmd listed down "gacutil.exe" as present.
Thus, instead of just giving command gacutil-i to add an assembly in cache, i gave full path
C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin\NETFX 4.0Tools\gacutil.exe -i
Don't trust windows explorer. Trust command credits# Sir Conrad Frix-Comments
You can either drag-drop the .dll into c:\windows\assembly folder or check C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6 Tools\x64 for gacutil as its part of .net framework, not your IDE. Hope it helps!
I'm using vcvarsall to switch to x64 compile tools for VS2010, as I run into memory issues with a certain build. However I'd like to also switch BACK to x86 tools for regular builds.
Currently I have a batch file that looks like this:
CALL "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" x64
set _IsNativeEnvironment=true
"C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\devenv" "C:\Development\projectx.sln" /build "Debug|x64"
CALL "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" x86
set _IsNativeEnvironment=true
"C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\devenv" "C:\Development\projectx.sln" /build "Debug|x86"
This works for the first build, but the second will still launch 64bit compiler/linker - which gives errors occasionally (why I need to use 32 for it).
In testing I found that it will work only if I open a new command line after running the x86 vcvarsall.bat - how can I mimic this in a batch file?
Use setlocal and endlocal
setlocal
CALL "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" x64
set _IsNativeEnvironment=true
"C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\devenv" "C:\Development\projectx.sln" /build "Debug|x64"
endlocal
setlocal
CALL "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" x86
set _IsNativeEnvironment=true
"C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\devenv" "C:\Development\projectx.sln" /build "Debug|x86"
endlocal
Can I create a new one? Can someone tell me where it points to ?
Thank you
My shortcut's target is:
%comspec% /k ""C:\Program Files\Microsoft Visual Studio
10.0\VC\vcvarsall.bat"" x86
My Start directory is:
"C:\Program Files\Microsoft Visual Studio 10.0\VC\"
Per the target of my shortcut:
%comspec% /k ""C:\Program Files\Microsoft Visual Studio 10.0\VC\vcvarsall.bat"" x86
and the main exe target...
"C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\devenv.exe"
The target for mine is:
%comspec% /k ""C:\Program Files\Microsoft Visual Studio 10.0\VC\vcvarsall.bat"" x86
%comspec% /k ""C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat"" x86
That's on a 64-bit system.