解決提交錯誤Resolve submission errors

如果在提交您的 app 到市集後發生錯誤,您必須先解決這些問題才能繼續進行認證程序If you encounter errors after submitting your app to the Store, you must resolve them in order to continue the certification process. 錯誤訊息會指出問題是什麼,以及您為了修正這個問題可能需要執行的動作。The error message will indicate what the problem is and what you might need to do in order to fix the issue. 以下是一些可協助您解決這些錯誤的額外資訊。Here is some additional info that can help you resolve these errors.

UWP 應用程式UWP apps

如果您要提交 UWP 應用程式,您可能會在前置處理期間看到錯誤,因為您的封裝檔案不是由存放區 Visual Studio 所產生的. msixupload 或 .appxupload 檔案。If you are submitting a UWP app, you may see an error during preprocessing if your package file is not a .msixupload or .appxupload file generated by Visual Studio for the Store. 建立應用程式套件檔案時,請務必遵循 使用 Visual Studio 封裝 UWP 應用程式 中的步驟,並只在提交的 封裝 頁面上傳 msixupload 或 .appxupload 檔案,而不是 msix/appx 或 msixbundle/.appxbundle。Be sure that you follow the steps in Package a UWP app with Visual Studio when creating your app's package file, and only upload the .msixupload or .appxupload file on the Packages page of the submission, not a .msix/appx or .msixbundle/appxbundle.

如果出現編譯錯誤,請確認您可以成功在釋出模式中建置您的應用程式。If a compilation error is displayed, make sure that you are able to build your application in Release mode successfully. 如需詳細資訊,請參閱 .NET 原生內部編譯器錯誤For more info, see .NET Native Internal Compiler Errors.

傳統型應用程式Desktop application

如果您打算提交同時包含 Win32 和 UWP 二進位檔的套件,請務必使用 Visual Studio 2017 Update 4 和更新版本中提供的 Windows 封裝專案來建立該套件。If you plan to submit a package that contains both Win32 and UWP binaries, make sure that you create that package by using the Windows Packaging Project that is available in Visual Studio 2017 Update 4 and later versions. 如果您使用 UWP 專案範本建立封裝,可能無法將該封裝提交到存放區,或將它側載到其他電腦上。If you create the package by using a UWP project template, you might not be able to submit that package to the Store or sideload it onto other PCs. 即使封裝成功發佈,但在使用者的電腦上可能會以非預期的方式表現。Even if the package publishes successfully, it might behave in unexpected ways on the user's PC. 如需詳細資訊,請參閱 使用 Visual Studio (封裝應用程式傳統型橋接器) For more info, see Package an app by using Visual Studio (Desktop Bridge).

Windows Phone 8.x 及更早版本Windows Phone 8.x and earlier

重要

從2018年10月31日起,新建立的產品不能包含以 Windows Phone 8.x 或更早版本為目標的套件。As of October 31, 2018, newly-created products cannot include packages targeting Windows Phone 8.x or earlier. 如需詳細資訊,請參閱這 篇 blog 文章For more info, see this blog post.

在前置處理期間,當偵測到 Windows Phone 套件有問題時,您可能會看到 錯誤 2001You may see error 2001 when problems with Windows Phone packages are detected during preprocessing. 在大部分的情況下,您必須重建您的 app 套件來更正錯誤。In most cases, you will need to rebuild your app's package to correct the error. 一旦完成,在您再次按一下 [提交至市集] 前,請先在提交的 [ 套件] 頁面上使用新套件取代舊套件。Once you've done that, replace the old package with the new one on the Packages page of the submission before you click Submit to the Store again.

