के बिना मेरे पास वीएस -2010 में विकसित एक सी ++ प्रोजेक्ट (कंसोल 32-बिट एपप्लिकेशन का कुछ प्रकार) है, जो मेरे पीसी पर ठीक है (विंडोज 7 32-बिट) । मेरे पीसी में माइक्रोसॉफ्ट एसडीके 7.0 ए स्थापित है, जो मुझे लगता है कि वीएस -2010 के साथ आता है।
मैं एक बिल्ड सर्वर पर प्रोजेक्ट बनाने का प्रयास करता हूं, जिसमें कोई विजुअल स्टूडियो स्थापित नहीं है - केवल माइक्रोसॉफ्ट एसडीके 7.1 मौजूद है।
मैं MSBuild की मदद से परियोजना (यह अंततः TeamCity के धावक के लिए काम हो जाएगा) के निर्माण के लिए प्रयास करें, और निर्माण सर्वर पर मैं त्रुटियों निम्नलिखित मिल (विस्तृत लॉग प्रदान की जाती है):विंडोज एसडीके 7.1 के साथ पीसी पर बिल्डिंग सी ++ प्रोजेक्ट, लेकिन वीएस -2010
Project "E:\win\core.sln" on node 1 (default targets).
ValidateSolutionConfiguration:
Building solution configuration "Debug|Win32".
Project "E:\win\core.sln" (1) is building "E:\win\core_unittests.vcxproj" (2) on node 1 (default targets).
Project "E:\win\core_unittests.vcxproj" (2) is building "E:\cpptest\win\cpptest.vcxproj" (3) on node 1 (default targets).
C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.Targets(847,9): warning MSB3644: The reference assemblies for framework ".NETFramework,Version=v4.0" were not found. To resolve this, install the SDK or Targeting Pack for this framework version or retarget your application to a version of the framework for which you have the SDK or Targeting Pack installed. Note that assemblies will be resolved from the Global Assembly Cache (GAC) and will be used in place of reference assemblies. Therefore your assembly may not be correctly targeted for the framework you intend. [E:\cpptest\win\cpptest.vcxproj]
C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppBuild.targets(297,5): warning MSB8003: Could not find WindowsSDKDir variable from the registry. TargetFrameworkVersion or PlatformToolset may be set to an invalid version number. [E:\win\cpptest.vcxproj]
InitializeBuildStatus:
Touching "E:\cpptest\win\..\..\..\out\Debug\cpptest\cpptest.unsuccessfulbuild".
ClCompile:
C:\Program Files\Microsoft Visual Studio 10.0\VC\bin\CL.exe /c /ZI /nologo /W3 /WX- /Od /Oy- /D WIN32 /D _DEBUG /D _LIB /D _UNICODE /D UNICODE /Gm /EHsc /RTC1 /MTd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Fo"E:\cpptest\win\..\..\..\out\Debug\cpptest\\" /Fd"E:\cpptest\win\..\..\..\out\Debug\cpptest\vc100.pdb" /Gd /TP /analyze- /errorReport:queue ../missing.cpp
missing.cpp
e:\cpptest\missing.cpp(36): fatal error C1083: Cannot open include file: 'windows.h': No such file or directory [E:\cpptest\win\cpptest.vcxproj]
मैं मान लीजिए कि यह समस्या माइक्रोसॉफ्ट एसडीके खोजने के लिए एमएसबिल्ड की अक्षमता से संबंधित है, जो "E:\Program Files\Microsoft SDKs\Windows\v7.1"
में स्थापित है।
- कॉपी
HKCU
कोHKLM\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.1
के तहत रजिस्ट्री का हिस्सा (WindowsSdkDir is not set correctly in Visual Studio 2008? देखें):कैसे वेब पर इस मुद्दे को संभालने के लिए उपलब्ध कुछ सलाह कर रहे हैं। मैंने इस कामकाज की कोशिश नहीं की क्योंकि यह बहुत बदसूरत दिखता है, और निर्माण प्रक्रिया सिस्टम-खाता प्रमाण-पत्रों के साथ चलती है।
- एमएसबिल्ड के लिए अतिरिक्त पैरामीटर के रूप में
WindowsSDKDir
पास करें (जैसा कि TeamCity and MSBuild Quirks #1 में प्रस्तावित है)। VCProjectEngine.dll.config.xml
answer से Include Search Paths in TeamCity build Configurations में प्रस्तावित अनुसार (मुझे विंडोज़ एसडीके के साथ पीसी पर ऐसी फाइल नहीं मिली है)।- the answer से WindowsSdkDir is not set correctly in Visual Studio 2010 में प्रस्तावित प्रोजेक्ट गुणों में प्लेटफ़ॉर्म टूलसेट बदलें (मुझे संदेह है कि इससे मदद मिलेगी, क्योंकि मेरे पीसी में विंडोज एसडीके 7.1 स्थापित नहीं है)।
असल में जब CL.EXE
सब कुछ के साथ संकलन ठीक हो जाता है (क्योंकि मैं INCLUDE
और LIB
चर परिभाषित किया गया है), तो यह उपयोग करने के लिए मजबूर करने के लिए MSBuild एक समाधान हो सकता है/पारित वातावरण चर ...
रहे हैं इसी तरह के मुद्दे:
- "Differences between building on a machine with VS2010 installed and on a machine with the 7.1 SDK installed" लेकिन .NET परियोजनाओं के लिए।
- Erroneous Windows SDK x64 Compilation Warning (64-बिट प्लेटफ़ॉर्म के लिए 32-बिट प्रोजेक्ट का निर्माण)।
वैसे भी किसी पर Windows SDK के साथ एक पीसी स्थापित Visual C++ 2010 परियोजनाओं के निर्माण के साथ सफल रहा है?
हाय, क्या आप बेहतर तरीके से निर्दिष्ट कर सकते हैं कि आप विजुअल स्टूडियो 2010 सी ++ कैसे चलाते हैं टीम सिटी एजेंट के साथ एक बिल्ड सर्वर पर प्रोजेक्ट? विजुअल स्टूडियो 2010 सॉल्यूशन बिल्ड का उपयोग करना काम नहीं करता है क्योंकि ऐसा लगता है एमएसबिल्ड एक लापता mspdb100.dll DLL – Stefano
@Stefano पर निर्भर करता है, आमतौर पर आपके मामले में सही समाधान 'mspdb100.dll' की निर्देशिका को'% PATH% 'में जोड़ना है। – AntonK