android: `Build -> Archive` command hangs, "Please ensure that you are using a release configuration and that "Use Shared Mono Runtime" option unchecked."
Steps to Reproduce
- Set a project to release and build, and then Build -> Archive
Expected Behavior
Create an archive
Actual Behavior
It never completes.
I’m using release configuration and “Use Shared Mono Runtime” option is unchecked
<BundleAssemblies>true</BundleAssemblies>
<AotAssemblies>false</AotAssemblies>
This is my release configuration. I know this options are not available in the community verison of VS2017, but I can change it manually and reloade the project. It used to compile ok in April and earlier. I’m not sure if something changed in recent VS update.
Version Information
15.7.1
Microsoft Visual Studio Community 2017 (VS2017) Version 15.7.1 VisualStudio.15.Release/15.7.1+27703.2000 Microsoft .NET Framework Version 4.7.03056
Installed Version: Community
Visual C++ 2017 00369-60000-00001-AA302 Microsoft Visual C++ 2017
Application Insights Tools for Visual Studio Package 8.12.10405.1 Application Insights Tools for Visual Studio
ASP.NET and Web Tools 2017 15.0.40501.0 ASP.NET and Web Tools 2017
ASP.NET Core Razor Language Services 15.7.31476 Provides languages services for ASP.NET Core Razor.
ASP.NET Web Frameworks and Tools 2017 5.2.60419.0 For additional information, visit https://www.asp.net/
Azure App Service Tools v3.0.0 15.0.40424.0 Azure App Service Tools v3.0.0
C# Tools 2.8.0-beta6-62830-08. Commit Hash: e595ee276d14e14bfb3eb323fb57f2aa668bddea C# components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.
Common Azure Tools 1.10 Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.
Dotfuscator Community Edition 5.34.0.6830-9173b9a63 PreEmptive Protection - Dotfuscator CE
GorillaPlayerPackage Extension 1.0 GorillaPlayerPackage Visual Studio Extension Detailed Info
JavaScript Language Service 2.0 JavaScript Language Service
JavaScript Project System 2.0 JavaScript Project System
JavaScript UWP Project System 2.0 JavaScript UWP Project System
JetBrains ReSharper Ultimate 2017.2.2 Build 109.0.20171006.122324 JetBrains ReSharper Ultimate package for Microsoft Visual Studio. For more information about ReSharper Ultimate, visit http://www.jetbrains.com/resharper. Copyright © 2018 JetBrains, Inc.
Merq 1.1.17-rc (cba4571) Command Bus, Event Stream and Async Manager for Visual Studio extensions.
Microsoft Continuous Delivery Tools for Visual Studio 0.3 Simplifying the configuration of continuous build integration and continuous build delivery from within the Visual Studio IDE.
Microsoft JVM Debugger 1.0 Provides support for connecting the Visual Studio debugger to JDWP compatible Java Virtual Machines
Microsoft MI-Based Debugger 1.0 Provides support for connecting Visual Studio to MI compatible debuggers
Microsoft Visual C++ Wizards 1.0 Microsoft Visual C++ Wizards
Microsoft Visual Studio Tools for Containers 1.1 Develop, run, validate your ASP.NET Core applications in the target environment. F5 your application directly into a container with debugging, or CTRL + F5 to edit & refresh your app without having to rebuild the container.
Microsoft Visual Studio VC Package 1.0 Microsoft Visual Studio VC Package
Mono Debugging for Visual Studio 4.10.5-pre (ab58725) Support for debugging Mono processes with Visual Studio.
Node.js Tools 1.4.11027.3 Adds support for developing and debugging Node.js apps in Visual Studio
NuGet Package Manager 4.6.0 NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.
OzCode 1.0 Your road to Magical Debugging. http://www.oz-code.com
OzCodePackage Extension 1.0 OzCodePackage Visual Studio Extension Detailed Info
ProjectServicesPackage Extension 1.0 ProjectServicesPackage Visual Studio Extension Detailed Info
ResourcePackage Extension 1.0 ResourcePackage Visual Studio Extension Detailed Info
SQL Server Data Tools 15.1.61804.210 Microsoft SQL Server Data Tools
TypeScript Tools 15.7.20419.2003 TypeScript Tools for Microsoft Visual Studio
Visual Basic Tools 2.8.0-beta6-62830-08. Commit Hash: e595ee276d14e14bfb3eb323fb57f2aa668bddea Visual Basic components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.
Visual F# Tools 10.1 for F# 4.1 15.7.0.0. Commit Hash: 16ecf5a30ad868d183c58e4a71a71c23d4ed3ba9. Microsoft Visual F# Tools 10.1 for F# 4.1
Visual Studio Code Debug Adapter Host Package 1.0 Interop layer for hosting Visual Studio Code debug adapters in Visual Studio
Visual Studio Tools for CMake 1.0 Visual Studio Tools for CMake
Visual Studio Tools for Unity 3.7.0.1 Visual Studio Tools for Unity
Visual Studio Tools for Universal Windows Apps 15.0.27703.01 The Visual Studio Tools for Universal Windows apps allow you to build a single universal app experience that can reach every device running Windows 10: phone, tablet, PC, and more. It includes the Microsoft Windows 10 Software Development Kit.
VisualStudio.Mac 1.0 Mac Extension for Visual Studio
Windows Machine Learning Generator Extension 1.0 Windows Machine Learning Visual Studio Extension Detailed Info
WiX Toolset Visual Studio Extension 0.9.21.62588 WiX Toolset Visual Studio Extension version 0.9.21.62588 Copyright © .NET Foundation and contributors. All rights reserved.
Xamarin 4.10.0.442 (396b18cef) Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.
Xamarin Designer 4.12.264 (fc37cd02e) Visual Studio extension to enable Xamarin Designer tools in Visual Studio.
Xamarin.Android SDK 8.3.0.19 (HEAD/342b2ce96) Xamarin.Android Reference Assemblies and MSBuild support.
Xamarin.iOS and Xamarin.Mac SDK 11.10.1.177 (7e782c1) Xamarin.iOS and Xamarin.Mac Reference Assemblies and MSBuild support.
Log File
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 40 (9 by maintainers)
I’m experiencing this is VS2017 Pro. All that we had to do was (close Visual Studio) delete the .vs folder and restart Visual Studio.
Found the bug. It manifests in Community for some reason but has nothing to do with community. The good news is that restarting VS is a valid workaround. It works after that, with the correct settings. I’ll be working on a fix.
Same problem here. Closing Visual Studio and delete .vs folder under my project. Resolve this issue
15.9.12 on VS2017, it is still problem.
Same problem with VS 15.9.2 - Restarted VS fixed it. Note that I built a release branch first and pushed it to a device, then archived. Perhaps that previous release build had something to do with it.
@JeetR’s solution will fix 99% of issues that arise in projects that have worked previously.
Same problem with VS 15.9.3
Remove the “Use Shared Runtime” from Debug mode as well. It don’t work in Release mode if “use shared runtime” is enable for Debug configuration.
Still on this. It seems the bug exceeds Xamarin and I may need to forward it. I’ll keep updating here, though.
BTW, the exception mentioned above
has been fixed. The fix will be in preview soon.
I am having the same problem. why did you close this without a solution? I dont think that this has something to do with any of these above.
I am sure that this bug is related to this ticket https://github.com/xamarin/xamarin-android/issues/1651 Because archiving works fine once you remove bundle into native assemblies.
@xufeipyxis Can you please provide your most recent
idelogs after encountering this issue found inside theHelp -> Xamarin -> Zip Logsoption? This should have a few more clues as to why this is failing.You should be able to build on the command line via:
msbuild <project.csproj> /t:SignAndroidPackage /p:Configuration=ReleaseIf that fails, it should give a proper error message as to what’s wrong.