造成此錯誤的問題有幾種。There are a number of issues that may cause this error. 請檢閱下列清單,判斷可能適用於您套件的問題。Review the list below to determine which might apply to your packages.

  • 套件中一或多個組件模糊處理錯誤: 使用不同的工具來執行模糊處理,或移除模糊處理。One or more assemblies in the package are obfuscated incorrectly: Use a different tool to perform the obfuscation, or remove the obfuscation. 編譯處理序最佳化模糊處理的組件,但是有些組件偶爾會以不受支援的方式使用修改 MSIL 的某個工具來模糊處理而導致錯誤。The compile process optimizes the obfuscated assemblies, but occasionally some assemblies are obfuscated using a tool that modifies the MSIL in an unsupported way that will cause an error.
  • App 中一或多個方法的大小超過 IL 的 256 KB: 將有問題的方法重構為較小的函式。The size of one or more methods in the app exceeds 256 KB of IL: Refactor the offending method into smaller functions. 組件中方法的 MSIL 大小可以使用 ILDASM 工具決定。The size of MSIL for methods in an assembly can be determined by using the ILDASM tool.
  • 一或多個組件的強式名稱簽章驗證失敗: 這個錯誤的發生原因通常是使用與組件中繼資料庫不同的金鑰來簽署強式名稱。The strong name signature validation failed for one or more assemblies: This error typically occurs when the strong name signing was performed using a key different than the one expected in the assembly metadata. 使用正確的金鑰簽署或移除強式名稱簽署。Sign with the correct key, or remove strong name signing.
  • 套件包含混合模式 (包含 Managed 和原生程式碼) 組件: Windows Phone 不支援混合模式的組件。The package contains mixed-mode (with managed and native code) assemblies: Mixed-mode assemblies are not supported on Windows Phone. 從套件中移除混合模式組件,然後重新提交 app。Remove the mixed-mode assemblies from the package and resubmit the app.
  • Windows Phone 8.1 XAP 或 appx/appxbundle 組件不正確: 請確定您的 .winmd 檔案中有至少一個公用的進入點。A Windows Phone 8.1 XAP or appx/appxbundle assembly is not valid: Make sure your .winmd file has at least one public entry point. 如有需要,您可以使用任何解編程式應用程式檢閱程式碼,並檢查公用的進入點。You can use any decompiler application to review the code and check for public entry points if needed.

提交您的 app 後可能看到的另一個錯誤是 錯誤 1300Another error that you might see after submitting your app is error 1300 . 這發生在一或多個組件 (或整個套件) 已先行編譯時。This occurs when one or more assemblies (or the entire package) is already precompiled. 若要修正此問題,請先在 Microsoft Visual Studio 中重建 App 套件,然後提交新產生的套件。To fix this issue, rebuild the app's package in Microsoft Visual Studio and then submit the newly-generated package.

名稱/身分識別錯誤Name/identity errors

如果您看到 「在套件中找到的名稱不是其中一個保留的應用程式名稱。請保留應用程式名稱和/或使用此語言的正確應用程式名稱更新您的套件」 錯誤,可能是因為您在套件中輸入的名稱不正確。If you see an error that says The name found in the package is not one of your reserved app names. Please reserve the app name and/or update your package with the correct app name for this language , it may be because you’ve entered an incorrect name in your package. 如果您使用的應用程式名稱尚未保留在合作夥伴中心中,也可能會發生此錯誤。This error can also occur if you are using an app name that you haven’t reserved in Partner Center. 您通常可以依照下列步驟解決這個錯誤:You can usually resolve this error by following these steps:

  • 移至您 App 的 應用程式身分識別 頁面 (在 應用程式管理 下),確認您的 App 是否有指派的身分識別。Go to the App identity page for your app (under App management ) to confirm whether your app has an assigned Identity. 如果沒有,您會看到建立選項。If it doesn’t, you’ll see an option to create one. 您必須保留您的應用程式名稱,才能建立身分識別。You’ll need to reserve a name for your app in order to create the Identity. 請確定這是您在您的套件中使用的名稱。Make sure this is the name you’ve used in your package.
  • 如果您的 App 已經有身分識別,您可能仍需要保留您想在您的套件中使用的名稱。If your app already has an identity, you might still need to reserve the name that you want to use in your package. 應用程式管理 下,按一下 管理應用程式名稱Under App management , click Manage app names. 輸入您想要使用的名稱,然後按一下 [保留應用程式名稱]Enter the name you’d like to use, and click Reserve app name .

重要

如果您想要使用的名稱無法使用,表示另一個 App 可能已經保留該名稱。If the name you want to use is not available, another app might have already reserved that name. 如果您的 App 已經使用該名稱發行,或如果您認為您有權使用該名稱,請連絡客戶支援If your app is already published under that name, or if you think you have the right to use it, contact support.