Bug 7076 - MonoDevelop can't install Android packages which have '-' in the filename
Summary: MonoDevelop can't install Android packages which have '-' in the filename
Status: RESOLVED DUPLICATE of bug 7474
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: Android Add-in ()
Version: unspecified
Hardware: PC Mac OS
: --- normal
Target Milestone: ---
Assignee: Alan McGovern
URL:
Depends on:
Blocks:
 
Reported: 2012-09-11 15:35 UTC by Jonathan Pryor
Modified: 2012-11-07 00:25 UTC (History)
1 user (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED DUPLICATE of bug 7474

Description Jonathan Pryor 2012-09-11 15:35:21 UTC
Background: Android package names can only contain characters in the set [A-Za-z0-9_.], and Mono for Android generates package filenames which are based on the underlying package name.

Test case:
1. Click File > New > Solution...
1.a. Project type is Mono for Android application
1.b. Project name should be "Bxc-7025" (though anything with a '-' should work)
1.c. Click OK.
2. Build > Build All
3. Run > Start Without Debugging

Expected results: Application installs onto device.

Actual results: Deployment failed. Internal error.

$HOME/Library/Logs/MonoDevelop-3.0/AndroidTools*.log contasins:

> [2012-09-11 15:25:25.0] ERROR: Deployment failed
> System.IO.FileNotFoundException: Could not find file "/Users/jon/Development/Projects/CustomerSupport/Bxc-7025/bin/Debug/Bxc-7025.Bxc-7025-Signed.apk".
> File name: '/Users/jon/Development/Projects/CustomerSupport/Bxc-7025/bin/Debug/Bxc-7025.Bxc-7025-Signed.apk'
>   at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean anonymous, FileOptions options) [0x00337] in /private/tmp/monobuild/build/BUILD/mono-2.10.9/mcs/class/corlib/System.IO/FileStream.cs:343 
>   at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share)

The problem is that while MonoDevelop is looking for a sane looking filename (Bxc-7025.Bxc-7025-Signed.apk", because of the "name mangling" employed, the _actual_ filename is "Bxc_7025.Bxc_7025-Signed.apk."

Workaround: Use xbuild:

    xbuild /t:Install Bxc-7025.csproj
Comment 3 Jonathan Pryor 2012-11-07 00:25:11 UTC

*** This bug has been marked as a duplicate of bug 7474 ***