如何在 App Center 中尋找您的組建命令
重要
Visual Studio App Center 已排定於 2025 年 3 月 31 日淘汰。 雖然您可以繼續使用 Visual Studio App Center,直到完全淘汰為止,但有數個建議的替代方案可以考慮移轉至。
有時候,比較跨不同組建執行的確切組建命令會很有用。
若要比較命令,有助於知道在 App Center 的記錄中尋找的位置。 命令的外觀和尋找方式取決於應用程式的架構。
原生
Android (Java/Gradle)
以下是原生 Android 組建的範例輸出:
=====================================================================
Task : Gradle
Description : Build using a Gradle wrapper script
Version : 1.128.0
Author : Microsoft Corporation
Help : More Information
=====================================================================
SYSTEMVSSCONNECTION exists true
[command]/Users/vsts/agent/2.150.0/work/1/s/gradlew -DMOBILECENTER_KEYSTORE_PASSWORD=*** -DMOBILECENTER_KEY_ALIAS=*** -DMOBILECENTER_KEY_PASSWORD=*** -DMOBILECENTER_BUILD_VERSION=12 -DAPPCENTER_KEYSTORE_PASSWORD=*** -DAPPCENTER_KEY_ALIAS=*** -DAPPCENTER_KEY_PASSWORD=*** -DAPPCENTER_BUILD_VERSION=12 clean :app:assembleRelease :app:testRelease :app:lintRelease
iOS (Objective-C/Swift)
以下是原生 iOS 組建的範例輸出:
=====================================================================
Task : Xcode
Description : Build, test, or archive an Xcode workspace on macOS. Optionally package an app.
Version : 4.130.0
Author : Microsoft Corporation
Help : More Information
=====================================================================
[command]/usr/bin/xcodebuild -version
Xcode 10.2
Build version 10E125
[command]/usr/bin/xcodebuild -sdk iphoneos -workspace /Users/vsts/agent/2.149.2/work/1/s/SampleiOS.xcworkspace -scheme SampleiOS clean DSTROOT=/Users/vsts/agent/2.149.2/work/1/output/build/build.dst OBJROOT=/Users/vsts/agent/2.149.2/work/1/output/build/build.obj SYMROOT=/Users/vsts/agent/2.149.2/work/1/output/build/build.sym SHARED_PRECOMPS_DIR=/Users/vsts/agent/2.149.2/work/1/output/build/build.pch CODE_SIGN_STYLE=Manual
React Native
注意
若要在本機重現,請確定您也從package.json檔案安裝套件相依性:
- 使用 npm -
npm install
- 使用 yarn -
yarn install
Android
由於 React Native 要編譯的 Android SDK 連結,輸出看起來會類似原生 Android 應用程式:
=====================================================================
Task : Gradle
Description : Build using a Gradle wrapper script
Version : 1.128.0
Author : Microsoft Corporation
Help : More Information
=====================================================================
SYSTEMVSSCONNECTION exists true
[command]/Users/vsts/agent/2.149.2/work/1/s/android/gradlew -DMOBILECENTER_BUILD_VERSION=5 -DAPPCENTER_BUILD_VERSION=5 -p android clean :app:assembleRelease :app:lintRelease
iOS
由於 React Native 要編譯的 Xcode 連結,因此其輸出看起來會類似於原生 iOS 應用程式的輸出:
=====================================================================
Task : Xcode
Description : Build, test, or archive an Xcode workspace on macOS. Optionally package an app.
Version : 4.130.0
Author : Microsoft Corporation
Help : More Information
=====================================================================
[command]/usr/bin/xcodebuild -version
Xcode 10.2
Build version 10E125
##[warning]Output directory for build output (binaries) ignored. Specifying an output directory is incompatible with the 'archive' action.
[command]/usr/bin/xcodebuild -sdk iphoneos -project /Users/vsts/agent/2.149.2/work/1/s/ios/SampleReactNative.xcodeproj -scheme SampleReactNative clean archive -archivePath /Users/vsts/agent/2.149.2/work/1/output/build/archive/SampleReactNative.xcarchive -UseModernBuildSystem=NO CODE_SIGNING_ALLOWED=NO
Xamarin
Android
以下是 Xamarin.Android 組建的一些範例輸出。 要檢查的索引鍵行位於方括弧後面 [command]
,不過標題對於協助您尋找正確的位置很有用。
=====================================================================
Task : Xamarin.Android
Description : Build an Android app with Xamarin
Version : 1.151.0
Author : Microsoft Corporation
Help : More Information
=====================================================================
[command]/Library/Frameworks/Mono.framework/Versions/5_18_2/bin/msbuild /version /nologo
[command]/Library/Frameworks/Mono.framework/Versions/5_18_2/bin/msbuild /Users/vsts/agent/2.150.3/work/1/s/Xamarin.UITest/FormsGallery/FormsGallery/FormsGallery.Android/FormsGallery.Android.csproj /t:PackageForAndroid /p:Configuration=Debug
iOS
Xamarin.iOS 的格式幾乎完全相同,但 的參考 Android
改為適用 iOS
:
=====================================================================
Task : Xamarin.iOS
Description : Build an iOS app with Xamarin on macOS
Version : 1.131.0
Author : Microsoft Corporation
Help : More Information
=====================================================================
[command]/Library/Frameworks/Mono.framework/Versions/5_18_2/bin/msbuild /version /nologo
[command]/Library/Frameworks/Mono.framework/Versions/5_18_2/bin/msbuild /Users/vsts/agent/2.150.3/work/1/s/Xamarin.UITest/FormsGallery/FormsGallery.sln /p:Configuration=Debug /p:Platform=iPhoneSimulator /t:Rebuild