2017-03-16 8 views
5

हाँ वहाँ इसी तरह के सवाल वहाँ बाहर हैं, लेकिन वे वी.एस. 2017 के लिए संबंधित नहीं हैं:MSBuild उपकरण 2017 2.9.6

मैं हाल ही में किया है वीएस 2015 से वीएस 2017 तक अपग्रेड किया गया। मेरे स्थानीय देव कंप्यूटर पर सब कुछ ठीक काम करता है और Azure एप्लिकेशन (Azure SDK 2.9.6 के साथ) बनाता है और शुरू होता है।

लेकिन TeamCity सर्वर पर (एमएस बिल्ड उपकरण 2017 - उपकरण संस्करण 15.0) मैं निम्नलिखित त्रुटि मिलती है:

:

MSB4019: The imported project "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\Microsoft\VisualStudio\v15.0\Windows Azure Tools\2.9\Microsoft.WindowsAzure.targets" was not found. Confirm that the path in the declaration is correct, and that the file exists on disk.

बिल्ड सर्वर/MSBuild निर्देशिका में Microsoft.WindowsAzure.targets खोजने की कोशिश करता "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\Microsoft\VisualStudio\v15.0\Windows Azure Tools\2.9\

लेकिन यह वास्तव में निर्देशिका में है:

"C:\Program Files (x86)\Microsoft Visual Studio\2017\[VisualStudioVersion]\MSBuild\Microsoft\VisualStudio\v15.0\Windows Azure Tools\2.9\

[VisualStudioVersion] निम्नलिखित मान हो सकते हैं "समुदाय", "व्यावसायिक", "उद्यम"

हाँ, मैं निर्माण उपकरण स्थापित (https://www.visualstudio.com/thank-you-downloading-visual-studio/?sku=BuildTools&rel=15) है।

हाँ, मैं पहले से ही पूरे Windows Azure Tools फ़ोल्डर BuildTools\MSBuild\Microsoft\VisualStudio\v15.0 को कॉपी किया है, लेकिन फिर मैं अपने एफ # परियोजना में एक और त्रुटि मिलती है:

MSB4057: The target "GetTargetFrameworkProperties" does not exist in the project.

यह नई एमएस की तरह लगता है उपकरण का निर्माण 2017 विंडोज के साथ ठीक से काम नहीं करता है Azure। क्या अभी तक कोई कामकाज है? या पुराने एमएसबिल्ड पर वापस जाने का एकमात्र विकल्प है?

उत्तर

4

नया स्टैंडअलोन BuildTools वर्तमान में विंडोज़ एज़ूर लक्ष्यों का समर्थन नहीं करता है। तो यदि आप Azure SDK के साथ नए MSBuild 2017 का उपयोग करना चाहते हैं तो आपको अपने बिल्ड सर्वर पर एक पूर्ण VS 2017 स्थापना स्थापित करनी होगी।

नोट: एमएसबिल्ड पथ को पहचानने के लिए आपको टीमसिटी (एजेंट) को पुनरारंभ करना पड़ सकता है। निर्माण चलाने के बाद आप टैब 'पैरामीटर' में इस्तेमाल किया MSBuild पथ देख सकते हैं:

MSBuildTools15.0_x64_Path: C:\Program Files (x86)\Microsoft Visual Studio\2017\[VS_VERSION]\MSBuild\15.0\bin\amd64 MSBuildTools15.0_x86_Path: C:\Program Files (x86)\Microsoft Visual Studio\2017\[VS_VERSION]\MSBuild\15.0\bin [VS_VERSION] हो सकता है Community, Professional या Enterprise

मैं अब भी एफ # परियोजना से GetTargetFrameworkProperties त्रुटि मिली, इस ध्वज जोड़कर हल किया गया था:

/p:VisualStudioVersion=15.0

एमएसबिल्ड कार्य में।

अधिक जानकारी के लिए देखें https://github.com/Microsoft/msbuild/issues/1888